Does OpenVPN favour IPv4?
-
I just noticed something curious. I have many devices on my LAN with both IPv4 and IPv6 addresses. When my notebook computer connected directly to my LAN and I ping one of those devices, the IPv6 address is used. However, if I connect to my LAN via OpenVPN and do the same, the IPv4 address is used. However, if I ping something out on the Internet, such as google.com or yahoo.com, IPv6 is used.
Any idea what might be causing this curiosity? Redirect IPv4 & IPv6 gateways are selected.
-
When you ping over OpenVPN, how is it resolving the target? It may only be getting an A response back or using some other method like NBNS perhaps which doesn't do IPv6?
-
I am using the pfSense resolver for both LAN and via OpenVPN. I can force IPv6, with ping -6, but normally, I'd have to force IPv4. Also, Block Outside DNS is selected.
-
Right but OpenVPN is just a transport there. Sniff the DNS requests and see what the client is doing.
-
@jimp said in Does OpenVPN favour IPv4?:
Right but OpenVPN is just a transport there.
That's what I thought. My suspicion was the OpenVPN client might have something to do with it. Regardless, I pinged an address on my LAN via both OpenVPN and direct Ethernet connections. With both, Wireshark showed the sequence:
A query
AAAA query
A response
AAAA responseSo, the only difference is one connection is via OpenVPN and the other, Ethernet.
My notebook is running OpenSUSE Linux 15.0. I got the same result on Ethernet with my desktop system running 15.1.
-
Might be something in the client that prioritizes RFC1918 addresses to prevent VPN leakage in cases like that. It's unfortunately common for people to accidentally mix DNS like that and unintentionally send private traffic across public networks via IPv6 when it was meant to stay private on IPv4.