i cut some not usefull routes from incoming and outgoing redistribute like this on my cisco router
i leave only needed routes in this example
…
router ospf 999
router-id X.X.X.X
log-adjacency-changes
network X.X.X.X 0.0.0.7 area 0
distribute-list 30 out
distribute-list 30 in
…
access-list 30 permit Y.Y.Y.0 0.0.0.63
access-list 30 permit Z.Z.Z.0 0.0.0.127
access-list 30 permit A.A.A.128 0.0.0.127
access-list 30 permit S.S.S.0 0.0.0.255
…
Is there a way of blocking large segment of distributed routes instead of filthering exact small segments? For example, I have /30 networks that are distributed and are part of /24 segment, and when I try to use more globar rule it does nothing. I have to have exact rule for every distributed network in route list, no matter the size?