Hello!
Here’s my situation: I have two sites (mine and my parents’ houses). Each private network is sitting behind an RPi4 acting as a gateway/router and I’ve allocated them 10.0.10.0/24 and 10.0.20.0/24 respectively. Each router has a single external IP address allocated by the ISP which we can assume is static for now.
What I would like (ideally) is a seamless way to route from one private subnet to the other over the Internet. So, for example, if I’m on 10.0.10.75 and ping 10.0.20.86 something like this happens:
10.0.10.75 -> 10.0.10.1 (priv) / 56.123.45.60 (pub) (router A)
-> encapsulated packet over public internet
-> 10.0.20.1 (priv) / 78.987.65.40 (pub) (router B)
-> 10.0.20.86
where all the heavy lifting of routing and encapsulation etc is done by the routers, without me having to set up VPN connections individually on each computer in each network. I assume each router will also need to share routing tables with each other via an encapsulated BGP connection or something too.
Is there a ready made solution that already exists that does this; some software I can install from apt on both routers and just do some config and go? Or alternatively is there a way to put together something that works using standard networking tools?
(Also, obviously the IPs aren’t actually static but I have domains pointing to them that I can keep updated with the correct IP.)
Apologies if this isn’t the right place for this but it seemed more right than /r/HomeNetworking.