How to turn off IPv6 in Debian
In squeeze
-
Disable ipv6 in kernel : echo net.ipv6.conf.all.disable_ipv6=1 > /etc/sysctl.d/disableipv6.conf will disable ipv6 at next reboot.
-
fetchmail will stop sending dns AAAA queries.
-
If you've built a custom kernel with IPv6 as a module be aware that due to a race condition with the init scripts you'll need to load the ipv6 module before the procps init script is run (see /usr/share/doc/procps/README.Debian and 507788)
-
You will probably need to comment-out any IPv6 address in /etc/hosts (especially the one for loopback) otherwise ssh will fail to forward ports (or you must always use -4 to ssh).
-
-
In exim4:
-
put disable_ipv6 = true into your exim configuration file
-
run update-exim4.conf
-
then restart exim4
-
-
In sshd:
-
put AddressFamily inet into /etc/ssh/sshd_config
-
restart sshd: /etc/init.d/ssh restart
-
-
Change /etc/avahi/avahi-daemon.conf to say use-ipv6=no