howto disable ipv6 in old debian linux

If you use good old IPv4 instead of IPv6 for your network connection and dont wanna play with iptables6 or leave ipv6 wclasse open, you should disable IPv6.

This also frees about 200mb of RAM!

This howto applies to at least Debian Etch and Debian Sarge with kernel 2.6

Disabling IPv6 in the kernel

First you'll need to edit a couple of configuration files. If »/etc/modprobe.d/aliases« is present, look for this line:

alias net-pf-10 ipv6

Change it to this (with that one extra line):

alias net-pf-10 off
alias ipv6 off

If »/etc/modutils/aliases« is present, look for this line, uncomment it and add that one extra line:

# alias net-pf-10 off
alias ipv6 off

Now, IPv6 has been disabled in the kernel. Execute the following command and reboot:

# update-modules

You can safely wipe out any IPv6 reference in »/etc/hosts« and »/etc/network/interfaces«