I'm currently trying to access a computer, over an OpenVPN tunnel, by addressing it on IPv6. I've also registered an A and AAAA record on my private DNS server. On both sides of the tunnel, I want to still be able to run IPv4. The reason is that I rely on DHCP + PXE a lot and have quite a few legacy devices that aren't EFI, and I would like to still address these by the same FQDN. What I don't want, is to be able to route IPv4 over the tunnel, I managed this by not creating an IPv4 route for the tunnel; only for IPv6
Long story short, I'm fully able to ping6 the computer on the other end of the tunnel, as well as SSH'ing on the IPv6 address.
However, what does not seem to work (as expected) is to prefer IPv6 when using DNS. I noticed both records get returned, but there's no program that seems to prefer the IPv6 AAAA-record, they all want to use the IPv4 address (only when I'm lucky, the application will retry using the AAAA-record with the gift of 60 seconds timeout). I always thought that IPv6 is preferred if my network supports it. Perhaps I have misconfigured my system?
I have tried to re-order my DNS records, hoping
Details
- OS: CentOS 7
- DNS-sofware: BIND9
- IPv6: 2000::/48
- IPv6 route for 2000::/48 to tunnel created and working as expected
- A and AAAA records created and working
/etc/gai.conf
. If it exists, delete it.