OPNsense Forum

Archive => 21.1 Legacy Series => Topic started by: Jiffy on April 28, 2021, 07:42:44 PM

Title: Can a received route via ospf be filtered out?
Post by: Jiffy on April 28, 2021, 07:42:44 PM
Hi,

I've installed opnsense and following the docs, I was able to get ipsec, qos and ospf working, but what I can't seem to figure out is how to filter out a specific route received via ospf.
I have found one topic, very old in the 17.1 forum, asking the same, but it was never answered.
I also found a similar question in the 18.1 forum with a vague answer stating refer to the frr docs.
The rest I've found explain how to not export a route.
So, basically my questions are, can this be done and can it be done through the gui?
For example, I am receiving a route for 192.168.10.0/24 and would like ospf to ignore it.

Thank you,
Jiffy
Title: Re: Can a received route via ospf be filtered out?
Post by: Patrick M. Hausen on April 28, 2021, 07:48:44 PM
If the other router is part of the same area from OSPF's point of view, it is fundamentally impossible to filter. All routers in one area must share the same link state database by design.

You can filter on area borders and AS borders, if the implementation supports that. Cisco IOS for one does.

See John T. Moy, "OSPF", if you want to know all the gory details.

Of course it could be perfectly feasible to manage the whole LSDB in the control plane but filter what gets put into the forwarding information base of the data plane. I don't know of any product that supports that.
Title: Re: Can a received route via ospf be filtered out?
Post by: Jiffy on April 28, 2021, 07:58:45 PM
Understood, thank you very much!
Jiffy
Title: Re: Can a received route via ospf be filtered out?
Post by: mimugmail on April 29, 2021, 06:22:36 AM
And if you need to filter, use the prefix lists, but please not inside ascstated. Via IPsec I usually prefer BGP, but only my own taste