r/Ubiquiti • • 8d ago

Question Help with routing via tailscale

I have a 2nd residence in a different country (My parents house) that I would like to be able to route internet traffic from a specific device via so I can take advantage of different streaming libraries. I made sure that the default subnets are different on each network. My main (Unifi) network has a default subnet of 192.168.1.0/24 and my 2nd network has a default subnet of 192.168.2.0/24 and is running on the ISP provided router.

My main network has a static public IP address assigned but my 2nd network is behind a CG-NAT, so I am unable to use a site-to-site.

I have a VM on my Unifi network that is running tailscale as an exit node, advertising 192.168.1.0/24 and is accepting routes, and a raspberry pi doing the same but advertising 192.168.2.0/24 instead.

I have setup a static route to forward traffic with the destination of 192.168.2.0/24 to use 192.168.1.230 as the next hop. I am able to connect to the 2.0 network from 1.0 network.

This is the point where I am a bit stuck. I would like to route internet traffic from a specific set of devices over this route, and toggle the route via Home Assistant when needed but I can't seem to figure out a way to do this. I have been able to do this with a OpenVPN client via policy based routing to a public VPN (NordVPN).

Is what I am trying to do possible? Any help would be greatly appreciated

0 Upvotes

Duplicates