Pages

Wednesday, December 7, 2011

Disable IPv6 in Linux


Before Disabling IPv6


Ensure you do not require ipv6. Some common modules that use ipv6 are:
rdma_cm, ib_addr, bnx2i, cnic

Configuration Changes to Disable IPv6

To disable ipv6 and prevent the module from loading, the following configuration files require changes:

[1] In RHEL 5 / OEL5 and earlier
/etc/modprobe.conf:

alias net-pf-10 off
alias ipv6 off
options ipv6 disable=1
# Will load true instead of ipv6 module
install ipv6 /bin/true

In RHEL 6 / Oracle Linux 6:
/etc/modprobe.conf is deprecated. Instead add a conf file with any name in /etc/modprobe.d, like:
/etc/modprobe.d/disable_ipv6.conf, with the following content:
alias net-pf-10 off
options ipv6 disable=1
install ipv6 /bin/true


[2] /etc/sysconfig/network:
NETWORKING_IPV6=no

Reboot for Changes to Take Effect


Verify that IPv6 Module is Not Loaded


The following command should not return anything:
/sbin/lsmod | grep ipv6

No comments:

Post a Comment