OpenVPN Connection Issues with PfSense - Default Gateway
-
Hello everyone,
I'm facing an issue when trying to connect to my OpenVPN server. The connection only works when the interface gateway is the default gateway of my PfSense.
Has anyone faced this issue or have any suggestions on how to resolve it?
Thanks for any help!
-
@thomalv
Can you give some more details an this, please?
What do you mean with "when the interface gateway is the default gateway of my PfSense"? -
@viragomann
Yes! I have two WANs configured in my pfSense. The OpenVPN server is set to connect through WAN2, while WAN1 is my default gateway.The issue is that the OpenVPN server only works if WAN2 is set as the default gateway on the firewall. Otherwise, it won't connect.
-
@thomalv
Add a rule to the WAN2 interface tab to allow access to the OpenVPN server, state a unique description and ensure, that it is applied to the incoming traffic to the server.Remove floating pass rules or pass rules on interface group tabs, which may match the OpenVPN traffic, if any.
For connections passed by these rules, the reply-to isn't set. But it's required to send reply packets back to the correct gateway.Note that floating quick rules and interface group rules have precedence over member interface rules. So you have to ensure, that none of these match the VPN traffic.