Thursday, 12 December 2013

apt-get conflicting with IPv6

Setting up ipv6 can cause the server to connect to security.debian.org via its IPv6 address by defaultrather than using ipv4. And this will results in having to wait for a lengthy timeout whenever downloading/updating of any sort.

For this we will need to convince apt to use IPv4.. Below is how it is done

Edit /etc/gai.conf
Search for entry "precedence ::ffff:0:0/96  100"
Usually this will be commented , just remove the hash and that will do the trick..
=============
More details
Case 1: Prefer IPV4
Append the following to /etc/gai.conf
precedence ::ffff:0:0/96  100
Case 2: Prefer IPV6
If we append
precedence 2001:470::/32 100
=============

No comments:

Post a Comment