Can one disable the IPv6 stack on Debian Linux, especially Wheezy? If so how do I know if it's disabled on a system?
2 Answers
To check if IPv6 is disabled through sysctl :
sysctl -a | grep disable_ipv6 If the output of above command shows configuration lines with ...disable_ipv6 = 1 then IPv6 is disabled.
To enable IPv6, edit the /etc/sysctl.conf file:
nano /etc/sysctl.conf - and then edit+change the
1into0for below system configurations, and add below lines if does not-exist in the/etc/sysctl.conffile:net.ipv6.conf.all.disable_ipv6 = 0 net.ipv6.conf.default.disable_ipv6 = 0 net.ipv6.conf.lo.disable_ipv6 = 0 net.ipv6.conf.eth0.disable_ipv6 = 0 - additionally also add these configuration lines (if does not pre-exist), to enable manual configurations of IPv6:
net.ipv6.conf.all.autoconf = 0 net.ipv6.conf.all.accept_ra = 0 net.ipv6.conf.eth0.autoconf = 0 net.ipv6.conf.eth0.accept_ra = 0
Yes, you can:
echo net.ipv6.conf.all.disable_ipv6=1 > /etc/sysctl.d/disableipv6.conf sysctl --system But you might need to do several other things, as described in the related article in the Debian wiki. The description for squeeze should still be valid for Wheezy.