0x767676 / crowdsec-mikrotik

Propagating CrowdSec's decisions to firewalls
12 stars 0 forks source link

Adding the same ip adresses #1

Open kivimart opened 2 years ago

kivimart commented 2 years ago

Hello.

The script is adding the same ip adresses in the list over and over again making the import to mikrotik halt with error.

I am using centos stream to create the list with default options in the script.

Thanks

kivimart commented 2 years ago

I replaced the TMPRSC .rsc in the script to allow to continue on error.

echo "add list=cs-block address=$line" >> $_TMPRSC

echo ":do {add list=cs-block address=$line } on-error={}" >> $_TMPRSC

Still get duplicates but it continues on error.

williamdes commented 1 year ago

You can use /ip firewall address-list remove [find list=CrowdSec]

See: https://github.com/crowdsecurity/cs-blocklist-mirror/pull/20/files#diff-b0eb89720f9a59c916072f769482b170f029c09990f8bb20105b058110757acaR41