OPNsense Forum

English Forums => General Discussion => Topic started by: WonderFrank on April 20, 2020, 11:38:41 PM

Title: Want to drop traffic if the gateway (VPN) is down
Post by: WonderFrank on April 20, 2020, 11:38:41 PM
Hi All

I have an OpenVPN client set up on my OPNsense box which i route traffic from one host through, the rest of the taffic from other hosts takes the normal way out. The issue i have is that if the VPN goes down for whatever reason the OPNsense box will route the traffic through the usual gateway until the VPN is restored. I do not want this.

Current LAN rules
(https://i.postimg.cc/QdJ3Tbmc/Traffic.png)

The current rule are above. I was of the belief that the would be matched on a first come first serve, one the VPN is down it would try the next rule which would block it. What i guess happens is that the OPNsense firewall tries the VPN, sees its down and then sends it to the default gateway rather than getting to the next rule.

Does any one have any ideas on how i can get the result im looking for?
Title: Re: Want to drop traffic if the gateway (VPN) is down
Post by: WonderFrank on April 20, 2020, 11:42:47 PM
I've answered my own question!
YOu need to select the below

(https://i.postimg.cc/pLcpjRqf/rule.png)