Skip to content

Instantly share code, notes, and snippets.

@codeopensrc
Last active April 5, 2020 22:00
Show Gist options
  • Save codeopensrc/0ccb6d1b9c0030132b34 to your computer and use it in GitHub Desktop.
Save codeopensrc/0ccb6d1b9c0030132b34 to your computer and use it in GitHub Desktop.
Set your "unidentified" network (OpenVPN or others) from public to private on Windows 8
# Put in OpenVpn server.conf
# Add:
# push "route 0.0.0.0 0.0.0.0"
# Once the above route is pushed, it should be identified and you should be able to configure the name and set to private.
# The below steps are if you don't have control over the VPN or "unidentified" network.
# WILL POST A BETTER OPTION FOR OPENVPN SOON
# Until then, you can use the below option for any unidentified network
#Original reference
#https://social.technet.microsoft.com/Forums/windows/en-US/c43e0d80-0330-4bfe-a6ae-ddfb8470e8dc/change-unidentified-network-ethernet-connection-from-public-to-private?forum=w8itpronetworking
#Run in PowerShell as admin
Set-NetConnectionProfile -interfacealias "Ethernet 2" -NetworkCategory Private
#Apparently above does not persist through reboots, have not tested
# BELOW IS NOT RECOMMEDED, PLEASE SEE OTHER GIST (TBA) ON BETTER OPTIONS FOR OPENVPN
# This will set ALL Unidentified networks to "Private"
# I recommend ONLY doing this if you
# A)Are on a desktop and B)Know what you are doing
#1. Start --> run --> MMC --> press enter
#2. In MMC console , from menu file select Add/Remove Snap-in
#3. Select Group Policy Object editor --> Press Add --> select Local computer --> press OK -->press OK
#4. Open Computer configration -->Windows Settings -->Security Settings -->select Network list manager policies
#on the right Side you will see options for :
#double click -->Unidentified networks
# Then you can select the option to consider the Unidentified networks as private and if user can change the
#location.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment