Centos 6.x 如何停用 IPv6
為什麼要停用 IPv6?
- 不熟、抗拒學習
- IPv6 也要設 IP 反解 PTR
- 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)
No comments yet.