Community discussions

MikroTik App
 
dakky21
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 85
Joined: Sat Sep 17, 2005 8:26 pm
Location: Croatia

Drop FTP connections after x times?

Fri Apr 15, 2011 7:12 pm

I dont know if this is the right forum to ask, as I don't know if this should go into scripting forum or here.

I didn't set-up FTP server behind my MT and did not forward port 21 to any IP behind router.
FTP server service on MT is running and I want it to keep running.
I get daily more than 30000 unsuccessful attempts to login to MT ftp server, sometimes by user "Administrator", sometimes by another user (root/admin/anything-else)

Need to make MikroTik "blacklist" IP from which the "attack" is coming, after 5 unsuccessful attempts, for let's say, 24 hours.

Any help?

Thank you !!!!!
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Drop FTP connections after x times?

Fri Apr 15, 2011 7:14 pm

http://wiki.mikrotik.com/wiki/Bruteforc ... prevention

Though unless you need the FTP server to be open and accessible from EVERYWHERE, it would be far better to just restrict access:
/ip firewall address-list
add list=FTP-OK-from-here address=192.168.0.0/24
add list=FTP-OK-from-here address=1.1.1.1/24
/ip firewall filter
add chain=input protocol=tcp dst-port=21 src-address-list=FTP-OK-from-here action=accept
add chain=input protocol=tcp dst-port=21 action=drop
 
dakky21
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 85
Joined: Sat Sep 17, 2005 8:26 pm
Location: Croatia

Re: Drop FTP connections after x times?

Fri Apr 15, 2011 7:18 pm

Thank you very very much !!!

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], GoogleOther [Bot], noyo, plastilin and 216 guests