Add a direct route to OpenVPN Server on client
-
Hi,
I have a configuration where i want to create a VPN Tunnel to the WAN Interface of OpenVPN.
Example:
WAN Network: 1.1.1.0/24
PfSense IP: 1.1.1.10
If i now export the 1.1.1.0/24 as a Local Network in the OpenVPN configuration the routing table on a client looks like:default via 192.168.1.1 dev eth0 1.1.1.0/24 via 172.16.10.1 dev tun0
Now OpenVPN tries to reach the OpenVPN Server 1.1.1.10 through tun0 which is not working, because the packages are routed in a circle.
Because of that i have to add a direct route to the VPN Server:ip route add 1.1.1.10/32 via 192.168.1.1 dev eth0
After this the routing table looks correct:
default via 192.168.1.1 dev eth0 1.1.1.10/32 via 192.168.1.1 dev eth0 1.1.1.0/24 via 172.16.10.1 dev tun0
and everything is working.
Is there a way to tell OpenVPN/PfSense to add the direct route to the VPN Server 1.1.1.10 when it's connecting?
For me this sounds like a easy to solve and common problem, but by now i was not able to find a solution.
Thank you for your help. -
Can you provide more context on the problem and the proposed solution?
-
@marvosa
I'm sorry, but i don't know exactly what you mean.
If I want to make the WAN Network accessible trough VPN, where the OpenVPN Service is listen, this is currently not possible.
Other OpenVPN Implementations (e.g. untangle) add a direct route to the OpenVPN Server to solve the Problem. I think this should also be possible on PfSense, but i don't know how.. :(
If you need more information, i can provide them to you.