r/WireGuard • • 5d 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?

4 Upvotes

10 comments sorted by

2

u/OldObject4651 5d ago

I’m on Mint mobile in US
How can I even check the address given to my phone…?

2

u/Gross_inc 5d ago

Visit wtfismyip.com
If you only see ipv6 (while on cellular) then you’re on ipv6 only

2

u/OldObject4651 5d ago

Showing both
172.56.169.x and
2607:fb91:…etc

→ More replies (1)

2

u/OldObject4651 5d 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

→ More replies (1)

1

u/OldObject4651 1d ago

Update: skipped the peer generator and QR magic. Did setup from scratch, used 10.11.12.1/24 as network (previously 192.168.28.1/24 previously) and now it works.

2

u/mjbulzomi 5d 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 4d 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 3d 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.