What's new

TAILMON TAILMON v1.0.20 -July 27, 2024- WireGuard-based Tailscale Installer, Configurator and Monitor (Now available in AMTM!)

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Viktor Jaep

Part of the Furniture
TAILMON v1.0.20
Released July 27, 2024

First off – Wanted to give huge thanks to @jksmurf for lighting this fire… He opened my eyes to Tailscale and its capabilities, and only became natural to want to fullfill his wishes to create a formal installer/monitor for this valuable tool for others to enjoy. He, along with @Aiadi, @kuki68ster and @ColinTaylor made a fantastic team that has been working diligently in the background testing the capabilities, limits and stability of Tailscale on our routers. Hats off to all these gentlemen for their help and insight that went into making this tool.

Executive Summary: Tailscale is a free and open source service, based on WireGuard®, that helps users build no-hassle virtual private networks. Once you’ve created a Tailscale network (tailnet), you can securely access services and devices on that tailnet from anywhere in the world. TAILMON is a posix shell script that assists with the install, configuration and monitoring of Tailscale, running on your Asus-Merlin FW router. What is Tailscale you ask? Read more here!

Use-case: TAILMON allows you to download and install Tailscale via Entware onto your router, in order to join your router to your Tailscale network (tailnet). When joined, you can optionally designate your router to become an exit node, and/or advertise access to your subnet in order to allow access to devices running on your network… think NAS devices, TVs, Raspberry Pi’s, Ubuntu servers, security cameras. Once installed, you can monitor your Tailscale service and connection with TAILMON, which will optionally restart the service/connection should something bring it down. To make life easier, TAILMON can continue running/monitoring in the background using the SCREEN utility.

WIKI: Based on our group's findings and extensive testing, @ColinTaylor built this fantastic Tailscale on Merlin WIKI which dives more into the underlying components and how to manually use the Tailscale tools to make a successful connection. Thank you for providing this great instruction manual!

TAILMON is free to use under the GNU General Public License version 3 (GPL 3.0).

This project is hosted on GitHub

Latest release notes: <available here!>

Changelog here | What's new: Added Site-to-Site capabilities, Arm7-2.6 Architecture/Kernel compatibility, Mostly maintenance items, Tailscale Updates, Reboot Protection + showing TS versions, Initial Release!

Screenshots:
1716514715476.png

How is this script supposed to run?

In a normal, daily mode, this script would run from a standard SSH connection. In monitoring mode, it would be running under the SCREEN utility. Instructions:

1. Download and install directly using your favorite SSH tools, copy & paste this command (or install directly from AMTM!):
Code:
curl --retry 3 "https://raw.githubusercontent.com/ViktorJp/TAILMON/master/tailmon.sh" -o "/jffs/scripts/tailmon.sh" && chmod 755 "/jffs/scripts/tailmon.sh"


2. Run TAILMON for the first time to get it setup, or just running the script normally using this command:
Code:
sh /jffs/scripts/tailmon.sh


3. Configure advanced settings using this command (or by pressing (C) from the operations menu in the UI):
Code:
sh /jffs/scripts/tailmon.sh -setup


4. To make things easier, you can now just type the script name itself (without the path/extension), like so… NOTE: You will need to completely exit your SSH session, and log back in for this feature to immediately start working – basically logout/login!
Code:
tailmon


5. Running it under the SCREEN utility is also easy... Make sure to exit the SCREEN session properly by pressing CTRL A + D!
Code:
tailmon -screen
 
How do I set up TAILMON and Tailscale!?

Here are steps on installing the script and getting it configured for Tailscale...

1.) First, go to https://tailscale.com, and create a free account. The free version of Tailscale lets you manage up to 3 individual user accounts, and 100 devices! That should be plenty for us experimental enthusiast crowd!

2.) Upon downloading TAILMON, and running it for the first time (sh /jffs/scripts/tailmon.sh), you will be prompted with an "Install Dependencies" screen. This will install a few Entware tools that are used by TAILMON.

1714431242135.png


3.) Once complete, you will be prompted with the "Initial Setup" screen. Here you have a choice between "Express Install" and "Advanced Install". For those new to Tailscale, I would recommend the "Express Install" to get you up and running as quickly and easily as possible.

1714431313154.png


4.) During the "Express Install" process, you will see Tailscale getting downloaded and installed, after which, it will try to join your router to your Tailscale Network (tailnet). You need to copy and paste the URL it presents into your browser, in order to validate that this is the equipment you want to add to your tailnet.

1714431434102.png


5.) After you validate the machine, it will continue on to the main UI. From here you have some keyboard shortcuts available from the Operations Menu on the very top. Below that will show Tailscale service and connection status. As you add more devices to your tailnet, you will see the list growing under the "Tailscale Connection Status". Finally, it will also show exactly what service and commandline switches it is utilizing to establish and maintain your connection to Tailscale.

1716514739752.png
 
Advanced Options:

1.) From the main UI, you can press (C) for the Configuration/Setup Menu (or you can get to this same screen directly using sh /jffs/scripts/tailmon.sh -setup). This menu also functions as the "Advanced Install" menu, giving you full control over the install/uninstall of the Tailscale service/connection, lets you stop/start, and bring the connection up/down. You are also able to update the Tailscale binary here to the latest version, as well as being able to issue a 'tailscale up --reset' command. Here is also where you can set the Operating Mode, configure the router as an exit node, and advertise routes for your own subnet to your tailnet.

1716514781997.png


2.) Pressing (3) "Set Tailscale Operating Mode" lets you choose between "Userspace", "Kernel" and "Custom". Userspace Mode is used by default, and seems the least intrusive to the router, and tends to overlay on top of the OS. Kernel mode has a much tighter integration with the OS, which may interfere with some processes. Which of these modes is the best? They both seem to perform about the same, so it's really a toss-up, unless I uncover further info based on performance or other issues to sway my mind. In both of these modes, the main service and commandline options are chosen for you to utilize these modes. In the Custom mode, you have full control over all options, and can add your own custom settings and commandline options.

1714437946026.png


3.) Continuing from the screen above, choosing Option (3) for the Custom Operating Mode gives you access to edit all major sections that control the Tailscale Service and Connection:

1714438608267.png


4.) From the Configuration/Setup Menu, pressing option (6) "Custom Configuration Options" gives you a bit more functionality to manage your Tailscale install. Here's a brief explanation for each function:
  • Keep Tailscale Service Alive - Setting to Yes will monitor the Tailscale Service, and if it determines that it's down, will automatically restart it.
  • Timer Check Loop Interval - The amount of seconds that it checks for Tailscale Service issues
  • Custom Event Log size - The number of rows the eventlog will grow to before it starts trimming itself down
  • AMTM Email Notifications - Requires AMTM email to be setup and configured, but will send you success/failure events via email
  • Keep settings on Tailscale Entware updates - If Tailscale is upgraded, it will lose it's settings. This function will make sure that settings will be synced back and survive an update without downtime.
  • Autostart TAILMON on Reboot - This option autostarts TAILMON if your router happens to reboot, and continues monitoring your Tailscale service/connection in a Screen session.
1714609532512.png


If anyone has any questions on the functionality of TAILMON or Tailscale in general, feel free to post questions in the thread below! ENJOY!
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top