Routing IP range through OpenVPN tunnel
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 (188.8.131.52 as example):
OpenVPN Client 10.10.10.22 –-requests 184.108.40.206---> OpenVPN Server (PfSense) 10.10.10.1 ---redirects to-----> OpenVPN Client 10.10.10.80 --- pushes to WAN---> Internet 220.127.116.11
My OpenVPN server pushes this:
push "route 10.10.10.0 255.255.255.0"; push "route 18.104.22.168 255.255.255.0";
When I access 22.214.171.124 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?
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.