This here is basically just a copy of the "How to turn off IPv6" section on the Debian Wiki:
1) Edit /etc/sysctl.conf
and add the following parameters to kernel:
Code: Select all
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Optional: If you want to only disable it on specific ones, you can use a syntax like this:
Code: Select all
net.ipv6.conf.eth0.disable_ipv6 = 1
2) Apply changes:
After editing sysctl.conf, you should run sysctl -p to activate changes or reboot system.
That's it.