edgenative / mikrotik-irrupdater

Scripts to automatically deploy strict IRR filters to your peers on Mikrotik routers.
GNU General Public License v3.0
12 stars 2 forks source link

Feature request: set afi for peer #3

Closed baragoon closed 6 months ago

baragoon commented 6 months ago

Hi, When peering session is single afi (ipv4 or ipv6) it will be nice to mark peer with apropriate afi, to prevent unneded filters to be pushed to the router. For example: peering session is ipv6 only, but filters are generated and pushed for both afis, as result alot of unsed rules are exists at router. Thank you.

edgenative commented 6 months ago

I'll take a look -- so far, all of my peers are dual-stack -- but something I'd thought about fixing

edgenative commented 6 months ago

Actually, this was super simple to add. Feature added :-)

The sessions.conf will now accept a 4th parameter of either ipv4 or ipv6. If you don't specify, it'll push both sets of filters to the router. if you specify it'll push the specified affinity.

For example, in sessions.conf for an IPv4 only session

32934,sfmix,router-name,ipv4

for an ipv6 only session

32934,sfmix,router-name,ipv6

and for both;

32934,sfmix,router-name

The only file which needs to be updated from the repo is pushfilters.sh. Let me know if this worked for you

baragoon commented 6 months ago

Actually, this was super simple to add. Feature added :-)

The sessions.conf will now accept a 4th parameter of either ipv4 or ipv6. If you don't specify, it'll push both sets of filters to the router. if you specify it'll push the specified affinity.

For example, in sessions.conf for an IPv4 only session

32934,sfmix,router-name,ipv4

for an ipv6 only session

32934,sfmix,router-name,ipv6

and for both;

32934,sfmix,router-name

The only file which needs to be updated from the repo is pushfilters.sh. Let me know if this worked for you

Hi Lee, Works for me, thank you!

edgenative commented 6 months ago

Perfect! Glad that worked out :)