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."
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
blacklist ipv6
in the same file (to prevent changes at upgrades).
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
s/alias net-pf-10 ipv6/alias net-pf-10 off
is equally effective. If not more so.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
sysctl -w net.ipv6.conf.all.disable_ipv6=1
at some suitable time during system startup. For example placing it in a script under /etc/network/if-pre-up.d seems to work.
[ Parent | Reply to this comment ]
error: "net.ipv6.conf.all.disable_ipv6" is an unknown key
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
Works with my fresh installed squeezy/sid system.
[ Parent | Reply to this comment ]
AND: WHY IS NONE OF THEM WORKING?????
What kind of SH*T is it to make such a sh*tty system?!
I DON'T WANT THIS SH*TTY IPv6 piece of sh*t!
Why can't I disable it??????????? Why not????????!!!!!!!!
[ Parent | Reply to this comment ]
Of course in 'make menuconfig' disabling ipv6...
A stone-age method...
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
Just add this option to your kernel boot line:
ipv6.disable=1 (Press e to edit at the grub boot screen ...)
If you like that, you can put this in /etc/default/grub:
GRUB_CMDLINE_LINUX="ipv6.disable=1"
and then run update-grub
[ Parent | Reply to this comment ]
ie. in netstat I can still see ipv6
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]