October 22, 2020

CentOS 6 Disable IPv6

Here is how I am automating disabling IPv6 on CentOS 6.

Any recommendations? This appears to work.

# CentOS 6 disable ipv6
lsmod | grep ipv6
echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf
echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
sysctl -p
echo "install ipv6 /bin/true" > /etc/modprobe.d/ipv6_disabled.conf
service ip6tables stop
chkconfig ip6tables off
lsmod | grep ipv6

babul

Father of 4, Enterprise IT Architect Consultant - also love music, food, spirits, and the great outdoors.

View all posts by babul →

Leave a Reply

Your email address will not be published. Required fields are marked *