Debian — как запретить использование IPv6

How to turn off IPv6

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). Alternately, try setting AddressFamily inet in /etc/ssh/ssh_config (ie the client program’s config file).

  • In exim4:
    • put disable_ipv6 = true into your exim configuration file

    • run update-exim4.conf

    • then restart service 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

Swisscom DSL with the latest netopia router will not work with Lenny out of the box. For example SSH only works the -4 option despite

Are there really dirty hacks as in http://osdir.com/ml/debian-user-german-debian/2009-07/msg00516.html needed?

Leave a Reply