can anyone help me how to convert all dynamic entries in address-list to normal static entry ? I have used addr-list to block attackers (portscan, port traps..) but all IPs are added to list as dynamic and manualy ,convert, all ,D, to ,nonD, is little bit time consume and tiresome (daily about 50-100 IPs)…Any script can to do this ?
A better choice might be to expire them after 7d or something longer - do you really want to make them static and then have to decide which to remove when it gets too unmanageable? If not, i could write something that looped thru them and added them, but it would make your router hit 100% cpu probably : )
PS - We have a dual stage address-list being used as a greylist for mail servers. It regularly has 80-100k addresses in this address-list and it chugs away fine. It has stopped a huge # of zombies from hitting mail services.
thanks for intersting
If you can help, help me
I used this list for blacklisting attackers, this list also exported to mysql db and in changed form imported back to router under another name (this is ,managment,) It sounds crazy but its very effective, because this list (from sql) I also generate to DNS zone and use in our mailservers , I think peoples (IPs..) who try to touch SSH port, aggresive port scan or touching NetBios ports from outside is not ,normal, users but potential spammers or attackers This system works perfectly and save a lot of traffic and a lot of spamms.
Again, if you know how to change dynamic entries in list to static I will be very happy (you save me a lot of work)
:foreach i in=[/ip firewall addr find list=dynamic-list ]\
do= { \
:set w [/ip fire addr get $i address]
/ip fire add rem [/ip fi add find address=$w]
/ip fire add add list=static-list address=$w
}
thanks all, seems it work fine, I go experimenting
but also another small q Its possible remove by script whole list by ,list name, ?
For similar thing can be used the same script but without ,/ip fire add add list=static-list address=$w, but it delete IP in all lists, I need only remove whole list by his name.