This tutorial provides a complete guide to installing Tailscale on a Windows PC and a Raspberry Pi, creating a secure private network, and then configuring the PC as a subnet router to access its entire local network from the Pi.
Tailscale is a zero-configuration Virtual Private Network (VPN). It creates a secure, private network (a “tailnet”) between your devices, no matter where they are. Each device gets a private 100.x.y.z IP address, and all traffic between them is encrypted. This is perfect for securely accessing your Raspberry Pi from anywhere or connecting to your home network remotely.
.exe file. Follow the simple on-screen prompts.Your PC is now connected to your tailnet!
curl -fsSL https://pkgs.tailscale.com/stable/raspbian/buster.gpg | sudo apt-key add -
curl -fsSL https://pkgs.tailscale.com/stable/raspbian/buster.list | sudo tee /etc/apt/sources.list.d/tailscale.list
sudo apt update
sudo apt install tailscale -y
up command.
sudo tailscale up
Your Raspberry Pi is now connected to your tailnet!
100.x.y.z IP address. Note the IP address of your PC.# Replace 100.x.y.z with your PC's Tailscale IP
ping 100.x.y.z
If you see replies, your secure network is working perfectly.
This is the advanced part. We will make the PC act as a gateway, allowing the Raspberry Pi to access other devices on the PC’s local home network (like a printer, NAS, or another computer).
On your Windows PC, open a Command Prompt (not PowerShell for this step) and type ipconfig. Look for your main network adapter (usually “Ethernet” or “Wi-Fi”). Note the IPv4 Address and Subnet Mask.
192.168.1.50 and your subnet mask is 255.255.255.0, your subnet is 192.168.1.0/24.192.168.4.25 and your subnet mask is 255.255.255.0, your subnet is 192.168.4.0/24.10.0.0.30 and your subnet mask is 255.255.255.0, your subnet is 10.0.0.0/24.You will need this subnet address (e.g., 192.168.1.0/24) for the next steps.
For your PC to be able to route packets from the Tailscale network to your local LAN, you must enable IP forwarding at the OS level.
Get-NetIPInterface | Select-Object InterfaceAlias, Forwarding
Note the InterfaceAlias for your main network (e.g., “Ethernet” or “Wi-Fi”).
<Adapter Name> with the alias you just found.
# Example: Set-NetIPInterface -InterfaceAlias "Ethernet" -Forwarding Enabled
Set-NetIPInterface -InterfaceAlias "<Adapter Name>" -Forwarding Enabled
Now, tell Tailscale that your PC is willing to be a router for your local subnet.
tailscale up command, adding the --advertise-routes flag with the subnet you found in Step 5a.
# Replace 192.168.1.0/24 with your actual subnet
tailscale up --advertise-routes=192.168.1.0/24
For security, you must approve the new subnet route.
...) next to your PC and select “Edit route settings…“.The final test is to access a device on your PC’s local network from your Raspberry Pi. A great target is your home router’s admin page, which is usually the “Default Gateway” address from the ipconfig command (e.g., 192.168.1.1).
From your Raspberry Pi’s terminal, ping your home router’s IP address:
# Replace 192.168.1.1 with your home router's IP address
ping 192.168.1.1
If you get replies, it works! Your Raspberry Pi, from anywhere in the world, can now securely access any device on your PC’s local network using its private IP address.