Turn off IPv6 CentOS and CSF
If you are running csf on your CentOS server and run the server security check you may have seen the following message:
Check for IPv6: IPv6 appears to be enabled [ifconfig: ]. If ip6tables is installed, you should enable the csf IPv6 firewall (IPV6 in csf.conf). To disable IPv6 on RHEL/CentOS you should follow this link.
Upon following the link you end up at the login screen for access.redhat.com. Even after creating an account viewing the link requires a subscription. Seems a little odd that a subscription is required to find out how to disable IPv6…
So, here is how you do it:
- Log into the server as root
- Type in the following:
# touch /etc/modprobe.d/disable-ipv6 # echo "options ipv6 disable=1" >> /etc/modprobe.d/disable-ipv6
Note: Slightly different prior to the 5.4 update. For more information on the above see this link on the centos wiki. Its a bit more helpful than the link provided in the csf notes.
- Restart the server