如何为 vps 设置 ipv6 隧道

2014-10-19 22:25:44 +08:00
 sneezry
he.net官方指南说编辑/etc/network/interfaces,但是我的vps这个文件似乎是动态生成的,头部有如下说明:

# This configuration file is auto-generated.
#
# WARNING: Do not edit this file, your changes will be lost.
# Please create/edit /etc/network/interfaces.head and
# /etc/network/interfaces.tail instead, their contents will be
# inserted at the beginning and at the end of this file, respectively.
#
# NOTE: it is NOT guaranteed that the contents of /etc/network/interfaces.tail
# will be at the very end of this file.
#

我试着按照说明说的创建interfaces.tail和interfaces.head,但是并没有使里面的内容添加进interfaces中,ipv6隧道也没有设置成功。
3707 次点击
所在节点    问与答
3 条回复
caizixian
2014-10-19 22:56:14 +08:00
不知道你用的是哪家的?什么系统?
因为不同的VPS的修改不太一样,有的还要通过面板做一些修改。
caizixian
2014-10-19 22:56:41 +08:00
如果你用的是Ubuntu 请参考https://wiki.ubuntu.com/IPv6#Get_connected_with_Hurricane_Electric
Love4Taylor
2014-10-19 23:12:10 +08:00
类似这种,存成bash脚本,每次开机启动就行

ifconfig sit0 up
ifconfig sit0 inet6 tunnel ::64.62.134.130
ifconfig sit1 up
ifconfig sit1 inet6 add 2001:470:66:16e::2/64
route -A inet6 add ::/0 dev sit1

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/140092

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX