Troubleshooting WG client (Debian) - why no connection?

Started by knebb, April 04, 2024, 07:12:18 PM

Previous topic - Next topic
Hi,

I had Wireguard configured for a while and it was running stable and fine. Now I realized one of my clients (Debian10) lost VPN connection for some reason. So I tried to get it back up but it does not work.

At first I relized it was trying to connect to the wrong IP address (I changed the OPNSense WAN interface to fibre with static IP). But even using the correct OPNSense public IP (no NAT, no port forwarding needed) does not bring up the interface.

Do you guys have some idea how to troubleshoot the WG-connetion and why it does not come up?

I already did enable debug logging on the DEbian system through:

echo "module wireguard +p" | sudo tee /sys/kernel/debug/dynamic_debug/control

but using dmesg -wT does not show any further details.

I disabled an re-enabled WG on my OPNSense. No change.
I checked the logs from WG but it does not bring any lights in there:

2024-04-04T15:36:27 Notice wireguard wireguard instance RemoteAccess (wg2) started
2024-04-04T15:36:27 Notice wireguard /usr/local/opnsense/scripts/Wireguard/wg-service-control.php: ROUTING: keeping inet default route to xx.yyy.zz.www
2024-04-04T15:36:27 Notice wireguard /usr/local/opnsense/scripts/Wireguard/wg-service-control.php: ROUTING: configuring inet default gateway on wan
2024-04-04T15:36:27 Notice wireguard /usr/local/opnsense/scripts/Wireguard/wg-service-control.php: ROUTING: entering configure using 'opt2'
2024-04-04T15:36:27 Notice wireguard wireguard instance RemoteAccess (wg2) can not reconfigure without stopping it first.



On the client I can do a wg:

root@debian:~# wg
interface: wg0

No further details.

I even rebooted the client several times but no chance to get the wg0 interface up and running.


How can I check more in detail what is going on here?

Thanks a lot!

/KNEBB

WTF?????


I just did (again!) a
wg-quick down wg0

followed by
ifup wg0
while having a tcpdump running for troubleshoot purposes.

What should I say? Out of sudden it went up and the VPN connection is established.  :o