Tuesday, December 20, 2022

Tailscale and Your Traveling Setup

Let me set the stage for you.

I've got 2 computers. One which has a ton of media on it, the other which is my main (development) machine. Both of my computers are small form-factor, though the media machine is 10L (about the size of a backpack) and my main machine which is 4L in a K39v2 (it fits in the backpack).

As I joked, my entire main machine, along with keyboard, mouse, and portable monitor fits inside of one (heavy) backpack. I'm pretty proud of this completely portable setup, since I work from home and thus - I work from anywhere.

One thing that I can't always do though, is connect my main machine to my media machine when I'm away from home. Or, at least, I couldn't until recently. Let's chat briefly about networking solutions that bring two remote PCs together for LAN like communication.

Enter Tailscale, an open-source solution that lets you create a mesh VPN between multiple devices on the same tailscale account. I have it running on my Android phone, and both of my machines. This allows me to ping my media machine running on my home internet when I am outside (or on mobile data), without exposing any ports or my IP address to the outside world.

Because Tailscale lets me treat my machines as if they were on a local network together, I can open my SSH port on my media machine to LAN connections, and SSH into my media machine from anywhere in the world - as long as the SSH client is from my Tailscale account.

Since I can access my media machine from anywhere, I've also started running Gnome Remote Desktop on my media machine. I can connect via a fast RDP client, like Remmina to my media machine, to graphically manage it, from anywhere in the world.

I've been enjoying this setup so much, that I also enabled it on my Android phone! I have the Tailscale client on my phone, which allows it to connect remotely to my main machine and my media machine. I have the Remote Desktop Manager app which allows me to use RDP to connect to both of my desktop machines. All it takes is a USB hub for peripherals, and a TetherFi proxy for the devices around me, and I've got a completely mobile setup that uses my main or media machines compute power for builds and even things like video games.

One note about Android Tailscale: By default, something is wrong with the interaction between the Private-DNS setting and the VPN service. You can see more information about this issue here. This matters to me because my Android device uses a custom ad-blocking DNS setup via NextDNS - out of the box the Tailscale settings would not allow it to connect Private-DNS while the VPN was running. To resolve this, I followed a workaround in that issue above - Disable MagicDNS, and remove all other nameservers (you may also have to reboot your phone). Once done, even though Private-DNS in Android still displays the annoying "Couldn't Connect", it actually does connect just fine and my NextDNS dashboard confirms the connection. Odd.

In summary:
Use Tailscale to connect your devices together from anywhere.
Use SSH and RDP to remotely use and manage your devices.
Dongle a USB hub to your Android phone to plug peripherals in.
TetherFi proxy any other devices to your phone to share the Internet.
Remote work, remote play.

How neat. While I usually can just pack my main machine into a bag, in the rare instances where I don't have it with me but still want to get work done, I can use this remote setup. Does this make me any more productive though, or make updates come out faster? No!

Stay tuned...

========================
Follow pyamsoft around the Web for updates and announcements about the newest applications!
Like what I do?

Send me an email at: pyam.soft@gmail.com
Or find me online at: https://pyamsoft.blogspot.com

Follow my Facebook Page
Check out my code on GitHub
=========================