0% found this document useful (0 votes)
136 views

How To Implement ModSecurity OWASP Core Rule Set in Nginx

This document discusses how to implement the OWASP ModSecurity Core Rule Set in Nginx to protect against common web attacks and threats like HTTP protocol violations, bots and crawlers, information leakage, cross-site scripting, and SQL injection.

Uploaded by

Neil T
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
136 views

How To Implement ModSecurity OWASP Core Rule Set in Nginx

This document discusses how to implement the OWASP ModSecurity Core Rule Set in Nginx to protect against common web attacks and threats like HTTP protocol violations, bots and crawlers, information leakage, cross-site scripting, and SQL injection.

Uploaded by

Neil T
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

How to Implement ModSecurity

OWASP Core Rule Set in Nginx


If you were securing Nginx with Mod Security then you would like to have
OWASP core rule set (CRS) activated to protect from following threats.

 HTTP protocol violation protection


 Common web attacks
 Bots, crawlers, malicious activity protection
 Trojan protection
 Information leakage protection
 Cross Site Scripting attacks
 SQL injection attacks

ModSecurity is open source Web Application Firewall (WAF) and by default,


it’s configured to detect only. That means you need to enable the necessary
configuration (as following) in order to start protecting your websites.

1. Download ModSecurity CRS


2. Download latest CRS zip file from the following link and transferred to
the server

https://github.com/SpiderLabs/owasp-modsecurity-
crs/zipball/master

3. unzip the file

unzip SpiderLabs-owasp-modsecurity-crs-2.2.9-26-gf16e0b1.zip

4. Copy following to nginx conf folder

modsecurity_crs_10_setup.conf.example

base_rules

5. Configure Nginx to Integrate OWASP ModSecurity CRS.

Since you have decided to use OWASP CRS, you need to merge the conf file
included in SpiderLabs OWASP CRS, which you just copied
(modsecurity_crs_10_setup.conf.example ) under nginx folder.
Nginx doesn’t support multiple ModSecurityConfig directives like Apache so
you need to put all rules conf together in a single file.

You might also like