This article is available in French and German.
Red Hat-based distributions
Here's how to disable the protocol on a Red Hat-based system:
- Open a terminal window.
- Change to the root user.
- Type these commands:
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
sysctl -w net.ipv6.conf.tun0.disable_ipv6=1
- To re-enable IPv6, type these commands:
sysctl -w net.ipv6.conf.all.disable_ipv6=0
sysctl -w net.ipv6.conf.default.disable_ipv6=0
sysctl -w net.ipv6.conf.tun0.disable_ipv6=0
sysctl -p
Debian based distributions
Here's how to disable the protocol on a Debian-based machine.
- Open a terminal window.
- Type this command:
sudo nano /etc/sysctl.conf
- Add the following at the bottom of the file:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.tun0.disable_ipv6 = 1
- Save and close the file.
- Reboot the device.
- To re-enable IPv6, remove the above lines from
/etc/sysctl.conf
and reboot the device.