Posted on

I have recently been experimenting with VPN connections, and wish the firewall to behave like a private connection on the VPN. Most guides will tell you to open up the Network and Sharing centre and change from there. However, I am unable to click on the text Public and therefore had to search for another way.

Network and Sharing Centre

Network and Sharing Centre

This requires the use of PowerShell (PS), either directly, or through the Command Prompt (CMD). As I am not a regular PS user I will be using CMD.

  1. Start PS or CMD as an Administrator.

  2. If in PS:

    Get-NetConnectionProfile
    

    If using cmd add powershell as a prefix.

    powershell Get-NetConnectionProfile
    
    Command Promt with listing of available network connections

    Command Promt with listing of available network connections

    The connection I wish to change has the Name: OSL 3 and InterfaceIndex: 38.

  3. To set/change the NetworkCategory:

    Set-NetConnectionProfile -InterfaceIndex 38 -NetworkCategory Private
    

    or in CMD

    powershell Set-NetConnectionProfile -InterfaceIndex 38 -NetworkCategory Private
    

    Note: Make sure you select the correct InterfaceIndex

    Command Promt with connection "OSL 3" changed to "Private"

    Command Promt with connection "OSL 3" changed to "Private"

  4. The Network and Sharing Centre now shows this network location as private.

    "OSL 3" now set to "Private"

    "OSL 3" now set to "Private"

comments powered by Disqus