Vincent Lefevre <vinc...@vinc17.net> writes: > On 2023-03-27 12:48:13 +0100, Richmond wrote: >> I have configured an ipv6 tunnel. If I visit this site: >> >> http://ip6.me/ >> >> The "normal" test shows my ipv4 address, and the: >> >> http://ip6only.me/ >> >> shows the ipv6 address. >> >> However if I switch my DNS from opendns to the one provided by my ISP >> and then run the "normal" test it shows the ipv6. >> >> The note says: >> >> (preference depends on your OS/client) >> >> So how is the preference determined? It seems to be determined by the >> DNS, but why or how do I tell for example with host -v? > > It appears to be random (based on past tests). > > But one can set the preference via "/etc/gai.conf". In particular: > > # For sites which prefer IPv4 connections change the last line to > # > #precedence ::ffff:0:0/96 100 > > I had to uncomment this line in the past when I had IPv6 issues.
I uncommented the table and changed the 2002 to 2001 and that seems to have prioritized ipv6 but it's a bit of guesswork for me: precedence ::1/128 50 precedence ::/0 40 precedence 2001::/16 30 precedence ::/96 20 precedence ::ffff:0:0/96 10 Now if I go to google.com for example, ipvfoo (extension for chromium) tells me I am using ipv6.