Remote Administration through Tailscale
We're going to:
- Configure a lightweight Debian VM and install Tailscale in it.
DISK: "8 GiB" CPU: "1 Thread" MEMORY: "1024 MiB"
- Setup Passwordless SSH and Non-Root SSH
- Subnet routers and traffic relay nodes
- Set it up as an exit node
- Enable Auto Updates with Unattended Upgrades
If you want you can use the following little script:
#!/bin/bash
echo "Please enter your local network (e.g.: 192.168.0.0/24):"
read network
echo "Setting up UFW"
sudo apt install ufw -y
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow from $network to any port 22
sudo ufw enable
sudo ufw status verbose
sudo ufw reload
echo "Installing Tailscale"
sudo apt install curl -y
curl -fsSL https://tailscale.com/install.sh | sh
echo "Enable IP forwarding"
echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
sudo sysctl -p /etc/sysctl.d/99-tailscale.conf
echo "Starting Tailscale"
sudo tailscale up --advertise-exit-node --advertise-routes=$network
Relevant Note(s): HomeLab Networking