Linux disable ipv6

From vpsget wiki
Jump to: navigation, search

It's possible to simpy disable ipv6 if you have any issues , but it's more preferred to to set the precedence to ipv4 instead of mostly systems default ipv6 protocol. See details:

To disable ipv6 edit file /etc/sysctl.conf,

 vi /etc/sysctl.conf

Add the following lines:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

Save and apply settings:

sysctl -p

You may also simply run these commands:

echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6


sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1

This should work on mostly all linux related distros . Tested on Centos and Ubuntu.