Pages

Thursday, June 8, 2017

Disable IPv6 on Ubuntu

Disable IPv6 on Ubuntu


Edit your /etc/sysctl.conf file and add the following to the bottom:
#disable ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Or you can use the following script:
echo "#disable ipv6" | sudo tee -a /etc/sysctl.conf
echo "net.ipv6.conf.all.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
echo "net.ipv6.conf.lo.disable_ipv6 = 1" | sudo tee -a /etc/sysctl.conf
For this changes to take effect you must reboot your system.
After rebooting you can check if IPv6 has been disabled with the following command:
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
0 means its enabled and 1 - disabled.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.