If you would like to log into your home network remotely, such as while on vacation or on a business trip, the most common route is to use a Virtual Private Network server. This will allow you to connect to your node via SSH and view your monitoring dashboards from anywhere in the world, all without exposing your SSH port to the internet.
It is recommended that you enable 2FA (Two Factor Authentication) on whichever identity provider you choose for added security.
Now, install Tailscale on your node:
Finally, authenticate and connect your machine to your Tailscale network on your node:
You’re connected! You can find your Tailscale IPv4 address by running:
You should now see your node machine added to the Tailscale dashboard ↗. You may also change the name of the node machine and disable key expiry through the dashboard.
You should now be able to exit
the SSH session to your node on your client, and SSH into your node again through Tailscale using ssh <user>@<node-name> -p <ssh-port>
.
If you have UFW configured, you can now add a rule to accept any incoming SSH connections over Tailscale ↗.
The following steps will modify your firewall rules. You must have at least 2 SSH sessions open to your node machine before proceeding - one for modifying the configuration and testing it afterward, and one that will stay logged in as a backup in case your changes break SSH so you can revert them!
Run these commands on the node machine.
Allow access to all incoming ssh connections over Tailscale.
You may also remove access to the SSH port to completely lock down your node. Note that you will not be able to log in from the local network as Tailscale will become the only way to log in. Only run the following command if you are okay with this.
Once you’ve set up firewall rules to restrict all non-Tailscale connections, restart UFW and SSH:
Now, confirm that everything is working as expected. exit
from one of your current SSH sessions (but remember to keep the second one open as a backup). Next, connect to the node machine via SSH using the Tailscale IP address or hostname: ssh <user>@<node-name> -p <ssh-port>
If it works, you did everything right and can now safely log into your home network while abroad!
This documentation was adapted from the Rocket Pool docs ↗