How to Install Tailscale on the GL.iNet GL-X2000 Router

The GL.iNet GL-X2000 router does not natively support Tailscale in its management interface, so I had to install it manually. Below, I share the step-by-step process to configure Tailscale correctly.

Step 1: Install Tailscale with opkg

Tailscale can be installed directly using the OpenWrt package manager. To do this, run the following commands in the router's terminal:

opkg update
opkg install tailscale

Step 2: Create a crontab to ensure the service is always running

By default, tailscaled does not start automatically after a reboot. To ensure it is always running, add the following entry to cron:

* * * * * [ "`pgrep tailscaled`" == "" ] && /usr/sbin/tailscaled --state=/etc/tailscale/tailscaled.state &

This checks every minute if tailscaled is running, and if not, it restarts it automatically.

Step 3: Specify the state file location

I noticed that Tailscale was not saving the login after a reboot. To fix this, it was necessary to manually specify the state file location when starting tailscaled:

/usr/sbin/tailscaled --state=/etc/tailscale/tailscaled.state &

Step 4: Log in to Tailscale and configure routed networks

After installing and starting the service, you need to log in to Tailscale and configure the networks to be routed. Run the following command:

tailscale up --advertise-routes=192.168.8.0/24

This allows the router to advertise the local network (192.168.8.0/24) to other devices connected to Tailscale and accept routes advertised by other nodes.

Step 5: Access the Tailscale admin panel

  • Open a browser and go to the Tailscale Admin Panel.
  • Log in to your account.
  • In the admin panel, go to the Machines tab.
  • Find the device that is advertising the route.
  • Click on it to open its details.
  • In the Subnet Routes section, you will see the advertised network.
  • Check the box next to the route to enable it.
  • Confirm the activation.

Step 6: Verify connectivity

Now, other devices in the Tailscale network should be able to access the advertised subnet. To test, try pinging a device within the advertised network:

ping 192.168.8.1

If the ping responds, it means the route is working correctly. If you encounter any issues, check the service logs with:

tailscale status

Conclusion

With these steps, I was able to manually install and configure Tailscale on the GL.iNet GL-X2000. Now, the router can be accessed remotely via Tailscale and securely route local network traffic.