Welcome to Centmin Mod Community
Become a Member

Security fail2ban for Centmin Mod + CSF Firewall / Cloudflare API

Discussion in 'System Administration' started by eva2000, May 12, 2017.

  1. pamamolf

    pamamolf Premium Member Premium Member

    3,476
    334
    83
    May 31, 2014
    Ratings:
    +641
    Local Time:
    5:30 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Hi :)

    George please remove from:
    Code:
    [nginx-auth]
    the:
    as it is included and checked from:
    Code:
    [nginx-auth-main]
    Also this one is not duplicated:
    Code:
    [shells]
    enabled = true
    filter = shells
    action = csfdeny[name=shells]
    #action   = cloudflare
    logpath = /home/nginx/domains/*/log/access.log
              /var/log/nginx/*.access.log
    bantime = 604800
    maxretry = 1
    findtime = 86400
    Can you please duplicated so we will have the logs separated?

    Thank you !
     
    • Like Like x 1
  2. eva2000

    eva2000 Administrator Staff Member

    41,668
    9,380
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,413
    Local Time:
    12:30 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    fixed :D
     
    • Like Like x 1
  3. pamamolf

    pamamolf Premium Member Premium Member

    3,476
    334
    83
    May 31, 2014
    Ratings:
    +641
    Local Time:
    5:30 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    I just update it but [shells] is not duplicated :(

    It seems you forgot one fix :)
     
    Last edited: Sep 11, 2017
    • Agree Agree x 1
  4. pamamolf

    pamamolf Premium Member Premium Member

    3,476
    334
    83
    May 31, 2014
    Ratings:
    +641
    Local Time:
    5:30 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    I will wait for that edit to do a proper test from start :)
     
  5. eva2000

    eva2000 Administrator Staff Member

    41,668
    9,380
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,413
    Local Time:
    12:30 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    done :D
     
  6. pamamolf

    pamamolf Premium Member Premium Member

    3,476
    334
    83
    May 31, 2014
    Ratings:
    +641
    Local Time:
    5:30 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Now all are working great for me when i test it from scratch :)

    Don't know if it is possible to get at the Cloudflare ban as a comment the same as csf comment...

    For example Fail2ban and the jail name so we will know why the ip was banned (from the cloudflare panel) without going to the server and grep the ip or check it using the fail2ban status option.... ?
     
    • Like Like x 1
  7. eva2000

    eva2000 Administrator Staff Member

    41,668
    9,380
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,413
    Local Time:
    12:30 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    i tried and couldn't get comments added but will look into it
     
    • Like Like x 1
  8. pamamolf

    pamamolf Premium Member Premium Member

    3,476
    334
    83
    May 31, 2014
    Ratings:
    +641
    Local Time:
    5:30 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Isn't ready to use the latest add for adminer detection?

    As i can see on github you comment it as preparation for it....
     
  9. eva2000

    eva2000 Administrator Staff Member

    41,668
    9,380
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,413
    Local Time:
    12:30 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    yeah ain't ready yet, need to research for better fail2ban regex matching for adminer scan entries in logs
     
    • Informative Informative x 1
  10. Tinkerd10

    Tinkerd10 New Member

    21
    3
    3
    Sep 28, 2016
    Ratings:
    +13
    Local Time:
    3:30 AM
    1.11
    5.5
    Hi

    I tested this last month on centos 7 and it worked perfectly it was like magic lol, and i was hoping if there is a version for centos 6 as i'am swarmed with bots to the point where i can't even use my own website.

    thank you
     
    • Like Like x 1
  11. eva2000

    eva2000 Administrator Staff Member

    41,668
    9,380
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,413
    Local Time:
    12:30 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Thanks for the feedback. CentOS 7 for now until it's perfected :D
     
  12. GamerJota

    GamerJota Member

    56
    7
    8
    Mar 1, 2016
    Chile
    Ratings:
    +18
    Local Time:
    11:30 PM
    Anyone got a good example for XenForo 2 forum login and admin panel login limit?
     
    Last edited: Mar 11, 2018
  13. eva2000

    eva2000 Administrator Staff Member

    41,668
    9,380
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,413
    Local Time:
    12:30 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    • Informative Informative x 1
  14. GamerJota

    GamerJota Member

    56
    7
    8
    Mar 1, 2016
    Chile
    Ratings:
    +18
    Local Time:
    11:30 PM
    Oh my, just got confused out.

    Okay, sorted out the fail2ban and it's working, thank you.

    What about the virtual host "location" to catch the forums' login and register and also the login in the admin panel to add a limit_req_zone? Can't figure it out by myself. o_O
     
  15. eva2000

    eva2000 Administrator Staff Member

    41,668
    9,380
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,413
    Local Time:
    12:30 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    that isn't part o fail2ban setup so start a new thread in subforum at Forum software usage.
     
    • Like Like x 1
  16. eva2000

    eva2000 Administrator Staff Member

    41,668
    9,380
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +14,413
    Local Time:
    12:30 PM
    Nginx 1.17.x
    MariaDB 5.5/10.x