I need to access the Branch, I have a mpls link in the branch that already accesses the array and I have an openvpn in pfsense closing the tunnel,
The gateway of the machines is pfsense, the situation is as follows when I drop the mpls link I want it to exit through openvpn, but I can not always get this out of the mpls even down, so it leaves openvpn if I delete the static route I have in pfsense Which redirects to the mpls.
try explaining it better & also draw a schematic.
You can probably do what i think you want by using policy routing (failover)
Another option would be to use a dynamic routing protocol like ospf to handle the failover using metric/cost (=priority)
So you have your sites connected to a mpls cloud. And these sites also have internet where you run a vpn tunnel between the locations.
Now you want to auto use the vpn connection over the internet if the mpls is down?
As helper stated this is normally done via running a routing protocol.. If the mpls goes away that route drops off and you use the less priority route.