I've successfully set up a WireGuard VPN on my Debian 10 server. It was incredibly straight forward compared to the setup of OpenVPN, and it's working fine.
However, I can't see any logs beyond those from journalctl -u [email protected]
. I'd like to know, for example, when there are failed authentication attempts. Is there a way to monitor that? e.g. with openvpn I could use fail2ban based on auth attempts.
Assuming you are running a 5.6 kernel which supports dynamic debugging, you can enable debug logs by executing:
The logs can than be consumed via
dmesg
orjournalctl
. Withdmesg
, just use following command:(
-H
,--human
enables user-friendly features like colors, relative time)(
-w
,--follow
)Also on systems with systemd you can use:
My version of logging users, script in crontab every 3 minutes. If inactivity less then 180 seconds, nothing doing, else appending to a log file.
Note: Searching for
10.0
in the output, because that is what IP addresses in my private network start with.