« Πλαστογραφημένες δικτυακές αιτήσεις

Kippo-Graph 0.9.1 - Google Map fix »

Jan 21 2014

Make apt-get use IPv4 instead of IPv6

It seems that Ubuntu/Debian (or perhaps other distros as well) prefer IPv6 DNS records instead of IPv4 when applicable and some times this results in loss of connectivity or similar problems.

I ran into this issue today while trying to update an old VPS with apt-get/aptitude. Specifically, security.ubuntu.com was being resolved in an unreachable IPv6 address and I had to wait some minutes for timeout every time.

Fortunately, there is an easy fix for this; you just have to edit the file located at: /etc/gai.conf which is the configuration for getaddrinfo(). There you have to uncomment line ~54 which reads: “precedence ::ffff:0:0/96  100″, and you are all set! (assuming that every other option is commented out by default as in my case).

  • LoneSwimmer

    Thanks very much. When will the change take effect, next IP lease or would it be easier to just restart?

Powered by WordPress and the Graphene Theme.

More in General News
BlackHat USA 2012 - Owning Bad Guys (and Mafia) with Javascript Botnets
Christiaan008: The Honey project and CIC News Engine
Disable mod_security with htaccess
Honeypot Workshop @ BruCON 2013
How to resize an EC2 root partition
Close