How to Disable IPv6 in Ubuntu
Start by checking whether your Internet connection makes use of IPv4 and/or IPv6. Go to http://ip-lookup.net/ and click on Conversations (It’s a bit down the page, not on the main header). I say this because if your computer is not making use of IPv4, then disabling IPv6 may not be very helpful!
We will make a change to
sysctl.confby enteringsudo nano /etc/sysctl.confin a terminal. This openssysctl.conffor editing with the editor ‘nano’.Now scroll down to the end of
sysctl.conf, create a new line, and add the following:net.ipv6.conf.all.disable_ipv6 = 1Restart your computer or reload
sysctl.confby running command:sudo sysctl -pTo check whether it has been disabled or not, run following command in a terminal:
ip a | grep inetIf the terminal does not show any outputted lines like
inet6 2602:42:803:675f:b437:c43:7c68:2afa..then it appears IPv6 is disabled. You can also visit http://ip-lookup.net/ again to look for different results from your changes.