Skip to main content

Howto disable IPv6 Stack Ubuntu Linux

Sometimes network infrastructures are misconfigured to use ipv6 stack. Then you want to disable it at all. For ubuntu distribution it is easy as changing sysctl.conf and reboot your machine. Here is how to do it.

First check whether it is enabled or not:
$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6
if output is 0 it is enabled and 1 it is disabled.

Adding the following rows is enough to disable ipv6 stack then restart your computer to take effect:
# vi /etc/sysctl.conf
net.ipv6.conf.lo.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.all.disable_ipv6 = 1
# shutdown -r now


When your computer is up again, you can check it:
$ cat /proc/sys/net/ipv6/conf/all/disable_ipv6


Comments

Popular posts from this blog

Find and replace with sed command in Linux

Find and replace feature is always handy. It can turn into a torture when it comes to change or delete a simple constant string in a text file. There is a handy tool in linux for doing these kind of tihngs. Actually sed is not a text editor but it is used outside of the text file to make changes.