how to set OSPF cost with filters.

This is an odd one.

I have some sstp tunnels, I am creating a ‘backup’ tunnel with a single secret. These come in dynamically and can be labeled:
sstp-backup
sstp-backup-1
sstp-backup-2
sstp-backup-3

because they are dynamic, I can’t put an entry is OSPF interfaces to match, so I need to do this dynamically. I want the distance to be 20.

Is there a way to use a route filter, or any other mechanism to set any tunnel with a specific either secret or profile to be OSPF cost = 20?

You can make those tunnels static. Just add entry in “/interface sstp-server” menu.

Thanks mrz, that is what I have done, but the 120 sstp interfaces and 120 entries in OSPF interfaces look clumsy, was hoping for something a little more elegant.

If you want for all sstp interfaces distance to be 20, then add specific entries only for ethernets, and then add “all” entry with distance 20.
This “all” will be applied to any interface which is not manually configured in the list.

I have a bunch of sstp interfaces that should be 10. These backup interfaces are the only interfaces that should be 20. Also have some old pptp interfaces that should be 10 until they get decommissioned.