Hello there!
I’ve created little Linux script, that is blocking at MikroTi’s firewall failed login attempts made on Linux servers
This script will parse secure/auth logs from local (or remote) system and based on fail login attempts will:
- create unwanted IP list,
- download already blocked list from MikroTik,
- compare both lists,
- add new unwanted IP to Mikrotik block list
- Naturally initial run of this script will require some time and resources to parse (which can be avoided, se below), each next run require minimum amount of effort to finish. To best performance using logrotate is advised.
Additionally because blocking is maintained by MikroTik router all servers are protected.
I want to avoid copying to much text so please check my github ![]()
https://github.com/urbinek/fail2mtblock
also some suggestions in improvement would be nice