Answer the question
In order to leave comments, you need to log in
How to get an IP address from a Mikrotik address sheet via a query from a script?
Friends, comrades, help find a solution.
There is Mikrotik, there are rules for adding sheets to the address: 1, 2, 3, Drop.
Evil people, when they push towards me, end up on sheet 1, on the second attempt, on sheet 2, and so on.
Bottom line: entries in the sheets are duplicated, I want to remove this. I came up with a solution: remove everything that is in the Drop sheet from other sheets.
Question: how to remove the ip address from the address of the sheet in the script, so that we can then go through the rest of the sheets and remove duplicates?
It turns out to take out the entire sheet, but it’s the address that would then find duplicates, it doesn’t work. Thank you.
Answer the question
In order to leave comments, you need to log in
He asked, he answered.
:local clearing "/ip firewall address-list\r\n";
:foreach i in=[/ip firewall address-list print as-value where list=x4rt_Drop] do={
:set $clearing ("add address=".$i->"address");
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question