micahmo/WgServerforWindows

cant enable private network

thebwistic opened this issue · 6 comments

image

Im trying to click the private network button but it isn't changing

Hi @thebwistic, sorry to hear about this!

Let's see if we can change the adapter settings directly. Can you try running these three commands from an admin PowerShell?

$network = Get-NetConnectionProfile -InterfaceAlias "wg_server"
$network.NetworkCategory = "Private"
Set-NetConnectionProfile -InputObject $network

Let's start here before moving on to your other issue.

image

ok, i've run the given commands and then retried with making the network private on the wg server app. so far its still not working

Those commands are supposed to make the network private, so you shouldn't need to press that option in the UI again. Try running the commands, then just open a fresh instance of WS4W and see if the status is any different.

Also I added one more line to the commands which is supposed to print out the current profile. It'll be interesting to see if even setting it from PowerShell fails.

$network = Get-NetConnectionProfile -InterfaceAlias "wg_server"
$network.NetworkCategory = "Private"
Set-NetConnectionProfile -InputObject $network
$network = Get-NetConnectionProfile -InterfaceAlias "wg_server"
echo $network.NetworkCategory

BTW, are you on a domain?

No I am not.

Its still not working. i reinstalled wg server. private network still cannot be opened

Hey @thebwistic I'm a bit stumped by this. If you can't set the adapter to Private using PowerShell, then it sounds like a Windows problem. The only other thing I can think to try is setting this in the registry.

Try going to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles\ and find the adapter that corresponds to wg_server. Try setting Category to 1.

image