WgServerforWindows icon indicating copy to clipboard operation
WgServerforWindows copied to clipboard

Stopped working after reboot (Windows Server 2019)

Open pcinacio opened this issue 2 years ago • 6 comments

Good morning. I installed in a Windows Server 2019 environment, and things worked fine. After a reboot, Tunnel Service, Private Network, and Nat Routing, all appear in red. Is there a way to work around this? I have WireGuard in a Debian environment, and it works well. Totally appreciate the work of those who put it to work on Windows this way, but always found it a bit trickier.. :/ CapturarWG

pcinacio avatar Sep 25 '23 10:09 pcinacio

Same thing happened to me. "Install tunnel service" doesn't seem to do anything. Attempting to start Wireguard tunnel: wg_server causes and "Error 5: Access Denied" message.

vsviridov avatar Sep 25 '23 14:09 vsviridov

Check this https://stackoverflow.com/questions/48478869/cannot-bind-to-some-ports-due-to-permission-denied

Likely the port got reserved by the OS which prevented the service from starting. It also bugs out the UI, making it think the service is not installed.

Another ticket with more details: https://github.com/micahmo/WgServerforWindows/issues/99

vsviridov avatar Sep 25 '23 14:09 vsviridov

Great find @vsviridov! Others, let us know if this clue helps at all!

micahmo avatar Sep 25 '23 15:09 micahmo

Ok, so i understand it now. Yesterday i administered excluded the Wireguard port to prevent the reservation, reboot a couple times, so far, everything is good. Lets see if it stays that way :)

pcinacio avatar Sep 26 '23 11:09 pcinacio

@pcinacio and others, if this ends up working, do you think it's something that should be added to WS4W? I'm not sure how easy it would be to do in C#, but maybe once the port is selected in the server configuration, I can reserve it (or at least notify if it's in use).

micahmo avatar Sep 26 '23 14:09 micahmo

I think the behaviour where the service is registered, but can't start and the application still shows "Register service" button is a bug.

Maybe checking if the port is reserved in the app is a good idea, and adding mitigation would be great, as the whole point is about ease of use.

vsviridov avatar Sep 27 '23 16:09 vsviridov