Sunday, November 24, 2013

How To Disable IPv6 On CentOS 6, RHEL 6

Since not everyone has access to IPv6 and leaving it enabled when not in use is a waste of resources, you an disable IPv6 via the following.

Add the following to /etc/sysctl.conf:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
To disable it on a running system, without reboot:
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6