r/WireGuard • u/OldObject4651 • 3d ago
WireGuard client iPhone weird behavior
Have opnsense 26.7.9_3 at home
Trying to get a iPhone road warrior setup going
WireGuard client on iPhone, tunnel setup using a QR code in opnsense
Config “looks” good.
Endpoint in iPhone before activating correctly says xx.yy.zz.30:51820
When activating the tunnel, the endpoint instantly changes to an IPv6 address with port 51820
When I deactivate, the endpoint changes back to the ipv4 address i specified..
Is this normal?
6
Upvotes
2
u/OldObject4651 3d ago
I’m on Mint mobile in US
How can I even check the address given to my phone…?
2
u/OldObject4651 3d ago
Heh also;
When I use the peer generator, and it creates a 192.168.28.6/32 address, then I snap the QR code and the iPhone WireGuard app puts in 192.168.28.7/32 (not what peer generator gui shows)
What’s up with that
2
u/mjbulzomi 3d ago
Is your cell/mobile carrier running IPv6 only? Does the IPv6 address begin with 64:ff9b?
Back in July, I was on holiday in Ireland from the USA, and I noticed my home's public IPv4 being translated to a 64:ff9b IPv6 address, and this was the case for me.
2
u/ananas7777 2d ago
Yeah, that's normal. The iOS app does it on purpose. When the tunnel starts it runs your endpoint back through getaddrinfo so DNS64 can kick in (there's literally a code comment saying so in DNSResolver.swift). On a NAT64 network, iOS turns your IPv4 endpoint into a synthesized IPv6 address, and the carrier's NAT64 translates it back to IPv4 on the way to your OPNsense. Turn the tunnel off and it just shows what's in your config again.
The 172.56 and 2607:fb91 addresses wtfismyip showed are both registered to T-Mobile, so that's your phone's side, not the endpoint. If the handshake completes and traffic flows, there's nothing to fix.
1
u/jonixas 1d ago
It seemingly is the same behavior I see for my personal tunnel, or the work related tunnels I use across multiple devices, although there it flips from a URL:PORT to IPv4:PORT, and reverts back when disconnecting.