Blog Home
Updated: 2023 Oct 09

为VPS启用ipv6

当你发现通过ifconfig或ip命令查看自己已分配的ipv6地址,却发现Address unreachable,可以根据以下步骤开启。环境为deiban系。

步骤

emacs /etc/sysctl.conf 添加如下参数

net.ipv6.conf.all.autoconf = 0
net.ipv6.conf.all.accept_ra = 0
net.ipv6.conf.eth0.autoconf = 0
net.ipv6.conf.eth0.accept_ra = 0

执行生效

sysctl -p

接着重启网络

systemctl restart networking

检查是否启用

ping6 ipv6.google.com

如果仍不工作,试着重启你的VPS。

Comments:

Email questions, comments, and corrections to hi@smartisan.dev.

Submissions may appear publicly on this website, unless requested otherwise in your email.