msgbartop
MAC OS X, Linux, Windows and other IT Tips and Tricks
msgbarbottom

17 Oct 16 Preferring use of ipv4 instead of ipv6 for DNS IP resolution in Debian

The last time I did an apt-get update in a specific Debian Wheezy I could not connect to the repositories because apt was preferring to use the IPv6 first. So here is a simple solution to system-wide add a preference to ipv4 in DNS IP resolution:
Edit the file /etc/gai.conf and add the following line at the end of the file:
precedence ::ffff:0:0/96 100

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: