OPNsense Forum

Archive => 20.7 Legacy Series => Topic started by: ttabbal on August 18, 2020, 11:08:53 PM

Title: Unable to get VPN routing to work
Post by: ttabbal on August 18, 2020, 11:08:53 PM
I'm sure I'm just missing something. I had this working on pfsense and would like to get it working on OPNSense.

I have an OpenVPN client running and the status and log show it working.

There is an interface set up for it, again, looks good.

I set a firewall rule up to send traffic for one address, with and without an alias, to that gateway.

And switched to hybrid NAT and added a rule for the VPN interface.


From /tmp/rules.debug, just the lines that seem to apply..

nat log on ovpnc1 inet from (em1:network) to any -> (ovpnc1:0) port 1024:65535
pass in log quick on em1 route-to ( ovpnc1 172.21.21.43 ) inet from $VPN_Required to {any} keep state tag NO_WAN_EGRESS label "e02f49801ddff506bae8ba433a95f9eb"

In the log I see traffic hit the firewall rule with pass, and the packet seems to get tagged. I don't think the NAT rule is working though. I get responses from the OPNSense rather than the server I expect. For example, "ping 8.8.8.8" gets replies from "10.0.0.1", the firewall IP.
Title: Re: Unable to get VPN routing to work
Post by: casperpda on August 19, 2020, 03:50:46 PM
i am also facing same issue. i created the VLAN and try to route the traffic but its not working. I wan to route my all VLAN30 traffic to VPN.
Title: Re: Unable to get VPN routing to work
Post by: ttabbal on August 19, 2020, 04:35:46 PM
I got it working this morning. The change was to uncheck "Don't Pull Routes". The guides said it should be checked, but it worked. I still have "Don't add/remove routes" checked.
Title: Re: Unable to get VPN routing to work
Post by: casperpda on August 19, 2020, 04:43:54 PM
Would you please share your Outbond NAT and Rules screenshot. and which DNS your using.