Goal: I want to setup a VPN system so that i can connect from my client PC at home using L2TP, OpenVPN and Softether Client to any of multiple LANs connected to a raspberry pi based system in a remote location. This raspi sits behind a Firewall and NAT.
What i've already tried:
- Setup a SE bridge on the raspi -> This way i can only connect to one physicall NIC (X)
- Setup a SE server on the raspi and configure local bridges -> Couldn't get NAT Traversal working (most likely due to ISP) (X)
Host one SE server on a VM of a cloud provider and make a cascade connection from a server sitting on the raspi to the server in the cloud (so i don't need NAT Traversal since it's outbound traffic from raspi side). The cloud server implements only one VHUB to forward the traffic to the client. This VHUB is then connected to the DEFAULT VHUB on the raspi server. This VHUB uses SecureNAT, to A) enable clients to connect using L2TP and OpenVPN (only worked for me if there is a DHCP server) and B) so that the targets in the remote LAN can answer connections from the clients through NAT (otherwise i'd need to adjust the routing tables of the other devices in the target LAN).
Problem:
I don't know how to setup the SecureNAT so that traffic which comes from the client (e.g. DHCP assigned IP 192.168.30.10) will be routed into a physically connected network of the raspi (e.g. on ETH0 a device with 192.168.1.2) since i can only assign one IP to the SecureNAT VHOST.
Using local bridges on the VHUB enables communication to the target device (192.168.1.2) but without adjusting the routing table of the target the answer can't be sent.
What am i missing or is there a way better setup to implement this requirements anyways?
Thanks and best regards Julian