Community discussions

MikroTik App
 
Byron
just joined
Topic Author
Posts: 20
Joined: Sun Jan 09, 2022 6:46 pm

OSPF OUT Routing Filters issue

Wed Nov 15, 2023 4:21 pm

Hi all,

I have a situation where I want to use ROS 7 OSPF filters to stop routes from being send OUT of a VPN interface but I still want to learn Routes coming IN via the VPN.

basically it should be along the lines of this: If (routes coming from VPN){accept} / IF (routes going out VPN){reject;}

I have no idea how to go about the rules and what it should be. any help if possible, im running ROS 7.12.

I goal is to just lessen the routing table so I will be adding a static block to go via the VPN instead of individual routes being learned.
 
User avatar
payam124
Trainer
Trainer
Posts: 19
Joined: Thu Jan 07, 2016 11:44 pm
Location: https://MoLuke.net
Contact:

Re: OSPF OUT Routing Filters issue

Thu Nov 16, 2023 6:19 pm

Explain more about the use case
 
Byron
just joined
Topic Author
Posts: 20
Joined: Sun Jan 09, 2022 6:46 pm

Re: OSPF OUT Routing Filters issue

Thu Nov 16, 2023 8:32 pm

Basically I have a VPN from site A to Site B.

Site A must distribute routes to site B but Site B must not Distribute to Site A. (I instead will use a static route for a signle big block to route the missing routes once they have been blocked.)
 
Byron
just joined
Topic Author
Posts: 20
Joined: Sun Jan 09, 2022 6:46 pm

Re: OSPF OUT Routing Filters issue

Thu Nov 16, 2023 8:33 pm

Explain more about the use case
Above - forgot to quote your reply. :)
 
Byron
just joined
Topic Author
Posts: 20
Joined: Sun Jan 09, 2022 6:46 pm

Re: OSPF OUT Routing Filters issue

Mon Nov 27, 2023 1:49 pm

got it working.
 
Byron
just joined
Topic Author
Posts: 20
Joined: Sun Jan 09, 2022 6:46 pm

Re: OSPF OUT Routing Filters issue  [SOLVED]

Mon Nov 27, 2023 1:51 pm

This is the filter rule I used.

add chain=ospf-in comment=Middle disabled=no rule="if (gw in x.x.x.x){reject}"

Where x.x.x.x is the IP address of the said interface.

Who is online

Users browsing this forum: No registered users and 5 guests