Welcome to Centmin Mod Community
Register Now

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

    53,811
    12,159
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,711
    Local Time:
    4:23 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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,439
    1,399
    113
    May 25, 2014
    Ratings:
    +2,188
    Local Time:
    2:23 AM
    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

    53,811
    12,159
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,711
    Local Time:
    4:23 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    only new 123.09beta01 installs - does nothing to existing installs
     
  4. rdan

    rdan Well-Known Member

    5,439
    1,399
    113
    May 25, 2014
    Ratings:
    +2,188
    Local Time:
    2:23 AM
    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

    53,811
    12,159
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,711
    Local Time:
    4:23 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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,439
    1,399
    113
    May 25, 2014
    Ratings:
    +2,188
    Local Time:
    2:23 AM
    Mainline
    10.2
     
  7. eva2000

    eva2000 Administrator Staff Member

    53,811
    12,159
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,711
    Local Time:
    4:23 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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:
    8:23 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,439
    1,399
    113
    May 25, 2014
    Ratings:
    +2,188
    Local Time:
    2:23 AM
    Mainline
    10.2
    No, if you already added it manually.
     
  10. eva2000

    eva2000 Administrator Staff Member

    53,811
    12,159
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,711
    Local Time:
    4:23 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    only have to do it mainly once in nginx.conf and it stays there :)