sneezry
V2EX  ›  问与答

如何为 vps 设置 ipv6 隧道

  •  
  •   sneezry · Oct 19, 2014 · 4132 views
    This topic created in 4255 days ago, the information mentioned may be changed or developed.
    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隧道也没有设置成功。
    Supplement 1  ·  Oct 20, 2014
    最后我通过 http://www.yangyaping.cn/2014/08/21/ipv6tunnel/ 这篇博客解决了问题,感谢楼下诸位。
    3 replies    2014-10-19 23:12:10 +08:00
    caizixian
        1
    caizixian  
       Oct 19, 2014   ❤️ 1
    不知道你用的是哪家的?什么系统?
    因为不同的VPS的修改不太一样,有的还要通过面板做一些修改。
    caizixian
        2
    caizixian  
       Oct 19, 2014   ❤️ 1
    如果你用的是Ubuntu 请参考https://wiki.ubuntu.com/IPv6#Get_connected_with_Hurricane_Electric
    love4taylor
        3
    love4taylor  
    PRO
       Oct 19, 2014   ❤️ 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
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2864 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 68ms · UTC 08:39 · PVG 16:39 · LAX 01:39 · JFK 04:39
    ♥ Do have faith in what you're doing.