CentrioHost Blog

Stories and News from IT Industry, Reviews & Tips | Technology Blog


Nginx And DDOS Protection

cPnginx and Danginx can use  to protect the HTTP DDOS as follows,
Edit the file   /etc/sysctl.conf  and increase the openfile limits. Add the following line,

fs.file-max = 700000

Edit  /etc/security/limits.conf  and add the following  lines,

nobody       soft    nofile  100000
nobody       hard    nofile  500000

Now apply the sysctl configuration using the following command .

# sysctl -p

Now edit the  /usr/local/nginx/conf/nginx.conf  file  and add the following line.

worker_rlimit_nofile 50000;

1)  Add the following sysctl parameters,

net.ipv4.tcp_syncookies = 1
# source validation / reversed path
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
kernel.pid_max = 65536
net.ipv4.ip_local_port_range = 9000 65000

2) Use the  RateLimit module ,   http://wiki.nginx.org/HttpLimitZoneModule   It must be placed inside http block

limit_zone slimits $binary_remote_addr 10m;
limit_conn slimits 10;

3) You can also use the following too,

limit_req_zone $binary_remote_addr zone=slimitss:10m rate=1r/s;
limit_req zone=slimitss  burst=10;

Subscribe Now

10,000 successful online businessmen like to have our content directly delivered to their inbox. Subscribe to our newsletter!

Archive Calendar

SatSunMonTueWedThuFri
 123
45678910
11121314151617
18192021222324
25262728293031

Over 20000 Satisfied Customers!

  • web hosting reviewer
    Valerie Quinn
    CTO, Acteon Group

    Centriohost staff were fantastic, I had a concern with a domain and they got back to me very quickly and they helped me to resolve the issue! ~ . . . Read more

  • Joomla hosting reviewer
    Collin Bryan
    Photographer, Allister Freeman

    I'm using centrio for my portfolio since 2006. The transition was seamless, the support was immediate, and everything works perfectly. ~ . . . Read more

  • dedicated server reviewer
    Harry Collett
    Actor, A&J Artists

    Very easy to understand & use even though I am not very technologically minded. No complications whatsoever & I wouldn't hesitate to recommend it to all. ~ . . . Read more

  • vps web hosting reviewer
    Porfirio Santos
    Technician, Diageo PLC

    Centrio support team have been amazingly responsive and helpful to any of my queries, thank you so much to the Centriohost have been amazingly responsive and helpful to any of my queries 👍👍👍 ~ . . . Read more

  • wordpress hosting plans reviewer
    Catherine Auer
    Doctor, SmartClinics

    Anytime I've had a problem I can't solve, I've found Centriohost to be diligent and persistent. They simply won't let an issue go until the client is happy. ~ . . . Read more

  • reseller hosting reviewer
    Effectivo Social
    Freelancer, Fiverr

    Recommend their shared hosting for all my SME web design clients. Their cloud or VME offerings are too great to deal with. Pricing is perfect and suitable for all users (͠≖ ͜ʖ͠≖) 👌 ~ . . . Read more

Top