Due to many reasons, I can not harden my RouterOS box’s to the point to only allow certain IP’s to access ssh/winbox nor will port knocking work for me. Due to this, I often find boards underperforming due to constant login attempts from unauthorized users.
I simply add a firewall rule dropping all traffic from this IP.
Is there a script available that would do this for me automatically based on, lets say, 10 failed login attemps?
You will of course have to add a firewall rule to drop traffic for SSHAttack in the appropriate spot as well as schedule this script to run how ever often you want it to.
Another simple way thats more efficient is to just use the NTH rule with SYN packets on port 22. Set it very low so that anyone probing that port more than 1-2 times is going to get tarpitted for a while. Your valid ssh connections will get thru because your a human : )
Also - if you really want to make it better then just change your ssh port from 22 to something else.
That did the trick. Unfortunately I have one board that has attempts via FTP. I’ve changed the ftp port as well and the attempts still occur. Any suggestions?