V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
sneezry
V2EX  ›  问与答

如何为 vps 设置 ipv6 隧道

  •  
  •   sneezry · 2014-10-19 22:25:44 +08:00 · 3692 次点击
    这是一个创建于 3489 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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隧道也没有设置成功。
    第 1 条附言  ·  2014-10-20 00:01:13 +08:00
    最后我通过 http://www.yangyaping.cn/2014/08/21/ipv6tunnel/ 这篇博客解决了问题,感谢楼下诸位。
    3 条回复    2014-10-19 23:12:10 +08:00
    caizixian
        1
    caizixian  
       2014-10-19 22:56:14 +08:00   ❤️ 1
    不知道你用的是哪家的?什么系统?
    因为不同的VPS的修改不太一样,有的还要通过面板做一些修改。
    caizixian
        2
    caizixian  
       2014-10-19 22:56:41 +08:00   ❤️ 1
    如果你用的是Ubuntu 请参考https://wiki.ubuntu.com/IPv6#Get_connected_with_Hurricane_Electric
    Love4Taylor
        3
    Love4Taylor  
       2014-10-19 23:12:10 +08:00   ❤️ 1
    类似这种,存成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
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3652 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 11:11 · PVG 19:11 · LAX 04:11 · JFK 07:11
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.