LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-09-2008, 08:11 AM   #1
mrtwice
Member
 
Registered: Feb 2002
Distribution: xubuntu 8.10
Posts: 225

Rep: Reputation: 31
fail2ban best method of blocking brute force attempts?


Just about everyday I get stuff like this in my logwatch email:
Code:
    dovecot[3330]: auth(default): shadow(willy,190.172.84.80): unknown user: 1 Time(s)
    dovecot[3330]: auth(default): shadow(willy,200.81.220.62): unknown user: 1 Time(s)
    dovecot[3330]: auth(default): shadow(wilson,190.172.84.80): unknown user: 2 Time(s)
    dovecot[3330]: auth(default): shadow(winston,190.172.84.80): unknown user: 1 Time(s)
    dovecot[3330]: auth(default): shadow(winston,200.81.220.62): unknown user: 1 Time(s)
    dovecot[3330]: auth(default): shadow(www,190.172.84.80): unknown user: 1 Time(s)
    dovecot[3330]: auth(default): shadow(www,200.81.220.62): unknown user: 1 Time(s)
    dovecot[3330]: auth(default): shadow(xavier,190.172.84.80): unknown user: 1 Time(s)
    dovecot[3330]: auth(default): shadow(xavier,200.81.220.62): unknown user: 1 Time(s)
    dovecot[3330]: auth(default): shadow(zachary,190.172.84.80): unknown user: 2 Time(s)
    dovecot[3330]: auth(default): shadow(zack,190.172.84.80): unknown user: 1 Time(s)
    dovecot[3330]: auth(default): shadow(zack,200.81.220.62): unknown user: 1 Time(s)
I also get stuff like this:
Code:
(amrbekbmr.com) [114.44.147.232]: 535 Incorrect authentication data (set_id=inna): 1 Time(s)
 2008-12-06 14:42:24 login authenticator failed for 114-44-147-232.dynamic.hinet.net (gdpipenv.com) [114.44.147.232]: 535 Incorrect authentication data (set_id=inna): 1 Time(s)
 2008-12-06 14:42:25 login authenticator failed for 114-44-147-232.dynamic.hinet.net (gdpipenv.com) [114.44.147.232]: 535 Incorrect authentication data (set_id=inna): 1 Time(s)
 2008-12-06 14:42:27 login authenticator failed for 114-44-147-232.dynamic.hinet.net (gdpipenv.com) [114.44.147.232]: 535 Incorrect authentication data (set_id=inna): 1 Time(s)
 2008-12-06 14:42:29 login authenticator failed for 114-44-147-232.dynamic.hinet.net (gdpipenv.com) [114.44.147.232]: 535 Incorrect authentication data (set_id=inna): 1 Time(s)
I did a some looking on this forum and saw a post on fail2ban, which looks promising. But I wondering if there is a better/more preferred way of dealing with this stuff.

Thanks.
 
Old 12-09-2008, 10:01 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
fail2ban is nice certainly, but does build up potentially large iptables rules if that's an issue for you. You can have simpler methods using the iptables limit module to only allow so many connections in a given time and then block them out if that's exceeded, which is non-persistent but pretty effective.
 
Old 12-09-2008, 10:01 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
fail2ban is nice certainly, but does build up potentially large iptables rules if that's an issue for you. You can have simpler methods using the iptables limit module to only allow so many connections in a given time and then block them out if that's exceeded, which is non-persistent but pretty effective.

http://kevin.vanzonneveld.net/techbl...with_iptables/
 
Old 12-09-2008, 10:52 AM   #4
mrtwice
Member
 
Registered: Feb 2002
Distribution: xubuntu 8.10
Posts: 225

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by acid_kewpie View Post
fail2ban is nice certainly, but does build up potentially large iptables rules if that's an issue for you. You can have simpler methods using the iptables limit module to only allow so many connections in a given time and then block them out if that's exceeded, which is non-persistent but pretty effective.

http://kevin.vanzonneveld.net/techbl...with_iptables/
Good read, thanks for the info and link.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Preventing Brute Force Attacks With Fail2ban On Mandriva 2008.1 LXer Syndicated Linux News 0 09-01-2008 07:30 AM
LXer: Preventing Brute Force Attacks With Fail2ban On Fedora 9 LXer Syndicated Linux News 0 08-27-2008 03:11 PM
LXer: Preventing Brute Force Attacks With Fail2ban On OpenSUSE 10.3 LXer Syndicated Linux News 0 10-15-2007 03:50 PM
LXer: Fail2ban - Put brute force attackers away from your Linux Box LXer Syndicated Linux News 0 10-13-2007 11:20 AM
LXer: Preventing Brute Force Attacks With Fail2ban On Debian Etch LXer Syndicated Linux News 0 05-03-2007 02:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration