
21st June 2008, 04:12
|
|
Member
|
|
Join Date: Oct 2007
Posts: 91
Thanks: 10
Thanked 2 Times in 2 Posts
|
|
smtp block brute force attacks
Hi guys,
I'm getting a lot of smtp brute force attacks lately and on my /var/log/secure logs they don't even list the IP of the person trying the attacks. They look like this :
Quote:
Jun 19 16:24:27 server1 saslauthd[2048]: pam_unix(smtp:auth): check pass; user unknown
Jun 19 16:24:27 server1 saslauthd[2048]: pam_unix(smtp:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
Jun 19 16:24:27 server1 saslauthd[2048]: pam_succeed_if(smtp:auth): error retrieving information about user 123456
Jun 19 16:24:29 server1 saslauthd[2047]: pam_unix(smtp:auth): check pass; user unknown
Jun 19 16:24:29 server1 saslauthd[2047]: pam_unix(smtp:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
Jun 19 16:24:29 server1 saslauthd[2047]: pam_succeed_if(smtp:auth): error retrieving information about user notused
Jun 19 16:24:29 server1 saslauthd[2049]: pam_unix(smtp:auth): check pass; user unknown
Jun 19 16:24:29 server1 saslauthd[2049]: pam_unix(smtp:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
Jun 19 16:24:29 server1 saslauthd[2049]: pam_succeed_if(smtp:auth): error retrieving information about user Hockey
|
What's the best way to block these attacks? Thanks
|

21st June 2008, 10:42
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,185 Times in 3,202 Posts
|
|
If you know the IP of the attacker, you might use this command:
/sbin/route add -host 123.123.123.123 reject
|

21st June 2008, 10:42
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
|

21st June 2008, 14:53
|
|
Member
|
|
Join Date: Oct 2007
Posts: 91
Thanks: 10
Thanked 2 Times in 2 Posts
|
|
Is there a fail2ban tutorial for Centos 5?
|

21st June 2008, 14:58
|
|
Member
|
|
Join Date: Oct 2007
Posts: 91
Thanks: 10
Thanked 2 Times in 2 Posts
|
|
Quote:
Originally Posted by till
If you know the IP of the attacker, you might use this command:
/sbin/route add -host 123.123.123.123 reject
|
Till, how do I find out the IP? Normally I also see the IP on the log file, but for these there's nothing. Thanks
|

22nd June 2008, 13:47
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Quote:
Originally Posted by tal56
Is there a fail2ban tutorial for Centos 5?
|
Unfortunately no...
|

28th August 2008, 21:05
|
|
Member
|
|
Join Date: Aug 2006
Posts: 32
Thanks: 6
Thanked 4 Times in 2 Posts
|
|
Quote:
Originally Posted by tal56
Is there a fail2ban tutorial for Centos 5?
|
I saw this post so I put up my notes. It's not a full howto, but it's close.
I run ISPC on Centos 5.2.
http://www.sonoracomm.com/support/18...t/228-fail2ban
G
Last edited by sonoracomm; 28th August 2008 at 21:46.
|

28th August 2008, 21:27
|
|
Member
|
|
Join Date: Oct 2007
Posts: 91
Thanks: 10
Thanked 2 Times in 2 Posts
|
|
Thanks for that, I would have helped a couple weeks ealier as I finally took the plunge and installed fail2ban. It's been working great since as far as I can tell. Only banned 2 people, but haven't had much brute force attacks since I've installed. As far as I can tell it's stopped the only 2 I've got. This may be also because I've done some other stuff to secure the server too, like change ports for SSH.
|

28th August 2008, 21:43
|
|
HowtoForge Supporter
|
|
Join Date: May 2006
Posts: 238
Thanks: 0
Thanked 12 Times in 11 Posts
|
|
I'd suggest installing ossec and allow it to handle hosts.deny file and firewall which means stuff like this will be automaticlly stopped.
|

28th August 2008, 21:45
|
|
Member
|
|
Join Date: Aug 2006
Posts: 32
Thanks: 6
Thanked 4 Times in 2 Posts
|
|
I have fail2ban on 3 servers. They all have SSH, two have web servers and one has mail and ftp as well.
I have 250 or more bans every day between the 3 servers!
G
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 01:06.
|
Recent comments
1 day 16 hours ago
2 days 49 min ago
2 days 3 hours ago
2 days 4 hours ago
2 days 6 hours ago
2 days 8 hours ago
2 days 9 hours ago
2 days 10 hours ago
3 days 2 hours ago
3 days 3 hours ago