WgServerforWindows icon indicating copy to clipboard operation
WgServerforWindows copied to clipboard

Logging or CLI client status

Open rdcuk opened this issue 1 year ago • 1 comments

Hi,

I'm trialling Wg Server for Windows to replace my Softether OpenVPN setup.

I rely on log analysis to look at usage and who connected when.

Does the server keep logs anywhere? Or is there a CLI way of reporting the client status (connected/disconnected/source IP etc) so I can write a script to regularly check?

Thanks.

rdcuk avatar May 08 '24 08:05 rdcuk

Hi @rdcuk, thanks for the question! WS4W is mostly a glorified wrapper around WireGuard. It does have a CLI, but that's mostly for running headless commands (for example, from Scheduled Tasks).

https://github.com/micahmo/WgServerforWindows?tab=readme-ov-file#cli

It doesn't really have any logging of its own. However, WireGuard has plenty of logging.

  • You can run wg show to print out the same thing that "View Status" shows in the WS4W UI.
  • You can supposedly run wireguard /dumplog > logs.txt to view logs (seen here), but I couldn't get this to print anything for me. You can see the full logs in the WireGuard UI (open from the system tray) on the Logs tab.
image

I hope that helps a little!

micahmo avatar May 08 '24 13:05 micahmo