tested successfully under Rhel 5
How to disable IPv6 under Linux:From: Yangzhigang blog (http://yangzhigang.cublog.cnWhat I do here is Redhat Linux, in the system ifconfig or Netstat-an will show IPV6 results, such as: [[email protected] conf]# ifconfig
eth1 Link encap:ethernet HWaddr 00:15:c5:ef:74:1c
inet addr:192.168.102.22 bcast:192.168.102.255 mask:255.255.255.0
Inet6 addr:fe80::215:c5ff:feef:741c/64scope:link [[email protected] conf]# netstat-ant
Active Internet connections (servers and established)
Proto recv-q send-q Local address Foreign Address
TCP 0 576: : ffff:192.168.102.22:22:: ffff:192.168.12.100:3339Established
TCP 0 0: : ffff:192.168.102.22:80:: ffff:192.168.102.25:36479Time_wait
TCP 0 0: : ffff:192.168.102.22:80:: ffff:192.168.102.25:36503Time_wait in the IPV6 is not widely used, this is somewhat inconvenient, then in
Redhat The method of prohibiting IPV6 under LinuxIt's also easy:
vi/etc/modprobe.conf, add the following two line parameters,
alias net-pf-10 off
Alias IPv6 offThen reboot. (Note: After restarting with service network restart), ifconfig or netstat-ant can only display IPV4 address information. For other systems, you can refer to the following documents: Here's the summary of what I can think of, with alternate methods in case the first one doesn ' t work with You:
• Debian kernel 2.4:
- In /etc/modutils, change the Linealias net-pf-10 Ipv6toalias net-pf-10 off
Alias IPv6 off
- Reboot.
|
• Debian kernel 2.6/ubuntu ("official" method)/fedora Core (Method 1):
- In /etc/modprobe.d/aliases, change the Linealias net-pf-10 ipv6to
Alias net-pf-10 off Alias IPv6 off
- Reboot.
|
• Debian kernel 2.6/ubuntu (alternate method):
- In /etc/modprobe.d/blacklist, add a lineblacklist ipv6
- Reboot.
|
• Rhel/centos:
- In /etc/modprobe.conf, make sure you havealias net-pf-10 off
Alias IPv6 off
- Reboot.
|
• Rhel/centos/fedora Core (Method 2)/mandriva (Method 1):
- In /etc/sysconfig/network, add a linenetworking_ipv6= "no"
- Reboot.
|
• SuSE 9.0:
- In /etc/modules.conf, change the Linealias net-pf-10 Ipv6toalias net-pf-10 off
Alias IPv6 off
- Reboot.
|
• SuSE 9.1/9.2/9.3/10.0 ("official" method):
- In /etc/modprobe.conf, change the Linealias net-pf-10 ipv6toalias net-pf-10 IPv6
Install Ipv6/bin/true
- Reboot.
|
• SuSE 9.1/9.2/9.3/10.0 (Alternate method)/mandriva (Method 2)/slackware:
- In /etc/modprobe.conf, make sure you changealias net-pf-10 ipv6toalias net-pf-10 off
Alias IPv6 off
- Reboot.
|
• Gentoo:
- In /etc/modules.d/aliases, make sure you changealias net-pf-10 ipv6toalias net-pf-10 off
Alias IPv6 off
- Reboot.
|
NOTES:
- In distros using /etc/modprobe.conf, beware. Might get overriden by /etc/modprobe.conf.local or by/etc/modprobe.d/*.
- If you disable IPv6, I Suppose you don ' t need tunnels either. You could also add There:install sit0/bin/true
- A last "Anti-ipv6" Issue:don ' t forget the old trick's checking if your Firefox has IPv6 disabled:
- Ctrl+l, about:config (Enter)
- Filter by IPv6.
- Set network.dns.disableIPv6 to true.
Excerpt from: http://blog.chinaunix.net/uid-7654720-id-1742032.html
Linux diable IPv6