The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

CSF to block dovecot login failures?

Discussion in 'Security' started by ukzembla, Sep 10, 2014.

  1. ukzembla

    ukzembla Member

    Joined:
    Feb 9, 2010
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I'm getting hundreds of errors from people presumably trying to brute force attack my server. There are 3-4 tries for random common usernames for dovecot, presumably picked from a list of common usernames, and I'd like to block the attacker. The only problem is that I can't see an IP address in the log. Is this something that can be done with CSF, or do I need to enable CPHulk too for this kind of issue?

    dovecot: auth: Error: Cpanel::MailAuth: Failed to getpwnam for user abc123
    dovecot: auth: Error: Cpanel::MailAuth: Failed to getpwnam for user access

    Thanks!
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    Have you enable " Login Failure Detection " in your CSF firewall setting ? I will suggest you to enable it and configure it as per your setting
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,707
    Likes Received:
    658
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You can have CSF/LFD detect and block the brute force attempt automatically. Or, if you prefer to manually block the IP address, you should be able to find the IP address in /var/log/maillog directly before/after the entries you posted.

    Thank you.
     
  4. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    940
    Likes Received:
    55
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    LFD should be parsing dovecot failures already. If you are experienced with regex (regular expressions) you can use a custom file (regex.custom.pm) with CSF to create your own ways to block based on log entries. This requires setting the custom log paths in csf.conf in addition to the needed regex knowledge.
     
Loading...

Share This Page