Add a direct route to OpenVPN Server on client
I have a configuration where i want to create a VPN Tunnel to the WAN Interface of OpenVPN.
WAN Network: 220.127.116.11/24
PfSense IP: 18.104.22.168
If i now export the 22.214.171.124/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 126.96.36.199/24 via 172.16.10.1 dev tun0
Now OpenVPN tries to reach the OpenVPN Server 188.8.131.52 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 184.108.40.206/32 via 192.168.1.1 dev eth0
After this the routing table looks correct:
default via 192.168.1.1 dev eth0 220.127.116.11/32 via 192.168.1.1 dev eth0 18.104.22.168/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 22.214.171.124 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?
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.