Centos 6.x 如何停用 IPv6

为什么要停用 IPv6?

  1. 不熟、抗拒学习
  2. IPv6 也要设 IP 反解 PTR
  3. Gmail 会挡没有设 IPv6 反解的邮件

停用步骤

1. 编辑 /etc/sysctl.conf,在档案最后加入:

# Disable IPv6
 net.ipv6.conf.all.disable_ipv6 = 1
 net.ipv6.conf.default.disable_ipv6 = 1
 net.ipv6.conf.lo.disable_ipv6 = 1

2. 重新启动网络服务:

service network restart

停用前:

# ifconfig
 eth0 Link encap:Ethernet HWaddr F2:3C:91:A3:75:95
 inet addr:77.20.250.16 Bcast:77.20.250.255 Mask:255.255.255.0
 inet6 addr: fe80::f08c:91ff:fe78:2fb5/64 Scope:Link
 inet6 addr: 2601:8c01::f08c:91ff:fe78:1fb1/64 Scope:Global
 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
 RX packets:113515 errors:0 dropped:0 overruns:0 frame:0
 TX packets:98710 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:1000
 RX bytes:25084812 (23.9 MiB) TX bytes:173088008 (165.0 MiB)

停用后:

# ifconfig
 eth0 Link encap:Ethernet HWaddr F2:3C:91:A3:75:95
 inet addr:77.20.250.16 Bcast:77.20.250.255 Mask:255.255.255.0
 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
 RX packets:113515 errors:0 dropped:0 overruns:0 frame:0
 TX packets:98710 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:1000
 RX bytes:25084812 (23.9 MiB) TX bytes:173088008 (165.0 MiB)

参考网页

  1. No comments yet.

  1. No trackbacks yet.

return top

%d 位部落客按了赞: