Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    51
    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,888
    Likes Received:
    90
    Trophy Points:
    78
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,183
    Likes Received:
    1,935
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    1,011
    Likes Received:
    89
    Trophy Points:
    78
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice