Why do you want to disable IPv6 on Linux systems?

There is some unfortunate situation, when enabling IPv6 slow down the network operations. The reason of problem comes from Bad or No IPv6 connectivity:

How can you disable IPv6 in Linux?

If the ipv6 module is loaded in in a Linux 2.6 based system, then the IPv6 support is enabled. That is good, but if you have got an ISP which does not offer IPv6 connectivity then you can reach sites which support both IPv4 and IPv6 only after a long timeout: your system tries to reach the other site over IPv6 and only after failing tries over IPv4 as well. By disabling IPv6 completely, you could get rid of the annoying timeout problem.

Unfortunately in spite of being a module, the ipv6 module cannot be removed from a running system: you must ensure it does not get loaded in at boot time.

In order to disable the ipv6 module, in /etc/modprobe.d/aliases change the line

alias net-pf-10 ipv6

to

alias net-pf-10 off
alias ipv6 off

After doing so, reboot the system.

However in some systems it is not enough because sub-modules directly load in the ipv6 module. If that is your case then you can block to load in the module by adding the line

blacklist ipv6

to the file /etc/modprobe.d/blacklist. You have to reboot again and then IPv6 will be disabled in your system.

Campus6: IPv6hostslinux_disableIPv6 (last edited 2008-04-10 15:29:34 by localhost)