Overview
A Tailscale Exit Node is a device within your Tailscale network that other devices can use as a gateway to the internet. By setting up an Exit Node, you ensure that all traffic from connected devices is routed through a secure and private network, benefiting from the encryption and privacy that Tailscale provides. This is particularly useful for:- Securing internet traffic when connected to untrusted networks
- Routing traffic through your home or office network
- Accessing region-specific content
- Adding an extra layer of privacy to your browsing
Exit Node Configuration
The exit node service requires specific Docker and system configurations to enable IP forwarding and traffic routing.Complete Example
Here’s a completecompose.yaml configuration for a Tailscale exit node:
Key Configuration Options
TS_EXTRA_ARGS
TheTS_EXTRA_ARGS environment variable is used to pass additional arguments to the Tailscale daemon:
Sysctls for IP Forwarding
Required for exit nodes - these system controls enable IP forwarding, which is necessary for routing traffic:Network Mode
Exit nodes requirebridge network mode instead of the typical service:tailscale sidecar pattern:
Environment Variables
Create a.env file with the following variables:
Post-Deployment Steps
1. Enable the Exit Node
After deploying the container, you need to enable it in the Tailscale admin console:- Navigate to https://login.tailscale.com/admin/machines
- Find your exit node device
- Click the three-dot menu
- Select “Edit route settings”
- Enable “Use as exit node”
2. Use the Exit Node from Client Devices
On any device in your Tailscale network: macOS/Linux:- Open the Tailscale app
- Tap the three-dot menu
- Select “Use exit node”
- Choose your exit node
3. Verify Exit Node Status
Check that traffic is routing through the exit node:Security Considerations
Recommended ACL Configuration
Restrict exit node usage to specific users or tags:Troubleshooting
Exit Node Not Appearing
Check the container logs:1.
Traffic Not Routing
Verify the exit node is enabled in the Tailscale admin console. Check firewall rules on the host machine - ensure outbound traffic is allowed. Test DNS resolution:Performance Issues
- Ensure the host has sufficient bandwidth
- Check CPU usage during peak traffic
- Consider enabling hardware acceleration if available
- Monitor container resource limits
Related Resources
MagicDNS
Configure DNS for seamless service access
Security Best Practices
Harden your Tailscale deployment