HOWTO: Disable IPv6 on Debian & Ubuntu

To disable IPv6, edit /etc/sysctl.conf, add the following lines to the end of the file:

## Disable IPv6, added 2020-10-24 by APW
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

Next, edit /etc/rc.local and insert the following before the existing "exit 0" line:

## Disable IPv6, added 2020-10-24 by APW
service procps reload

After rebooting the machine, an "ifconfig" should no longer show any IPv6 addresses.

Powered by BetterDocs

Leave a Reply