Community discussions

MikroTik App
 
tom65
newbie
Topic Author
Posts: 27
Joined: Mon Mar 18, 2019 8:24 pm
Location: South Africa

Address Lists

Fri May 15, 2020 10:16 pm

I am using the "ip cloud" DYNDNS of my mikrotiks to create a whitelist for connection to my central router. The problem comes in tracking which entries are to be removed when necessary which leaves me with an ever growing list. I would like to put a time stamp of 30 days on each entry and reset the timer back to 30 days if I can ping the fqdn once every hour. This will purge any routers that becomes redundant for my purpose. i.e. the entry will eventually timeout after 30 days of inactivity.

I need to ping all entries in the address list list=name.
I can't seem to extract only the fqdn part for use in my ping script.

Could someone please lend a hand.
 
2frogs
Forum Veteran
Forum Veteran
Posts: 713
Joined: Fri Dec 03, 2010 1:38 am

Re: Address Lists  [SOLVED]

Sat May 16, 2020 5:19 am

:foreach i in=[/ip fire add find where list=name address~".net"] do={:if ([/ping [/ip fire add get $i value-name=address] interval=1s count=5]>0) do={/ ip fire add set $i timeout=30d}}
:D
 
tom65
newbie
Topic Author
Posts: 27
Joined: Mon Mar 18, 2019 8:24 pm
Location: South Africa

Re: Address Lists

Sat May 16, 2020 10:41 am

:foreach i in=[/ip fire add find where list=name address~".net"] do={:if ([/ping [/ip fire add get $i value-name=address] interval=1s count=5]>0) do={/ ip fire add set $i timeout=30d}}
:D
Thanks, you are a star !!

Who is online

Users browsing this forum: yogsoncdw and 82 guests