The next script works great on RouterOS V7.x but I prefer a foreach one if possible.
The issue is that I have a device with more then 60k Connections tracked and when I am trying one of the scripts above with foreach it does a "find" per connection and it takes forever to flush the connections.
The issue is that I have a device with more then 60k Connections tracked and when I am trying one of the scripts above with foreach it does a "find" per connection and it takes forever to flush the connections.
Code:
{ do {:local e 1;:while ($e=1 ) do { :set e 0; :do {/ip/firewall/connection/remove [find];} on-error={:set e 1;:log info "error 1 removing FW connection";}}:log info "SUCCESS removing FW connection";} on-error={:log info "error 2 removing FW connection";}}
Statistics: Posted by elico — Sun Mar 03, 2024 12:31 pm