I have a OSX El Capitain (10.11.2) host that has only IPv6 connectivity. The network uses NAT64 and DNS64 to provide access to legacy IPv4 hosts on the internet. The problem is that when looking up a hostname most tools (at least Curl, and Ruby's Net::HTTP) will try to connect to an IPv4 address despite there not being IPv4 connectivity.
How do I stop this?
From what I can see a few ideas:
1) Somehow prevent DNS A records being received by the host. I think this may be possible to do if I write a Python filter module for unbound.
2) Somehow disable the Happy Eyeballs algorithm so that the host does not attempt to use IPv4 if an A record comes back quicker than an AAAA record.
3) Somehow disable IPv4 in the kernel somehow.
The problem will manifest itself in that then I try to download something over HTTP via a Ruby script or try to download something with Curl then it will intermittently fail due to Happy Eyeballs receiving the DNS A record before the AAAA record.
Any ideas?
-Matt