On Fri, 25 Oct 2019 21:35:48 +0200 deloptes <delop...@gmail.com> wrote:
> Celejar wrote: > > > I'm not sure exactly what networking scheme you're describing, but I > > explained why there's no easy, good solution in the original thread. > > Basically, the home network uses 192.168.0.0/24, as do other LANS I > > connect to. My VPN uses 10.0.0.0/24. When the laptop is connected > > locally at home, it's 192.168.0.x, but when it's connected remotely, > > it's 10.0.0.x. > > > > Just to be clear, the issue is not reaching the hosts on the local > > network from the laptop: that's simple. The issue is having the hosts on > > the local network be able to initiate connections to the laptop without > > knowinng or caring whether it's connected locally or over the VPN. > > It is simple and it does the trick. Check your server config. > > # Push routes to the client to allow it > # to reach other private subnets behind > # the server. Remember that these > # private subnets will also need > # to know to route the OpenVPN client > # address pool (10.8.0.0/255.255.255.0) > # back to the OpenVPN server. > ;push route 192.168.10.0 255.255.255.0 > ;push route 192.168.20.0 255.255.255.0 > push "route 10.1.1.0 255.255.255.0" > push "route 192.168.1.0 255.255.255.0" I don't get it - IIUC, this sort of thing will work if a given system is always available via a remote connection. In such a case, we can set up the routes so that clients on the local network know to route packets to the given system through the VPN server. But in my case, the given system is sometimes available locally and sometimes remotely - how will the local systems know when to send packets locally and when to send them through the gateway? Celejar