running WireGuard VPN while in local network (strange IP address)

Started by bongo, May 28, 2025, 09:45:17 AM

Previous topic - Next topic
i installed WireGuard VPN on my phone and configured OPNsense accordingly. when monitoring port 51820 traffic on my OPNsense uplink, i can see incoming packets from my phone to the WireGuard server.
once my phone enters my local wifi network (which connects to the internet over OPNsense), i can see that port 51820 packets are sent from my uplink to IP 83.219.121.165, and then come back from IP 83.219.121.165 to my uplink to be forwarded to my WireGuard server in OPNsense.
looks quite strange to me. does this mean that all my VPN traffic is first sent to IP 83.219.121.165 (which seems to be somewhere in russia) and then comes back to me?
looks to me like a misconfiguration. right?
how should i change my configuration to avoid this?
thanx for advise!
regards
bongo

wg is "point to point". From the moment the traffic comes from your device with its ip to your local network through the wg interface, all routing in the local is "as per ususal". That is to say, that unusual and all traffic, you need to track down separately to wg.
In other words, your wg tunnel does not use other ip addresses to work.

Reverse DNS on that IP: 165-121-219-83.dyn.fiber.qlnet.ch
IP location finder points north of Bern, Switzerland.
The OP is better suited to see how that fits in his use case.

I had never analyzed what happens to existing connections as I'm moving back in my Wi-Fi's range (essentially new adapter, new gateway, routing altered).
It looks like some OSes even allow mobile data to stay up regardless of Wi-Fi connectivity. I'll assume that's not the case.
Doing a quick test disabling/enabling Wi-Fi, WAN traffic over the WGD port stops when Wi-Fi is enabled.
All traffic became locally routed. The local servers never saw a difference (source is still WGD peer IP).
Looking at the WGD status, the tunnel switches from mobile IP to local IP (inter LAN).