Discover Centmin Mod today
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

    43,074
    9,781
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,100
    Local Time:
    5:24 AM
    Nginx 1.17.x
    MariaDB 5.5/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
    • Like Like x 1
  2. rdan

    rdan Well-Known Member

    4,856
    1,160
    113
    May 25, 2014
    Ratings:
    +1,740
    Local Time:
    3:24 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

    43,074
    9,781
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,100
    Local Time:
    5:24 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    only new 123.09beta01 installs - does nothing to existing installs
     
  4. rdan

    rdan Well-Known Member

    4,856
    1,160
    113
    May 25, 2014
    Ratings:
    +1,740
    Local Time:
    3:24 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

    43,074
    9,781
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,100
    Local Time:
    5:24 AM
    Nginx 1.17.x
    MariaDB 5.5/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

    4,856
    1,160
    113
    May 25, 2014
    Ratings:
    +1,740
    Local Time:
    3:24 AM
    Mainline
    10.2
     
  7. eva2000

    eva2000 Administrator Staff Member

    43,074
    9,781
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,100
    Local Time:
    5:24 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    csf firewall automatically ignores entries already in csf.allow and csfcf.sh doesn't touch csf.deny
     
    • Like Like x 1
  8. negative

    negative Active Member

    380
    45
    28
    Apr 11, 2015
    Ratings:
    +88
    Local Time:
    9:24 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

    4,856
    1,160
    113
    May 25, 2014
    Ratings:
    +1,740
    Local Time:
    3:24 AM
    Mainline
    10.2
    No, if you already added it manually.
     
  10. eva2000

    eva2000 Administrator Staff Member

    43,074
    9,781
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,100
    Local Time:
    5:24 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    only have to do it mainly once in nginx.conf and it stays there :)