This script allows you to toggle tailscale settings using the physical side switch on the GL-iNet Beryl AX.
To install:
-
Copy the below file to
/etc/gl-switch.d/tailscale.shand replace theexit_node_ipvalue with your exit node ip address. -
Make sure to set the execute bit on the new file:
chmod +x /etc/gl-switch.d/tailscale.sh -
Depending on version:
4.8.0 and above:
Copy/write theswitch-buttonfile below to/etc/config/switch-button4.7.4 and below:
Go toSystem->Toggle Button Settingsand chooseTailscale (On/Off)in the dropdown andApply
New update.
If you want a kill switch while your exit node is enabled (and the exit node drops connectivity) then try this at your risk. I haven't had a chance to test thoroughly but it just adds a rule and removes that rule to block WAN connectivity if exit node drops and button is toggled in the on state. If button is turned off...(to the left) then it disables killswitch, and exit node, but keeps tailscale up.
Feedback is welcome/appreciated.