Disable IPv6 on Redhat RHEL5

This post describes how to disable IPv6 on a Redhat (RHEL5) installation. I haven’t had the time to test it on other version of Redhat.

Edit /etc/sysconfig/network and change

NETWORKING_IPV6=no

Edit /etc/modprobe.conf and add these lines

alias net-pf-10 off
alias ipv6 off

Stop the ipv6tables service

# service ip6tables stop

Disable the ipv6tables service

# chkconfig ip6tables off

IPv6 will be disabled after the next reboot.

Edit
This also works on RHEL6/CentOS6