from Darkassassin07@lemmy.ca to selfhosted@lemmy.world on 23 Apr 23:33
https://lemmy.ca/post/63812571
I host an openVPN server, from an IPv4 network/public IP. I also have a domain that points to that public IPv4 address and nothing else. (there’s some subdomains behind cloudflare, but the base domain just has an A record pointed at my public ipv4, no AAAA records.)
Lately, I’ve noticed my connection dramatically slows down while on mobile data and the server IP address displayed in the VPN client is NOT the address my domain points to. It is instead, an IPv6 address that I do not recognize… I do still have a connection, which gives me access to my private services, so I am successfully reaching my server.
What could be causing this? Would this be something to do with IPv6 (my phone) -> IPv4 (my server)?
I can manually specify my IPv4 address in the openvpn client and get a connection, so why would it retrieve and use an IPv6 address? Where is that address even comming from, it’s not in my DNS…?

/edit:
openvpn-status.log shows the remote client as connected from an ipv4 address which matches what comes up at whatismyipaddress.com viewed from the client while disconnected from the VPN. (it displays both an IPv6 and an IPv4 for the phones mobile data connection, openvpn sees the ipv4 when connected)
So the server sees the phones IPv4 as the source of the connection, but the phone is using an IPv6 address I don’t recognize to reach the server…
threaded - newest
Yes, 64:ff9b::/96 is the reserved NAT64 prefix. Your provider is doing NAT. To avoid this, you will need an IPv4 address on your client, or an IPv6 address on your server.
This confuses me because I have an IPv4 address on the client, and that IPv4 is what the server is seeing make the connection…
/edit
I think I get it.
The client actually only has IPv6. The IPv4 address I’m seeing in the log and whatismyipaddress.com is the address of my mobile providers NAT.
Thanks. I still haven’t totally wrapped my head around IPv6. Stubbornly happy with IPv4 tbh, but it seems the rest of the world is moving on, understandably.
IPv6 is exactly the same as IPv4, just that the addresses are written with hex. Routing and subnetting and everything is exactly the same. (Also you can have exactly one double-colon, which expands to the necessary number of zeroes, purely for human ease of use.)
The only big difference is that DHCP isn’t really a thing. Yes there’s DHCPv6, but it’s not the end of the story. There’s also SLAAC and other stuff. Ideally your provider assigns you a big subnet and your devices use smaller networks or addresses from there.