{"id":1324,"date":"2025-12-16T18:01:37","date_gmt":"2025-12-16T16:01:37","guid":{"rendered":"https:\/\/dety.net.ua\/?p=1324"},"modified":"2025-12-16T18:01:37","modified_gmt":"2025-12-16T16:01:37","slug":"experiment-windows-rras-always-on-vpn-external-dhcp","status":"publish","type":"post","link":"https:\/\/dety.net.ua\/?p=1324","title":{"rendered":"Experiment: Windows RRAS + Always on VPN + External DHCP"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">To enable an external DHCP server run powershell command (admin mode):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>reg add \u201cHKLM\\SYSTEM\\CurrentControlSet\\Services\\Dhcp\u201d \/v RequiredPrivileges \/d \u201cSeChangeNotifyPrivilege\u201d\\0\u2033SeCreateGlobalPrivilege\u201d\\0\u2033SeImpersonatePrivilege\u201d\\0 \/t REG_MULTI_SZ \/f\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Change RRAS settings to use an external DHCP server. Now it works.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I wanted to assign ip-addreses with an external DHCP server but it seems impossible.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In dhcpd.leases we can see:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lease 192.168.100.143 {\n  starts 2 2025\/12\/16 14:28:44;\n  ends 2 2025\/12\/16 16:28:44;\n  tstp 2 2025\/12\/16 17:28:44;\n  tsfp 2 2025\/12\/16 17:28:44;\n  atsfp 2 2025\/12\/16 17:28:44;\n  cltt 2 2025\/12\/16 14:28:44;\n  binding state active;\n  next binding state expired;\n  hardware ethernet 00:0c:29:ca:c5:39;\n  uid \"\\001RAS \\000\\014)\\312\\3059\\000\\000\\006\\000\\000\\000\";\n  set vendor-class-identifier = \"MSFT 5.0\";\n  client-hostname \"RRAS-Server\";<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">I tried to use this construction but it is useless:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class \"specific-client\" {\n    match if option host-name = \"my-device-name\";\n}\n\npool {\n    allow members of \"specific-client\";\n    range 192.168.1.50 192.168.1.50;  # Assigns a single fixed IP\n}\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A hardware ethernet and a uid are always the same: RRAS-Server&#8217;s.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">RRAS-server occupies a lot of ip-addresses on an external DHCP-server for all the connectors.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, it was useless and I fall back to the internal RRAS DHCP-server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To enable an external DHCP server run powershell command (admin mode): Change RRAS settings to use an external DHCP server. Now it works. I wanted to assign ip-addreses with an external DHCP server but it seems impossible. In dhcpd.leases we can see: I tried to use this construction but it is useless: A hardware ethernet [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,12],"tags":[],"class_list":["post-1324","post","type-post","status-publish","format-standard","hentry","category-novosti","category-windows"],"_links":{"self":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts\/1324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1324"}],"version-history":[{"count":1,"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts\/1324\/revisions"}],"predecessor-version":[{"id":1325,"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts\/1324\/revisions\/1325"}],"wp:attachment":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1324"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}