Linux ipv6 dns 地址设置
-
打开终端,输入命令
sudo nano /etc/network/interfaces,编辑网络接口文件。 -
找到“iface eth0 inet6 dhcp”这一行(其中eth0为你的网络接口名称),将其修改为:
iface eth0 inet6 static
address your_ipv6_address
netmask your_ipv6_netmask
gateway your_ipv6_gateway
替换 your_ipv6_address,your_ipv6_netmask 和 your_ipv6_gateway 为你的 IPv6 地址、子网掩码和网关地址。
-
输入命令
sudo nano /etc/resolv.conf,编辑 DNS 配置文件。 -
在文件中添加以下内容:
nameserver your_ipv6_dns_server_address
替换 your_ipv6_dns_server_address 为你的 IPv6 DNS 服务器地址。
-
保存文件并退出。
-
输入命令
sudo service networking restart,重启网络服务。 -
输入命令
ping6 ipv6.google.com,测试是否能够访问 IPv6 网站
原文地址: https://www.cveoy.top/t/topic/cfuG 著作权归作者所有。请勿转载和采集!