+ Reply to Thread
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 21

Thread: RoundCube Fail2Ban Plugin

  1. #11
    mdr's Avatar
    mdr
    mdr is offline Registered User
    Join Date
    Aug 2008
    Location
    Saint Paul, MN, USA
    Posts
    12
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by jannol View Post
    ... only thing is that when banned the login page just sits there trying to login forever pretty much.

    Should it display some sort of message or something at login page?
    jannol, since the client is blocked at the IP level and not via RoundCube, the blocked user is no longer "talking" to your webserver so we can not show a message saying anything.

    If the blocked client were to do a <Shift> refresh they should get a "Server not found" type message since the webserver will no longer respond to that clients IP address.

  2. #12
    mdr's Avatar
    mdr
    mdr is offline Registered User
    Join Date
    Aug 2008
    Location
    Saint Paul, MN, USA
    Posts
    12
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by oldschool View Post
    For me the jail looks like this on Opensuse 11.1:

    --- schnipp ---
    [roundcube]
    # 0.3 and up plugin-support

    enabled = false
    port = http,https
    filter = roundcube
    action = iptables-multiport[name=roundcube, port="http,https"]
    sendmail-whois[name=RC-Webmail, dest=root@weiss-du-doch.nett, sender=fail2ban]
    logpath = /srv/www/htdocs/webmail/logs/userlogins
    --- schnapp ---


    Rgds.
    Thanks oldschool, I have added your configuration to my how to for this plugin.

  3. #13
    ontnugtering is offline Registered User
    Join Date
    May 2010
    Posts
    25
    Downloads
    0
    Uploads
    0

    Default

    I've got 2 Roundcube incarnations on a web hosters resource.
    The one which triggers the localhosts IMAP does work.

    The one which triggers another IMAP server on a different host does not work. The log\userlogins file gets entries, but I can do failures as many as I want, I'm not getting locked. Whats wrong? Of course RC plugin is active in the main config files array.

    (rcdir\plugins\fail2ban\jail.conf)
    Code:
    [roundcube]
    enabled  = true
    port     = http,https
    filter   = roundcube
    logpath  = /www/htdocs/blah/rc_sks/logs/errors
    maxretry = 5
    findtime = 300
    bantime = 900
    
    [roundcube-24hr]
    enabled = true
    port = http,https
    filter = roundcube-24hr
    logpath = /www/htdocs/blah/rc_sks/logs/fail2ban.log
    maxretry = 10
    findtime = 1800
    bantime = 86400
    (rcdir\plugins\fail2ban\filter.d\roundcube.conf)
    Code:
    [Definition]
    failregex = IMAP Error: Authentication for .* \(\) failed \((?:LOGIN|AUTH)\):
    ignoreregex =
    Thanks!

  4. #14
    oldschool's Avatar
    oldschool is offline Registered User
    Join Date
    Jul 2007
    Posts
    173
    Downloads
    8
    Uploads
    0

    Default

    Quote Originally Posted by ontnugtering View Post
    I've got 2 Roundcube incarnations on a web hosters resource.
    The one which triggers the localhosts IMAP does work.

    The one which triggers another IMAP server on a different host does not work. The log\userlogins file gets entries, but I can do failures as many as I want, I'm not getting locked. Whats wrong? Of course RC plugin is active in the main config files array.

    (rcdir\plugins\fail2ban\jail.conf)
    Code:
    [roundcube]
    enabled  = true
    port     = http,https
    filter   = roundcube
    logpath  = /www/htdocs/blah/rc_sks/logs/errors
    maxretry = 5
    findtime = 300
    bantime = 900
    
    [roundcube-24hr]
    enabled = true
    port = http,https
    filter = roundcube-24hr
    logpath = /www/htdocs/blah/rc_sks/logs/fail2ban.log
    maxretry = 10
    findtime = 1800
    bantime = 86400
    (rcdir\plugins\fail2ban\filter.d\roundcube.conf)
    Code:
    [Definition]
    failregex = IMAP Error: Authentication for .* \(\) failed \((?:LOGIN|AUTH)\):
    ignoreregex =
    Thanks!
    Hi!

    Your prob could have many causes.

    For me i noticed the iptable action is not working very well and i switched to the "route"-ban command.

    In your case i would you to try out your "failregex filter".
    Many OSes interpreting this different.


    Have a nice day!



    Rgds.
    Last edited by oldschool; 12-06-2010 at 10:02 AM.

  5. #15
    oldschool's Avatar
    oldschool is offline Registered User
    Join Date
    Jul 2007
    Posts
    173
    Downloads
    8
    Uploads
    0

    Default

    Update for Opensuse 11.1:

    --- schnipp ---
    [roundcube]
    # 0.3 and up plugin-support

    enabled = true
    filter = roundcube
    action = route
    sendmail-whois[name=RC-Webmail, dest=root@weiss-du-doch.nett, sender=fail2ban]
    logpath = /srv/www/htdocs/webmail/logs/userlogins
    --- schnapp ---

    The Route-Ban Action:

    --- schnipp ---
    # Fail2Ban configuration file
    [Definition]
    actionban = ip route add unreachable <ip>;
    actionunban = ip route del unreachable <ip>;
    --- schnapp ---

    The IP-Table ban action makes probs.
    So this route-action is more usefull for Opensuse.




    Rgds.
    Last edited by oldschool; 06-29-2010 at 12:52 PM.

  6. #16
    qnrq is offline Registered User
    Join Date
    Mar 2010
    Location
    Sweden
    Posts
    22
    Downloads
    0
    Uploads
    0

    Default

    Why don't you just set imap rules for fail2ban?

  7. #17
    oldschool's Avatar
    oldschool is offline Registered User
    Join Date
    Jul 2007
    Posts
    173
    Downloads
    8
    Uploads
    0

    Default

    Quote Originally Posted by qnrq View Post
    Why don't you just set imap rules for fail2ban?
    If you asked me:
    As stated above, got some probs with MY opensuse systems.
    So i decided to use the route command...

    And the effect is the same: the blackhead is banned!




    Rgds.

  8. #18
    mattfox27 is offline Registered User
    Join Date
    Sep 2010
    Posts
    53
    Downloads
    0
    Uploads
    0

    Default

    I'm trying to get this to work on IIS is there a semi- preconfigured folder or zip file? I have tried all the jail.conf and all that diffrent stuff and can't seem to get it to work...

  9. #19
    JohnDoh is offline Super Moderator
    Join Date
    May 2007
    Posts
    1,206
    Downloads
    6
    Uploads
    0

    Default

    IIRC there is no version of fail2ban for windows, do you have fail2ban installed?

    (fail2ban is a bit of secuirty software, its nothing to do with roundcube)
    Roundcube Patches: Sieverules, SpamAssassin Prefs, and more…

  10. #20
    mattfox27 is offline Registered User
    Join Date
    Sep 2010
    Posts
    53
    Downloads
    0
    Uploads
    0

    Default

    Ya its installed but i just don't have it setup properly. There are many diffrent config version floating around i don't know which one to use.

+ Reply to Thread
Page 2 of 3 FirstFirst 1 2 3 LastLast

LinkBacks (?)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts