Debian 10如何设置ipv6隧道?Debian 10如何使用HE.NET配置IPV6?
阿里云服务器 | 腾讯云服务器 | VPS2EZ:老牌低调VPS | ZJI:香港日本美国独服 |
LOCVPS服务周到 | HostKvm低调KVM VPS | 傲游主机:优质VPS | 80VPS:老牌VPS主机 |
搬瓦工:CN2 GIA线路 | CloudCone:性价比高 | JustMySocks科学上网 | RackNerd:超级便宜 |
JustMySocks科学上网 | 好用的宝塔面板 | 购买搬瓦工VPS | 恒创:香港CN2服务器 |
买了一个超级便宜的vps,由于cc机房不提供ipv6导致有些情况下我没法完全使用。于是就想到了使用he.net家提供的ipv6隧穿来自己手动弄一个。
申请he.net家的ipv6
首先去https://tunnelbroker.net/注册一个账号,具体注册步骤很简单,按照里面要求的填写信息就可以了,这里不展开。
注册完账号后,点击左侧的User FunctiONs中有个Create Regular Tunnel,会有个创建ipv6隧道的页面。在IPv4 Endpoint (Your side)填入vps的ipv4地址,在Available Tunnel Servers中选中离vps最近的那个位置。最后在下方点击创建隧道。
Debian 10设置ipv6隧道
完成上一步之后,会进入Tunnel Details页面,其中就是分配到的ipv6地址,现在仅需要绑定这个ipv6地址即可。选择example configurations页面,在下来菜单中选择debian/Ubuntu选项。如下所示:
auto he-ipv6 iface he-ipv6 inet6 v4tunnel address 2001:470:1f04:xxxx::2 netmask 64 endpoint 72.52.xxx.74 local 107.173.xxx.15 ttl 255 gateway 2001:470:1f04:xxxx::1
在配置之前,需要启动vps的ipv6选项和建立好nameserver。
1.在/etc/sysctl.conf
中填写以下内容,填写完成后执行sysctl -p
使之生效。
net.ipv6.conf.all.disable_ipv6 = 0 net.ipv6.conf.default.disable_ipv6 = 0 net.ipv6.conf.lo.disable_ipv6 = 0
2.在/etc/resolv.conf
填写以下内容用以解析Ipv6:
nameserver 2001:4860:4860::8888
3.在/etc/network/interfaces
中,将he.net网站刚才显示的那段内容填入,内容格式大概如下:
auto he-ipv6 iface he-ipv6 inet6 v4tunnel address 2001:470:1f04:xxxx::2 netmask 64 endpoint 72.52.xxx.74 local 107.173.xxx.15 ttl 255 gateway 2001:470:1f04:xxxx::1
填写完成后,执行ifup he-ipv6
确保ipv6生效,此时如果ping ipv6.google.com应该就可以正常响应了。
评论专区