Deactivate IPv6

From Bitbull Wiki
Jump to navigation Jump to search
Debian kernel 2.6/Ubuntu/Fedora Core

In /etc/modprobe.d/aliases, change the line

alias net-pf-10 ipv6

to

alias net-pf-10 off
alias ipv6 off

Reboot

Debian kernel 2.6/Ubuntu

In /etc/modprobe.d/blacklist, add a line

blacklist ipv6

Reboot

RHEL/CentOS

In /etc/modprobe.conf, make sure you have

alias net-pf-10 off
alias ipv6 off
sysctl -a | grep disable_ipv6 | sed 's/0$/1/g' > /etc/sysctl.d/disable-ipv6.conf

In /etc/sysconfig/network, add a line

NETWORKING_IPV6="no"

Reboot

Gentoo

In /etc/modules.d/aliases, make sure you change

alias net-pf-10 ipv6

to

alias net-pf-10 off
alias ipv6 off

Reboot

  • copy paste RHEL7
echo '#disable ipv6
alias net-pf-10 off
alias ipv6 off
' > /etc/sysctl.d/01-disable-ipv6.conf
sysctl -a | grep disable_ipv6 | sed 's/0$/1/g' > /etc/sysctl.d/disable-ipv6.conf
grep NETWORKING_IPV6 /etc/sysconfig/network || echo 'NETWORKING_IPV6="no"' >> /etc/sysconfig/network
grep NETWORKING_IPV6 /etc/sysconfig/network || echo 'NETWORKING_IPV6="no"' >> /etc/sysconfig/network
sed -i 's/NETWORKING_IPV6=.*/NETWORKING_IPV6="no"/' /etc/sysconfig/network
grep NETWORKING_IPV6 /etc/sysconfig/network
reboot

NOTES:

  • In distros using /etc/modprobe.conf, beware that you might get overriden by /etc/modprobe.conf.local or by /etc/modprobe.d/*.
  • If you disable IPv6, I suppose you don't need tunnels either. You could also add there:
 install sit0 /bin/true
  • A last "anti-IPv6" issue: don't forget the old trick of checking if your Firefox has IPv6 disabled:
    • CTRL+L, about:config (Enter)
    • Filter by ipv6.
    • Set network.dns.disableIPv6 to true.