Git Product home page Git Product logo

tailscale's Introduction

tailscale

tailscale内网穿透常用命令

在软路由/iStoreOS上安装Tailscale实现内网穿透、异地组网、远程访问,点对点传输,更好的使用体验!轻松打通内外网!群晖、威联通NAS,替代zerotier

1、开源项目地址:【点击进入】

#可以根据实际情况替换最新的

wget https://github.com/adyanth/openwrt-tailscale-enabler/releases/download/v1.60.0-e428948-autoupdate/openwrt-tailscale-enabler-v1.60.0-e428948-autoupdate.tgz

2、解压软件包

tar x -zvC / -f openwrt-tailscale-enabler-v1.60.0-e428948-autoupdate.tgz

3、安装依赖包

opkg update

opkg install libustream-openssl ca-bundle kmod-tun

4、设置开机自启并验证

/etc/init.d/tailscale enable

ls /etc/rc.d/S*tailscale*

5、启动Tailscale

/etc/init.d/tailscale start

6、获取登录链接,配置路由

tailscale up

7、Tailscale常用命令

退出Tailscale:tailscale logout

关闭Tailscale:tailscale down

检查Derp服务器:tailscale netcheck

检查Tailscale:tailscale status

8、开启子网网路由

在Tailscale的管理页面上,单击设备列表右侧的更多图标,禁用密钥过期,并打开子网路由。

tailscale up --accept-routes --advertise-routes=192.168.2.0/24 --accept-dns=false

image

如果是使用headscale搭建的,可以用下面的命令

tailscale up --login-server=http://服务器IP:headscale端口 --accept-routes=true --accept-dns=false --advertise-routes=192.168.2.0/24 --reset

9、添加接口

在OpenWrt上新建一个接口,协议选静态地址,设备选tailscale0,地址为Taliscale管理页面上分配的地址,掩码255.0.0.0。防火墙区域选lan区域。

image

image

10、添加防火墙规则

网络——防火墙——自定义规则——把下面的规则添加进去——重启防火墙

iptables -I FORWARD -i tailscale0 -j ACCEPT
iptables -I FORWARD -o tailscale0 -j ACCEPT
iptables -t nat -I POSTROUTING -o tailscale0 -j MASQUERADE

tailscale's People

Contributors

3981877 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.