Proxmox container for a Tailscale exit node
I want to set up a Tailscale exit node for me on the server with a good home Internet connection. This is a sort of poor-man’s VPN, routing all traffic through my home ISP connection. It’s pretty easy but I ran into a problem with IP forwarding.
First I set up a tiny Alpine container and used the Tailscale community script to set up Tailscale on it. You can install Tailscale by hand but this script handles the extra config needed to give an unprivileged LXC access to the tunnel device.
Then I set up Tailscale in the container to advertise as an exit node. The key thing there is sysctl configurations to enable IP forwarding inside the container OS. Very important! You also have to tell tailscale to advertise itself as an exit node.
Once I did this it worked. At least, I think it did. But it stopped working, maybe after a reboot?
To fix it, I also enabled IP forwarding via sysctl on the Proxmox server itself. I’m not 100% sure this is required or even a good idea. But when I enabled it, the exit node started working again. I’m a little confused about this but I think it’s OK.