V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
anyele

求助, tailscale docker 版本怎么设置 exit node 才有效?

  •  
  •   anyele · Jun 7, 2022 · 3143 views
    This topic created in 1419 days ago, the information mentioned may be changed or developed.
    出差的时候想让家里的 Ubuntu 主机转发所有流量

    试了一下两种 tailscale 的使用方式,1 是直接 apt 安装, 2 是 docker 运行
    docker run -d --name=tailscaled --restart=always -v /var/lib:/var/lib -v /dev/net/tun:/dev/net/tun --network=host --privileged tailscale/tailscale tailscaled

    实验了几次, 都通过文档给的命令
    https://tailscale.com/kb/1103/exit-nodes/?tab=linux#configuring-an-exit-node
    分别执行了
    echo 'net.ipv4.ip_forward = 1' | tee -a /etc/sysctl.conf
    echo 'net.ipv6.conf.all.forwarding = 1' | tee -a /etc/sysctl.conf
    sysctl -p /etc/sysctl.conf
    tailscale up --advertise-exit-node

    网页管理里也打开了 Use as exit node 选项

    然后手机端用 4G 打开 exit mode 连接, 选上 allow local access

    结果只有通过 apt 安装才有用, docker 运行的不能代理所有流量, 是哪里设置有问题呢?

    还有就是为啥要选上 allow local access 才行?
    Supplement 2  ·  Jun 8, 2022
    刚试了下 apt 安装 tailscale 并且打开 exit node , 手机连接 exit node 没问题, 但 windows 连接 exit node 就无法上网, 这是什么情况
    Supplement 3  ·  Jun 9, 2022
    刚刚我创建了一个虚拟机装了 win10, 再安装 1.26 客户端是可以用 exit (退出) node (节点) 的, 不知道我的笔记本是为啥用不了, 难道是连 wifi 的原因?
    Supplement 4  ·  Jun 9, 2022
    windows 客户端的问题解决了 , 我删除了多余的网络适配器就成功了, 之前装了 UU 加速器
    7 replies    2022-06-09 04:00:11 +08:00
    billzhuang
        1
    billzhuang  
       Jun 7, 2022 via iPhone
    印象里因为 docker 不支持创建 tunnel 什么的,所以 tailscale 不能在 docker 里运行。
    sidkang
        2
    sidkang  
       Jun 8, 2022   ❤️ 1
    不选 allow local access ,那么 guest 对于本地的访问应该都会经过 exit node 了,印象里似乎如此
    anyele
        3
    anyele  
    OP
       Jun 8, 2022
    @sidkang 有办法让 docker 里的 tailscale 支持 exit node 吗?
    sidkang
        4
    sidkang  
       Jun 8, 2022
    @anyele 真不太清楚,我自己是在用 lxc 安装 tailscale 来做节点的,exit node 可以使用
    anyele
        5
    anyele  
    OP
       Jun 8, 2022
    @sidkang 我又试了下, Linux 做 exit node, 另一台 Linux 连接 exit node 是正常的, Android 也是正常, 就 windows 客户端不行
    sidkang
        6
    sidkang  
       Jun 9, 2022
    玄学我其实也发现一个,访问 plex 的节点的时候,网页可以成功访问 app 端口,客户端就不行,😮‍💨,能用就行吧
    dann73580
        7
    dann73580  
       Jun 9, 2022 via iPhone
    Docker 和默认无特权 lxc 都是没有 tun 的,wg 是在 l3 传输的,没 tun 用不了出口模式吧。我记得官方 docker 也说这个问题了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3203 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 13:41 · PVG 21:41 · LAX 06:41 · JFK 09:41
    ♥ Do have faith in what you're doing.