Tagged: ipv4

IPv4 for APT

Ref: http://unix.stackexchange.com/a/13263/20241

At times, apt may try IPv6 to resolve a domain name. In which case, it may not be desirable and sometimes, it just doesn’t work for that particular server. So, to let apt to use only ipv4 for DNS resolution…

Edit /etc/gai.conf

uncomment the following line…

precedence ::ffff:0:0/96 100

If the above line doesn’t exist, just insert it at the bottom or at the top of the file!

Verify the changes with the command (before and after the changes)…

telnet security.ubuntu.com

Advertisements