Subnet Routing
Subnet routing lets you access an entire network through a single Tailscale-connected node. For example, access your home network (192.168.1.0/24) from anywhere.Setting Up a Subnet Router
Configure Firewall (Linux)
For the subnet router to work, configure the firewall:- iptables
- firewalld
- ufw
Using Subnet Routes
On client devices, accept routes:Auto-Approval of Routes
Automate route approval using ACL policies inconfig/policy.json:
config/policy.json
tag:servers will be automatically approved.
Exit Nodes
Exit nodes route all your internet traffic through a specific node in your network.Setting Up an Exit Node
Approve the exit node
- Headplane GUI
- Command Line
- Open http://localhost:3001/admin/
- Go to Routes page
- Find the exit node route (0.0.0.0/0 or ::/0)
- Click Approve
Using an Exit Node
On a client device:Exit Node Use Cases
Secure Public WiFi
Route traffic through your home network when using untrusted public WiFi.
Access Region-Specific Content
Route traffic through a node in a different geographic location.
Bypass Network Restrictions
Access services blocked on your current network.
Privacy Protection
Hide your IP address from websites you visit.
Combining Exit Node and Subnet Routes
- An exit node for internet traffic
- A subnet router for local network access
Auto-Approval for Exit Nodes
config/policy.json
Advanced Routing Scenarios
Multiple Subnet Routers
Advertise different subnets from different nodes:Route-Specific Access Control
Control which devices can access specific routes:config/policy.json
Docker Container as Subnet Router
docker-compose.yml
Monitoring Routes
List All Routes
Using Headplane GUI
- Open http://localhost:3001/admin/
- Go to Routes page
- View:
- All advertised routes
- Which routes are enabled
- Which node advertises each route
- Route IDs for management
Check Route Status on Device
Troubleshooting
Subnet Route Not Working
Exit Node Not Working
Route Conflicts
Error: Route overlaps with existing route Solution: Be specific with your subnet masks:Best Practices
Use Specific Subnets
Advertise only the specific networks you need:Instead of broad ranges like 192.168.0.0/16
Tag Routers
Apply tags to subnet routers and exit nodes:Use with ACL auto-approval
Monitor Route Usage
Regularly check which routes are active:
Document Your Network
Keep a record of:
- Which nodes advertise which routes
- Subnet ranges and their purposes
- Exit node locations and capabilities
