CentOS – how to disable IPv6 without restart

In case you need to disable IPv6 and cannot afford to restart here are the commands to quickly do it for CentOS:

echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf

sysctl -p

Tagged with: ,

Leave a Reply