< FrankJS />

How to Disable IPv6 in Ubuntu

  1. 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!

  2. We will make a change to sysctl.conf by entering sudo nano /etc/sysctl.conf in a terminal. This opens sysctl.conf for editing with the editor ‘nano’.

  3. Now scroll down to the end of sysctl.conf, create a new line, and add the following: net.ipv6.conf.all.disable_ipv6 = 1

  4. Restart your computer or reload sysctl.conf by running command: sudo sysctl -p

  5. To check whether it has been disabled or not, run following command in a terminal:

    ip a | grep inet

  6. If 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.

Frank J Santaguida, 2022