Skip to content

tailscale-dev/glinet-exit-node-switch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

glinet-exit-node-switch

A script modified by Mike O'Driscoll (@mikeodr) to toggle Tailscale exit nodes from a GL.iNet physical switch. Included as part of the blog post: Upgrade your travel kit with a tiny, Tailscale-friendly router.

This is known to work on the GL.iNet Beryl AX (MT-3000); it likely works with most other GL.iNet routers, but cannot be guaranteed. Back up your settings, use caution, and all that good stuff.

Use

  1. Ensure your Beryl AX (or other GL.iNet router) is connected to Tailscale

  2. Set up the router to offer subnets

  3. Have an exit node set up in your tailnet

  4. Ensure the exit node is accessible in your router's Tailscale settings (Settings > Applications > Tailscale > Custom Exit Node, enable, refresh, and note and copy IP address you've chosen)

  5. SSH into your router (user is root, password is the admin password you set)

  6. Back up the current value in case something goes wrong

cp /etc/rc.button/switch /root/switch.bak
  1. Download the modified script to replace the current one
curl -so /etc/rc.button/switch https://raw.githubusercontent.com/tailscale-dev/glinet-exit-node-switch/refs/heads/main/switch
  1. Set your exit node IPv4 address. Replacing A.B.C.D with your exit node's Tailscale IP Address.
sed -i 's/100.XXX.YYY.ZZZ/A.B.C.D/' /etc/rc.button/switch
  1. You may need to reboot your router for the switch to start working; alternately, try enabling and disabling the exit node in router settings.

A good way to test your exit node switch is to point a browser on a device connected to your GL.iNet router to a site like icanhazip, and see whether the IP reported changes when the switch toggles. This will not work if your GL.iNet router is receiving its connection through the same network as your exit node; try tethering your GL.iNet router to your phone's cellular connection for a quick test.

About

A script from Mike O'Driscoll to toggle Tailscale exit nodes from a GL.iNet physical switch.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages