OSPF inbound filtering

Hi, can someone tell me how can i filter out some routes received via ospf?
I’d like to filter path to 0.0.0.0/0 that i’m recieving from another router.

Hello.
You need something like this:

set policy prefix-list deny-default rule 10 action 'permit'
set policy prefix-list deny-default rule 10 prefix '0.0.0.0/0'

set policy route-map OSPF-IN rule 10 action 'deny'
set policy route-map OSPF-IN rule 10 match ip address prefix-list 'deny-default'
set policy route-map OSPF-IN rule 20 action 'permit

set protocols ospf route-map 'OSPF-IN'

sever@second:~$ sh ip route ospf
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
F - PBR, f - OpenFabric,
> - selected route, * - FIB route

O 0.0.0.0/0 [110/10] via 192.192.192.1, eth2 inactive, 00:10:39

I had documented all this in the Wiki somewhere, but it may have got lost when everything was moved to readthedocs 8-\

Hi,

One more question. Can I distinguish between input and output filters in OSPF configuration?

For output filter you use redistribute option.
For input you can use example above.
As far as I know, In Frr/quagga/cisco/brocade… There are not options for the ospf to have import/export policy’s example how it implement in the bgp protocol.