分类: LINUX
2009-11-13 11:16:19
Release Found: Red Hat Enterprise Linux 4 and later
Red Hat Enterprise Linux 4 and 5 enable Internet Protocol Version 6 (IPv6) by default. However, in certain situations, some users may find it desirable to disable IPv6 support.
Disabling IPv6 Support Red Hat Enterprise Linux 4
If the following line exists in the /etc/modprobe.conf file, remove it:
alias net-pf-10 ipv6
Add the following line to the /etc/modprobe.conf file:
alias net-pf-10 off
Reboot the system to disable IPv6 support.
Re-enabling IPv6 Support Red Hat Enterprise Linux 4
Remove the following line from the /etc/modprobe.conf file.
alias net-pf-10 off
You must reboot the system to activate IPv6 support.
Disabling IPv6 Support Red Hat Enterprise Linux 5If the following line exists in the /etc/modprobe.conf file, remove it:
alias net-pf-10 ipv6
Add the following line to the /etc/modprobe.conf file:
alias net-pf-10 off
In versions of Red Hat Enterprise Linux before 5.4, add the following line to the /etc/modprobe.conf file:
alias ipv6 off
In Red Hat Enterprise Linux 5.4 and later, add the following line to the /etc/modprobe.conf file:
options ipv6 disable=1
To prevent errors during the network initscript start routine, change the NETWORKING_IPV6 parameter in the /etc/sysconfig/network file to the following:
NETWORKING_IPV6=no
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
Once both the alias net-pf-10 off and alias ipv6 off lines are present in the /etc/modprobe.conf file and NETWORKING_IPV6=no is set in the /etc/sysconfig/network file, reboot the system to disable IPv6 support.
Re-enabling IPv6 Support Red Hat Enterprise Linux 5
To re-enable IPv6 on Red Hat Enterprise Linux 5 systems, remove the following lines from the /etc/modprobe.conf file:
alias net-pf-10 off
alias ipv6 off
Set the following parameter in the /etc/sysconfig/network file:
NETWORKING_IPV6=yes
Re-enable ipv6tables by issuing the following command:
chkconfig ip6tables on
You must reboot the system to activate IPv6 support.
注意:
对于RHEL5.3,它默认的内核是2.6.18-128.el5,如果升级了内核到2.6.18-164.el5或者2.6.18-164.6.1.el5,则IPv6的禁用方法和RHEL5.4一样,即在/etc/modprobe.conf文件中用options ipv6 disable=1替代alias ipv6 off