I know there's a wiki entry http://wiki.debian.org/DebianIPv6#How_to_turn_off_IPv6 that shows how to disable IPv6 in Debian Squeeze, but that's a 2.6.* kernel.
What about 3.2.* kernels running Wheezy?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityI know there's a wiki entry http://wiki.debian.org/DebianIPv6#How_to_turn_off_IPv6 that shows how to disable IPv6 in Debian Squeeze, but that's a 2.6.* kernel.
What about 3.2.* kernels running Wheezy?
If you do sysctl -p
, the reboot isn't necessary. It worked for me, but I prefer to keep params in single file, so I put the line above in the sysctl.conf
file.
Just to be sure, I put a line about every device, so my solution is adding the following lines to /etc/sysctl.conf
:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.eth0.disable_ipv6 = 1
net.ipv6.conf.eth1.disable_ipv6 = 1
net.ipv6.conf.ppp0.disable_ipv6 = 1
net.ipv6.conf.tun0.disable_ipv6 = 1
net.ipv6.conf.all.disable_ipv6 = 1
enough? At least iIt did the trick for all interfaces on my machine.
Apr 16, 2015 at 23:14
net.ipv6.conf.all.disable_ipv6
didn't work; adding an explicit line for my adapter did the trick!
net.ipv6.conf.all.disable_ipv6
; had to use a line specific for my adapter like this: net.ipv6.conf.enp6s0.disable_ipv6 = 1
Disabling IPv6 on more recent systems works the same way as described in the Debian wiki:
Disable ipv6 in kernel :
echo net.ipv6.conf.all.disable_ipv6=1 > /etc/sysctl.d/disableipv6.conf
will disable ipv6 at next reboot.
Keep in mind that, whatever problem you are having, this should be an absolute last resort after you have exhausted all other options for fixing the problem. IPv6 is not optional and you will have to turn it back on sooner or later.
The most effective way to disable IPv6 is to add the kernel parameter ipv6.disable=1
.
This is typically done in /etc/default/grub
in the following line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet ipv6.disable=1"
You need to run update-grub
after you have changed the file.
/sys/module/ipv6/parameters/disable_ipv6
but/etc/sysctl.d/disableipv6.conf