How to disable IPv6 on Ubuntu

In this post, I will show you disabling IPv6 on your Ubuntu machine. Before going further, let’s check the current status of the IPv6 on your machine.

To check the status, open up the terminal and enter the following command /proc/sys/net/ipv6/conf/all/disable_ipv6 if the return value is 1, then IPv6 is already disabled and if the return value of 0 it means IPv6 is active.

If IPv6 is active you have to do following changes to disable it.

Step 1: Open the file /etc/sysctl.conf in your text editor of choice.
Step 2: At the end of sysctl.conf, add the following three lines:

Step 3: Now run sudo sysctl -p to update to reconfigure the kernel parameters with the new values set in the previous step.

Now again you can run following command to check the current status, now it should return 1 indicating that IPv6 has been disabled.

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

Arjun
I am Arjun from Hyderabad (India). I have been working as a software engineer from last 7+ years, and its my passion to learn new things and implement them as a practice. Aside from work, I likes gardening and spending time with pets.
DMCA.com Protection Status