How to disable/enable IPv6 support in RHEL 6

Disabling IPv6 support in Red Hat Enterprise Linux 6
 
Create a file /etc/modprobe.d/ipv6.conf with the following contents:

options ipv6 disable=1

For completeness, it is a good idea to configure the ip6tables service not to start at boot by issuing the following command:


chkconfig ip6tables off

Reboot the system to disable IPv6 support.


Re-enabling IPv6 support in Red Hat Enterprise Linux 6


Review the files under /etc/modprobe.d/ and remove (or comment out) any of the following lines:

options ipv6 disable=1
install ipv6 /bin/true
blacklist ipv6

Configure the ip6tables service to start at boot by issuing the following command:

chkconfig ip6tables on

Reboot the system to activate IPv6 support.