Get the most out of your Centmin Mod LEMP stack
Become a Member

Beta Branch add cloudflare.conf include file support

Discussion in 'Centmin Mod Github Commits' started by eva2000, Feb 15, 2016.

Tags:
  1. eva2000

    eva2000 Administrator Staff Member

    50,460
    11,661
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,082
    Local Time:
    8:55 PM
    Nginx 1.25.x
    MariaDB 10.x
    add cloudflare.conf include file support

    and tools/csfcf.sh script to update cloudflare.conf include file https://community.centminmod.com/posts/26591/ using command

    manually or setup a cronjob
    Code:
    /usr/local/src/centminmod/tools/csfcf.sh auto
    
    Continue reading...

    123.09beta01 branch


     
    Last edited: Feb 15, 2016
  2. rdan

    rdan Well-Known Member

    5,419
    1,386
    113
    May 25, 2014
    Ratings:
    +2,167
    Local Time:
    6:55 PM
    Mainline
    10.2
    What if I have the entries already added on csf.allow and csf.ignore?
    It will have duplicate?
     
  3. eva2000

    eva2000 Administrator Staff Member

    50,460
    11,661
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,082
    Local Time:
    8:55 PM
    Nginx 1.25.x
    MariaDB 10.x
    only new 123.09beta01 installs - does nothing to existing installs
     
  4. rdan

    rdan Well-Known Member

    5,419
    1,386
    113
    May 25, 2014
    Ratings:
    +2,167
    Local Time:
    6:55 PM
    Mainline
    10.2
    Yes, what if I use the script on my current server?
    It will have duplicate?
    Thanks!
     
  5. eva2000

    eva2000 Administrator Staff Member

    50,460
    11,661
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,082
    Local Time:
    8:55 PM
    Nginx 1.25.x
    MariaDB 10.x
    nope as cloudflare.conf is not added to nginx.conf on existing installs, csfcf.sh only populates cloudflare.conf NOT include it into nginx.conf for existing installs
     
  6. rdan

    rdan Well-Known Member

    5,419
    1,386
    113
    May 25, 2014
    Ratings:
    +2,167
    Local Time:
    6:55 PM
    Mainline
    10.2
     
  7. eva2000

    eva2000 Administrator Staff Member

    50,460
    11,661
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,082
    Local Time:
    8:55 PM
    Nginx 1.25.x
    MariaDB 10.x
    csf firewall automatically ignores entries already in csf.allow and csfcf.sh doesn't touch csf.deny
     
  8. negative

    negative Active Member

    415
    50
    28
    Apr 11, 2015
    Ratings:
    +98
    Local Time:
    1:55 PM
    1.9.10
    10.1.11
    I see the "include /usr/local/nginx/conf/cloudflare.conf;" parameter on nginx.conf of new domains but i didn't see on old domains.
    So, I added this parameter current of my domains too.
    Code:
    include /usr/local/nginx/conf/cloudflare.conf;
    to nginx.conf file then run

    Code:
    /usr/local/src/centminmod/tools/csfcf.sh auto 
    Csf ignored ip's due duplicated items of course, it is normally because i was add them before.

    My question is: After every nginx update, we need to add manually the "include /usr/local/nginx/conf/cloudflare.conf;" line to nginx.conf on old domains anyway ?
     
  9. rdan

    rdan Well-Known Member

    5,419
    1,386
    113
    May 25, 2014
    Ratings:
    +2,167
    Local Time:
    6:55 PM
    Mainline
    10.2
    No, if you already added it manually.
     
  10. eva2000

    eva2000 Administrator Staff Member

    50,460
    11,661
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,082
    Local Time:
    8:55 PM
    Nginx 1.25.x
    MariaDB 10.x
    only have to do it mainly once in nginx.conf and it stays there :)