I think I got it figured out. There were actually two things I needed to change.
-
I was using the /routing ospf interface-template add …networks= attribute with the 0.0.0.0/0 network. Apparently MikroTik ignores the filter rules if the default network is being used. I switched to using the /routing ospf interface-template add …interfaces= parameter.
-
My routes were not being shared when using the /routing ospf interface-template add …interfaces= parameter and the following filter
/routing filter rule
add chain=ospf-out disabled=no rule="if ( dst in 66.2.148.252/29 ) { reject; }"
Apparently filter rules default to reject unless there is an accept rule. I found that I needed to do one of two things. (1) Add an “else” path to the filter rule like this:
/routing filter rule
add chain=ospf-out disabled=no rule="if ( dst in 66.2.148.252/29 ) { reject; } else { accept; }"
or (2) add a “catch all” rule to accept anything not rejected like this:
/routing filter rule
add chain=ospf-out disabled=no rule="if ( dst in 66.2.148.252/29 ) { reject; }"
add chain=ospf-out disabled=no rule="accept;"
The second option gives a little more flexibility if you want multiple “reject” rules and don’t want to combine it all into one.