Disabling IPv6 in Debian Sid

Note to self: since the Debian Kernel Team in all their infinite wisdom decided to compile statically the IPv6 modules, all the alias-meh and blacklist tricks to disable it are useless. What the pundits out there have missed since the beginning of time (or close to it: the inclusion of the IPv6 code in Linux 2.5/2.6) is the sysctl magic thingy to disable it.

Open /etc/sysctl.conf in your favorite editor and type the dark rune:

net.ipv6.conf.all.disable_ipv6 = 1

save and reboot. (I don’t recommend changing this setting on a running system, it can have unexpected side effects).

CAVEAT LUSER: Yes Joe, this works in Ubuntu as well as any GNU/Linux® distro that integrates sysctl in its init system.