Question Seamless connection between two networks

sukucorp

Honorable
Jul 3, 2019
3
0
10,510
Hi,

My current setup is as follows:

  • I have two homes with their respective LANs connected to the Internet thru routers.
  • There are devices that are connected in each LAN and I can easily ssh from one to another when both devices are in the same LAN.
  • I have setup the DHCP at both ends to give the same private IP address to the device.
  • I also have one cloud based host with a public IP address.
  • I have setup the routers in both locations to keep a reverse ssh connection open to the public IP host.
  • When I need to access a device in the other LAN, I ssh to the public host and then ssh to the router in the other LAN and then to any device I need.
What I would like to setup is as follows:
  • The devices in both LANs should connect to the Internet thru their respective ISP.
  • I should be able to seamlessly ssh from any device to any device with either name or IP address irrespective of which LAN the other device is.
Essentially I would like to have a virtual LAN between the two locations but the Internet access should be from the respective ISPs.

What would be the best way to achieve this using opensource networking tools (no freemium tools please)?

I am reviewing the documentation for VDE, FreeLAN and OpenVPN to check if they are suitable for what I would like to achieve. I am not a networking expert so my going is slow since I am also learning along the way. Would appreciate any help.
 
First things is at least one of your 2 locations needs a public IP. It does not have to be static but it must be public.

After that you need to setup a VPN. You need a more advance one because it is not 1 machine to the machines in the remote location, you want any-any. Most consumer routers support the first method where they assign ip out of the lan ip pool and do a NAT on it.

You actually need a site to site vpn. You need to assign different IP blocks to the 2 lan. It is technically possible to run them as a single true LAN but this is one of the most advanced forms of VPN and is not supported by much. I will leave it as L2TPv3 and recommend you do not go that route.

I am unsure which consumer routers support site to site vpn. I know many firewall device can do this. You can use a small dual nic pc and run pfsense on it. That may also be your best option if you expect to transfer at more than say 20mbps. The cpu in routers just is not strong enough to encrypt the data at high rates.

Unless the method you are currently using causes major issue I would continue. It is not hard to setup vpn but there are so many details that it will take you time to learn about.
 
^What he says. Site-to-Site VPN.

The easy part, just use 2 old PC from the garage bin (CPU must have hardware AES-NI), make them 2 NICs each, load Pfsense (free).

The hard part, CONFIGURATION based on requirements. Should not stop u if ur motivated.

U may have have to change one of the subnets, but am rusty on this.
 
First things is at least one of your 2 locations needs a public IP. It does not have to be static but it must be public.

That is an issue, both locations do not have public IP. The only public IP I have is a cloud based server running Linux. I am currently using that to setup reverse ssh.

You actually need a site to site vpn. You need to assign different IP blocks to the 2 lan. It is technically possible to run them as a single true LAN but this is one of the most advanced forms of VPN and is not supported by much. I will leave it as L2TPv3 and recommend you do not go that route.
I will read up on that.

I am unsure which consumer routers support site to site vpn. I know many firewall device can do this. You can use a small dual nic pc and run pfsense on it. That may also be your best option if you expect to transfer at more than say 20mbps. The cpu in routers just is not strong enough to encrypt the data at high rates.
I can live with 20mbps! :)

Unless the method you are currently using causes major issue I would continue. It is not hard to setup vpn but there are so many details that it will take you time to learn about.
A major purpose of this exercise is learning, so your suggestions though would require me some time to assimilate are valuable. Thanks.