How to Disable IPv6 on Ubuntu 16.04 and Ubuntu 17.04

Disable IPv6 on Ubuntu – Now a days, We’re commited to Internet for Each and Every activity. Currently we are using IPv4 and IPv6 is the Future of the Internet. In this Tutorial we are going to discuss about disabling ipv6 on ubuntu.

Disable IPv6 on Ubuntu

Follow the Below steps to Disable IPv6 on Ubuntu

I’m a huge fan of Nano Text editor which is available as inbuilt into the terminal. So i gonna use it !! You can use your favourite text editor for this.

What is IPv6 ?

Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet. IPv6 was developed by the Internet Engineering Task Force (IETF) to deal with the long-anticipated problem of IPv4 address exhaustion. IPv6 is intended to replace IPv4. (Source: Wikipedia.com)

Checking IPv6 is Enabled or Not

Let’s start with Terminal. Open your terminal and Run the below command

cat /proc/sys/net/ipv6/conf/all/disable_ipv6

if the above command returns the value then IPv6 is currently active on your system. In Case it returns 1 it’s already disabled.

In my System it’s already disabled so it’s showing 1.

disable ipv6 on Ubuntu

Disable IPv6 on elementary os

Editing configuration file

 Now the below command requires super user Root permission to edit the file. Enter the Below command and Press enter. My Favourite editor is Nano. You can also use gedit, Bluefish.

sudo nano /etc/sysctl.conf
disable ipv6 on Ubuntu

Editing configuration file

Adding Code to the Configuration file

Paste the Below command at the end of the file.

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1" | sudo tee /etc/sysctl.d/99-my-disable-ipv6.conf

If you’re using Nano editor Press Ctrl+x to save the file.

 

 

Applying the Currect Configuration

Run the Below command to make the changes take effect. which requires root permission.

sudo service procps reload
disable ipv6 on Ubuntu

Applying the Currect Configuration

 

Check the Result

Run the Below command to check whether IPv6 is disabled or not.

cat /proc/sys/net/ipv6/conf/all/disable_ipv6

If it is disabled, It will return the output 1. Otherwise 0

disable ipv6 on Ubuntu

Conclusion

That’s All !! You have Successfully disabled IPv6 on your Ubuntu Computer.

I Hope this method worked well for you. If you have any doubts kindly ask in the Comments Below.

Want to Contribute something to Us ? Tweet this Article  🙂

Disable IPv6 on Ubuntu 16.04 & Ubuntu 17.04. Click Here to TweetClick To Tweet

 

Was this article helpful?

Thanks

Thanks for your Feeback. It will helps us to improve our Article quality




0 Shares
+1
Tweet
Share
Stumble