Community discussions

MikroTik App
 
Qrew
just joined
Topic Author
Posts: 10
Joined: Mon Aug 16, 2010 6:39 pm

Block IP after X login failures

Wed Sep 15, 2010 8:43 am

Is there a way to automatically block IP-adresses after X times login failures and put them on the block list for XX hours?

So if host 66.344.222.35 is trying to login in my routerboard 5 times and do not succed, routerboard automatically put this IP to drop packets from it on the firewall.

is that possible?


Regards Peter
 
dssmiktik
Forum Veteran
Forum Veteran
Posts: 732
Joined: Fri Aug 17, 2007 8:42 am

Re: Block IP after X login failures

Wed Sep 15, 2010 8:52 am

No, not natively supported.

You could, however, parse the log for failed login attempts, disabling accounts (or block IP) once a threshold is reached.
This should get you started: Log Parser - Event Trigger Script
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7056
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Block IP after X login failures

Wed Sep 15, 2010 8:57 am

To block ssh and ftp bruteforcers, use this one
http://wiki.mikrotik.com/wiki/Bruteforc ... prevention
 
angboontiong
Forum Guru
Forum Guru
Posts: 1136
Joined: Fri Jan 16, 2009 9:59 am

Re: Block IP after X login failures

Sat Mar 18, 2017 5:15 pm

To block ssh and ftp bruteforcers, use this one
http://wiki.mikrotik.com/wiki/Bruteforc ... prevention
I can see the ip in the blacklist, however, the ip in the blacklist still attempting to access according to the log ...
 
IntrusDave
Forum Guru
Forum Guru
Posts: 1286
Joined: Fri May 09, 2014 4:36 am
Location: Rancho Cucamonga, CA

Re: Block IP after X login failures

Sat Mar 18, 2017 7:56 pm

You need to put in a filter rule (preferably in the RAW table) to block the blacklisted IP's
 
angboontiong
Forum Guru
Forum Guru
Posts: 1136
Joined: Fri Jan 16, 2009 9:59 am

Re: Block IP after X login failures

Mon Mar 20, 2017 7:52 am

You need to put in a filter rule (preferably in the RAW table) to block the blacklisted IP's

end up, i add this in:
add chain=input src-address-list=ssh_blacklist action=drop comment="drop ssh brute forcers IP" disabled=no
 
IntrusDave
Forum Guru
Forum Guru
Posts: 1286
Joined: Fri May 09, 2014 4:36 am
Location: Rancho Cucamonga, CA

Re: Block IP after X login failures

Mon Mar 20, 2017 5:33 pm

That's find, but make sure that the rule is placed above any accept rule for established connections.

Who is online

Users browsing this forum: GoogleOther [Bot], jhbarrantes, kormenator and 29 guests