Disable IPv6 in CentOS

From KlavoWiki
Revision as of 01:16, 17 August 2015 by David (talk | contribs) (Created page with "Apparently it is not recommended to per se disable IPv6 in CentOS. What we can do is unbind IPv6 from the network card. <pre> /etc/sysctl.conf </pre> Add the following lines...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Apparently it is not recommended to per se disable IPv6 in CentOS. What we can do is unbind IPv6 from the network card.

/etc/sysctl.conf

Add the following lines

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

The above will be in effect after a reboot.

To unbind IPv6 on the system without a reboot and a temporary unbind until a reboot is performed.

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