{"id":1117,"date":"2018-10-08T19:20:24","date_gmt":"2018-10-08T10:20:24","guid":{"rendered":"https:\/\/manatails.net\/blog\/?p=1117"},"modified":"2022-04-03T13:48:53","modified_gmt":"2022-04-03T04:48:53","slug":"preventing-windows-guests-from-creating-network-profiles-in-proxmox","status":"publish","type":"post","link":"https:\/\/manatails.net\/blog\/2018\/10\/preventing-windows-guests-from-creating-network-profiles-in-proxmox\/","title":{"rendered":"Preventing Windows guests from creating network profiles in Proxmox"},"content":{"rendered":"<p>Many of my servers run under the Proxmox virtual environment. For servers that doesn&#8217;t have a dedicated IP available for its guests I use iptables based NAT network to forward packets as described in my previous article: <a href=\"https:\/\/manatails.net\/blog\/2018\/04\/running-proxmox-with-nat\/\">https:\/\/manatails.net\/blog\/2018\/04\/running-proxmox-with-nat\/<\/a><\/p>\n<p>But I came across a problem where Windows guests detect the network as &#8216;Unknown&#8217; and try to create a new network profile every reboot.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1119\" src=\"https:\/\/manatails.net\/blog\/wp-content\/uploads\/2018\/10\/2018-10-08-19_13_51-pve-Proxmox-Virtual-Environment.png\" alt=\"2018-10-08 19_13_51-pve - Proxmox Virtual Environment\" width=\"410\" height=\"428\" \/><\/p>\n<p>Not only it looked bad to have random names &#8216;Network 18&#8217;, but also the network type defaults to public network so any rules in private network get ignored until I manually set the network type to private.<\/p>\n<p>I looked a bit in depth and found that the feature is called &#8216;Network Location Awareness&#8217; per the original article <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/aa480195.aspx\">https:\/\/msdn.microsoft.com\/en-us\/library\/aa480195.aspx<\/a><\/p>\n<p>From the page:<\/p>\n<blockquote><p>Digital Subscriber Line (DSL) and cable modems typically act as network address translators (NATs). As a result, their MAC addresses can be used to uniquely qualify the user&#8217;s network. NLA uses the MAC address of the user&#8217;s DSL or cable modem as the link ID.<\/p><\/blockquote>\n<p>Practically, Windows was using the MAC address of the default gateway to diffrentiate the network.<\/p>\n<p>So I had to give the NAT interface a unique MAC address in order to be recognized.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1118\" src=\"https:\/\/manatails.net\/blog\/wp-content\/uploads\/2018\/10\/2018-10-08-19_03_50-192.168.27.61-PuTTY.png\" alt=\"2018-10-08 19_03_50-192.168.27.61 - PuTTY\" width=\"314\" height=\"124\" \/><\/p>\n<p>Add &#8216;hwaddress ether&#8217; to the interface config and give a random mac address, then windows will consistently identify the network.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1120\" src=\"https:\/\/manatails.net\/blog\/wp-content\/uploads\/2018\/10\/2018-10-08-19_16_12-monica.mananet.net_444-Remote-Desktop-Connection.png\" alt=\"2018-10-08 19_16_12-monica.mananet.net_444 - Remote Desktop Connection\" width=\"791\" height=\"511\" \/><\/p>\n<p>Finally open regedit and go to HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\NetworkList then delete all entries in Profiles and Signatures to get rid of previously detected networks and reset the counter.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many of my servers run under the Proxmox virtual environment. For servers that doesn&#8217;t have a dedicated IP available for its guests I use iptables based NAT network to forward packets as described in my previous article: https:\/\/manatails.net\/blog\/2018\/04\/running-proxmox-with-nat\/ But I came across a problem where Windows guests detect the network as &#8216;Unknown&#8217; and try to &hellip; <a href=\"https:\/\/manatails.net\/blog\/2018\/10\/preventing-windows-guests-from-creating-network-profiles-in-proxmox\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Preventing Windows guests from creating network profiles in Proxmox<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[122,83],"class_list":["post-1117","post","type-post","status-publish","format-standard","hentry","category-computer","tag-proxmox","tag-windows"],"_links":{"self":[{"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/posts\/1117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/comments?post=1117"}],"version-history":[{"count":1,"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/posts\/1117\/revisions"}],"predecessor-version":[{"id":1121,"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/posts\/1117\/revisions\/1121"}],"wp:attachment":[{"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/media?parent=1117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/categories?post=1117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/manatails.net\/blog\/wp-json\/wp\/v2\/tags?post=1117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}