How To Disable IPv6 In Ubuntu

30. April, 2012

If you’re getting errors from squid or your web browser with some weird IP address, chances are that squid is trying to connect to a server which supports IPv4 and IPv6.

To disable IPv6 on Ubuntu (also Kubuntu), add this line to the end of /etc/sysctl.conf:

net.ipv6.conf.all.disable_ipv6 = 1

Restart your computer or reload sysctl.conf by executing: sudo sysctl -p

To check, run: ip a | grep inet6

When IPv6 is disabled, this will give no output.

Source: Quick Tip: How To Disable IPv6 In Ubuntu For Better Internet Speed