Hello folks
I have several servers and just one public IP address. So I’m NATing everything.
On the log at the ftp server there are a ton of “authenication failure”. I want to block the IP’s to those who are trying to brute force my ftp. And since routeros is reading NAT before Filter Rules I have to somehow find all packets that returns the error message from the ftp server, log the IP address to an address list and then block it for some time.
I’m not the best at explaining things so I hope some of you are following this.
I will try to sum up:
- find all outgoing packets that has the message “530 Login incorrect.” (this is what the ftp server returns to the client)
- If it has returned this 5 times within short time then
- add the address to an Address list that blocks the IP for about 10 days or so
This is what I have in my Regexp now “.Login incorrect.” and it is not working, or I’m not setting the NAT rule correct - or something
Any suggestions?
Regards
Erlend
(Who is banging his head against the keyboard now)