Routing IP range through OpenVPN tunnel
-
Heyo!
I want to route specific public IP ranges through a OpenVPN tunnel.
My current Setup:
OpenVPN Client 10.10.10.22 <-> OpenVPN Server (PfSense) 10.10.10.1 <-> OpenVPN Client 10.10.10.80
All OpenVPN Clients can see each other.I want to do this (8.8.8.8 as example):
OpenVPN Client 10.10.10.22 –-requests 8.8.8.8---> OpenVPN Server (PfSense) 10.10.10.1 ---redirects to-----> OpenVPN Client 10.10.10.80 --- pushes to WAN---> Internet 8.8.8.8My OpenVPN server pushes this:
push "route 10.10.10.0 255.255.255.0"; push "route 8.8.8.0 255.255.255.0";
When I access 8.8.8.8 from 10.10.10.22, the connection to WAN is on the PfSense server. How can I achieve that the packets will leave on 10.10.10.80?
Thanks! :)
-
You may route this on pfSense to the client 10.10.10.80, but this route will be applied to any connection passing pfSense, also upstream from LAN hosts.
In addition if 10.10.10.80 isn't a router itself with a public WAN address you either will need a route for 10.10.10.22 at the other side or do source NAT at the client for this connection.