IPv6: Complete Removal, IPv4 Only on Debian
Introduction
When installing a new Debian 4.0 distribution, IPv6 support is enabled by default. This can cause some problems or even simply slow down your system. Indeed, all applications will use IPv6 support for name resolution before or after trying with IPv4.
Method 1
This is the case for mplayer used to read an audio or video stream:
There is a simple method to disable IPv6 support. You just need to prevent the system from loading the corresponding module. Edit the file /etc/modprobe.d/blacklist
and add the line:
Then edit your /etc/hosts
file to remove IPv6 entries.
Method 2
Another solution (less elegant in my opinion) is to modify /etc/modprobe.d/aliases
from:
to:
You just need to restart the system (this is not strictly necessary, it is possible to do otherwise, but it is much simpler, especially after an installation). A quick ifconfig will confirm that IPv6 is no longer managed (no more inet6 addr:).