OpenVPN routing between two networks over tunnel
-
Hello Netgatecommunity!
I started using pfSense and OpenVPN about a year ago without any problems.
Now I need a remote-device, which doesn’t support OpenVPN natively, to access a lokal server. The first thing that came to mind was to use a Rpi Gateway with the OVPN-Client installed.
Already looked for similar setups to use as a template but couldn’t figure out how and where I need to set the routes.Net.ipv4.ip_forward = 1 is activated on the Pi.
Below a sketch of my Setup:
Device (192.168.178.52) needs to be able to communicate with ServerPC (192.168.1.250)
Any help or pointers to fitting resources would be highly appreciated!
-
The first thing to remember is this is just a routing problem. That one route is over a VPN is irrelevant. So, that means you need something that you can terminate OpenVPN on and then route through it. Once the VPN, is up, it becomes irrelevant to your problem. I assume your VPN terminates on that Rasberry Pi, so it has to be able to route beyond it's local connection through that Fritzbox and on to the device. Are both the Pi and Fritzbox capable of routing beyond the local connection? Pfsense certainly is.
-
@holly
Apart from the routes within OpenVPN, wich you may have already set, you need a route on the device 192.168.178.52 for 192.168.1.250 pointing to 192.168.178.51 (the RPi).