Hi all,
I've found how to run remote commands on the MikroTik board using SSH and a keyfile. I'm running fail2ban on my server in the DMZ, if someone tries to logon several time he/she is added the the server's iptable and all connections are blocked from the offending IP.
Rather then blocking the hosts in the server's IP Table I would like to use password-less SSH to have fail2ban add the offending IP to an address list on the MikroTik box. This shouldn't be too hard.. However:
Those IP's should not be permanent, is there any method to use the shell to add IP addresses to an address list with a time? I can do this:
/ip firewall address-list add address=x.x.x.x list=remote_evilhosts
What I would like too see:
/ip firewall address-list add address=x.x.x.x list=remote_evilhosts timeout=24h
or:
/ip firewall address-list add address=x.x.x.x list=remote_evilhosts dynamic=24h
Something like that, can it be done?