After a restart of one of our servers (a Windows Server 2012 R2), all private connections become public and vice versa (this user had the same problem). Stuff like pinging and iSCSI stopped working, and after some investigation it turned out this was the cause.
The problem is that I don't know how to make them private again. Left-clicking the network icon in the tray shows the "modern" sidebar, but it only shows a list of connections, and right-clicking them doesn't show any options.
What could be the problem, and is there a way to change these settings? I have to make one of the connections public (Internet access), and two of them private (backbone).
Powershell. Here is an example of changing the network profile of a network interface called Ethernet1 from whatever it is now to "Private." I got this info from
Get-Help Set-NetConnectionProfile -Full
.Documentation: https://docs.microsoft.com/en-us/powershell/module/netconnection/set-netconnectionprofile?view=winserver2012r2-ps
A GUI way of making this change:
Computer Configuration/Windows Settings/Security Setting /Network List Manager Policies
.Note: To show networks not currently connected, right-click Network List Manager Policies in the left pane and choose Show All Networks.
Go to Network Location tab and change the Location type from Public to Private.
Close Local Policy Editor.
Source: https://social.technet.microsoft.com/Forums/lync/en-US/82ccc68c-947e-435a-a237-1090f38d0dbe/windows-server-2012-r2-datacenter-network-stuck-in-public-mode
Using Powershell. Here is an example of changing the network profile of a network interface called Ethernet to "Private." This is a one line command.
This will work on any local computer with Powershell installed.
I've had a similar issue for months on my home 2012R2 Domain Controller.
After patching and a reboot I could not connect via RDP.
I have MS firewall turned off in GPO for domain networks. After not being able to connect I found that the primary Ethernet connection was listed as public and therefore the firewall was ON.
Why is the NIC changing from domain to public ?
After researching a few articles on the web, I've concluded the following:
After a restart of the only DC in the domain, AD services are not immediately available when the IP stack is initialized.
This results in the OS sensing that this is a public network and it sets the NIC accordingly.
Permanent resolution of this problem on this machine was to set the Network Location Awareness service to delayed start.
This allows AD services to become available and then the OS senses a domain network and sets the NIC accordingly.
Another simpler way with Powershell:
Had this issue on a VM and just had to restart the Network Location Awareness service to get it to figure out that it was connected to a Domain and start using a domain profile.
What made it work on my Windows Server 2012 R2 standard servers was to enable IPV6 again.
In a move to make future troubleshooting easier for myself I disabled IPV6 left right and center and after doing that the Windows Firewall no longer showed that 'Domain' was connected.
Why on earth Windows can't determine that it's on a domain if only IPV4 is connected is beyond me.
bah