I set up Headscale and Tailscale using Docker on a VPS, which I want to use as my public IPv4 and Reverse Proxy to route incoming traffic to my local network and e. g. my home server. I also set up Tailscale using Docker on my home server and connected both to my Headscale server.
I am able to ping on Tailscale container from the other and vice versa and set up --advertise-routes=192.168.178.0/24 on my home server as well as --accept-routes on my VPS, but I can't ping local IP addresses from my VPS. What am I missing?
Both container are connected to the host network, I have opened UDP ports 41641 and 3478 on my VPS.
I ran into a similar problem with tailscale. It looked like I needed to disable source NAT but that didn’t appear to be implemented in the FreeBSD package so it didn’t work for me. If you’re in Linux it might be worth a shot.
--snat-subnet-routes=false
“Disables source NAT. In normal operations, a subnet device will see the traffic originating from the subnet router. This simplifies routing, but does not allow traversing multiple networks. By disabling source NAT, the end machine sees the LAN IP address of the originating machine as the source.”
You expect to see the subnet of the VPN network mentioned, and the wg0 interface as it's gateway. Also might want to make sure your wg0 interface even exists and is up with 'ip addr show'
Sometimes these issues happen because of the IP range you're using. If your local network and your remote network both use the 192.168.x.x range, then there can be conflicts and issues like this. This is a thing that happens generally with VPNs, not sure how Tailscale specifically functions with this issue.
Even if that's not what's going on here, you might try setting up your remote node as an exit node, and configuring your local node to route all traffic through it. Theoretically that shouldn't be necessary, and it will also slow down your traffic if you're routing EVERYTHING through Tailscale. But it could work in a pinch.
Actually, I'm looking at Tailscale documentation now and I see that they recommend setting up subnet routers instead of exit nodes in most cases. Maybe go that route instead, that makes more sense to me. That way you're only routing necessary traffic through the remote node, rather than everything.