Hi together
I have question related to Tailscale and additional routing entries whenever the tunnel is up.
Very short story
I need to add
ip route add 0.0.0.0/1 dev tailscale0
ip route add 128.0.0.0/1 dev tailscale0
when Tailscale connection is up and
ip route delete 0.0.0.0/1 dev tailscale0
ip route delete 128.0.0.0/1 dev tailscale0
whenever Tailscale goes down (to be able to re-connect tailscale VPN).
Question: is there any good place (in Gl.Inet firmware 4.2) where I could place these rules and have them automatically managed?
I know I could write me an “monitor exit node” Script to execute these rules, but maybe there is something already “out of the box”?
Long Story
I’ve been using my routers (E750 and AXT1800) to access my home network form everywhere. All clients connected to the router WiFi and their traffic was routed over Wireguard VPN client over UDM PRO. So I was “always at home”.
With my ISP change it is not possible to have this setup because of CG NAT. So I migrated to Tailscale with the goal to route all client traffic over my home internet connection.
On my mobile devices / laptops everything works as expected (exit node is my UDM PRO router where I have also Tailscale client running).
I have also managed to bring Tailscale on E750 and AXT1800 and route the traffic from connected WiFi clients also over my UDM PRO exit node. But this works only when I wait till the Tailscale connection is established (exit node is reachable) and then I have add:
ip route add 0.0.0.0/1 dev tailscale0
ip route add 128.0.0.0/1 dev tailscale0
The point is, I want to have it automated.
Any ideas other than writing “exit node” monitor Script?