Tailscale & Headscale
·1 min
# Configure a node as an exit node.
tailscale up \
--login-server https://headscale.ketanvijayvargiya.com \
--advertise-exit-node \
--advertise-routes="10.0.0.0/16" \
--accept-dns=false \
--auth-key=foo
# "Allow" the above by running the following on the Headscale node.
sudo headscale routes list # First, find the right IDs.
sudo headscale routes enable -r 123 # For each route ID.
# Configure a non-exit node (such as my Mac laptop).
sudo tailscale up \
--login-server https://headscale.ketanvijayvargiya.com \
--accept-routes \
--auth-key=foo
# Create a pre-auth key for easy sign in.
sudo headscale \
--user hi.ketanvijayvargiya.com \
preauthkeys create \
--reusable \
--expiration=24h