linux poison RSS
linux poison Email

How to disable ipv6 in Ubuntu Linux

IPV6 got many new exciting features but if you are not on an IPV6 network, I don't think there is any benefit to having this protocol enabled.

First, check if IPv6 is enabled by running the following command. If the output is 0, it means its enabled. If it’s 1, then its disabled already.
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
So, to disable ivp6 you need to add the following entries into your /etc/sysctl.conf file

#disable ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Moreover it's also a good idea to disable loading of ivp6 module into kernel durning booting, to disable the ivp6 module you need to add following entry into your /etc/modprobe.d/blacklist.conf file
# Disable IPV6
blacklist ipv6


3 comments:

Anonymous said...

Or you can add ipv6.disable=1 to /etc/default/grub

something like this
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
And run update-grub - after reboot you will have system without ipv6 -cy

Anonymous said...

Is there a con for keeping it enabled?

Anonymous said...

@Anonymous above me

Some people experience slow network connections with IPv6 enabled. If you don't experience this, there are no cons whatsoever to leaving it enabled.

Post a Comment

Related Posts with Thumbnails