Skip to content

关闭 IPV6, 恢复网络访问

买了个Racknerd的小鸡, 结果上不了 Google.

查了下, 应该是 ipv6有问题.

关掉就好

# session effective; 重启就失效了
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
sysctl -w net.ipv6.conf.lo.disable_ipv6=1

# 或者一劳永逸
cat >> /etc/sysctl.conf <<EOF
# permanently append these two lines; effective after reboot
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1
EOF
# 让其生效
sysctl -p

Leave a Reply

Your email address will not be published.