Disabling IPv6 under a 2.6 kernel

Posted by chris on Mon 26 Jun 2006 at 08:37

Sometimes you might have a host which you wish to disable IPv6 upon, this can be useful if you're having DNS timeouts when software attempts to resolve hostnames, and for other reasons.

To disable IPv6 it should be as simple as adding the lines

alias net-pf-10 off
alias ipv6 off

to /etc/modprobe.d/00local (creating the file if it exists).

It is important that this comes in a file earlier in an alphanumeric sort than aliases since that contains aliases that turn this on.

Once you've made this change/addition you will need to restart the box afterwards - since the modules won't unload.

Note: Rumours reach me (thanks Steve) on the following about KDE. Since I don't run KDE I can't confirm this part (it looks like it controls apps in KDE - but if the protocol is not loaded at the kernel level then I can't see why it should be necessary - but just in case ...).

According to this link there is another step: http://ubuntuforums.org/archive/index.php/t-77686.html

"Google finally revealed that you must add 
    KDE_NO_IPV6=true 
    to /etc/environment."


This article can be found online at the Debian Administration website at the following bookmarkable URL (along with associated comments):

This article is copyright 2006 chris - please ask for permission to republish or translate.