Re: Handling multiple clients with modsecurity
Christian Varas via mod-security-users <[email protected]> Mon, 8 Mar 2021 08:00:45 -0300
| Newsgroups | gmane.comp.apache.mod-security.user |
|---|---|
| Message-ID | <f37fa12f-f68f-4abf-88f4-318f34be8815@Canary> |
Hi Blason, Is better if you separate everything as you mention, in that way you can configure by app: exclusions, rules, custom configuration, etc... If you are in a Debian distribution, you could use Waf2Py, will do what you are looking for with a easy web interface https://github.com/ITSec-Chile/Waf2Py Cheers Chris -- > On lunes, mar. 08, 2021 at 3:59 a. m., Blason R <[email protected] (mailto:[email protected])> wrote: > Hi Folks, > > Here is my requirement and seeking any heads up from community - > I already have nginx server running for our multiple customers in reverse proxy mode > So Nginx reverse proxy is sending requests to customer web servers > lets say - > > Customer-1 exmaple.com (http://exmaple.com) -> web site example.com (http://example.com) > Customer-2 www.test.com (http://www.test.com) -. www.test.com (http://www.test.com) > Customer3- acme.com (http://acme.com) -> www.acme.com (http://www.acme.com) > > > Now I am trying to integrate modsecurity with Nginx > So my question is - Do I need to create a separate config file for every customer location? > like /etc/nginx/modsec/example.com/main.conf (http://example.com/main.conf) > > /etc/nginx/modsec/example.com/modsecurity.conf (http://example.com/modsecurity.conf) > /etc/nginx/modsec/example.com/coreruleset/rules/*.conf (http://example.com/coreruleset/rules/*.conf) > /etc/nginx/modsec/example.com/coreruleset/cor-ruleset.conf (http://example.com/coreruleset/cor-ruleset.conf) > > ################## > /etc/nginx/modsec/test.com/main.conf (http://test.com/main.conf) > /etc/nginx/modsec/test.com/modsecurity.conf (http://test.com/modsecurity.conf) > /etc/nginx/modsec/test.com/coreruleset/rules/*.conf (http://test.com/coreruleset/rules/*.conf) > /etc/nginx/modsec/test.com/coreruleset/cor-ruleset.conf (http://test.com/coreruleset/cor-ruleset.conf) > ################## > /etc/nginx/modsec/acme.com/main.conf (http://acme.com/main.conf) > /etc/nginx/modsec/acme.com/modsecurity.conf (http://acme.com/modsecurity.conf) > /etc/nginx/modsec/acme.com/coreruleset/rules/*.conf (http://acme.com/coreruleset/rules/*.conf) > /etc/nginx/modsec/acme.com/coreruleset/cor-ruleset.conf (http://acme.com/coreruleset/cor-ruleset.conf) > Is this correct method to manage rules/exceptions/blacklisting/whitelisting for multiple customers? Or is there any other alternative? > Plus logs should be separate for every customer which I am thinking to generate in json file > > > Please let me know if this is the correct option considering around 15-20 sites protected by nginx and customers. > > > SecAuditEngine RelevantOnly > SecAuditLogRelevantStatus "^(?:5|4(?!04))" > > > SecAuditLogParts ABIJDEFHZ > SecAuditLogFormat JSON > SecAuditLog /var/log/modsec_audit.log > > TIA > Blason R > > > _______________________________________________ > mod-security-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mod-security-users > Commercial ModSecurity Rules and Support from Trustwave's SpiderLabs: > http://www.modsecurity.org/projects/commercial/rules/ > http://www.modsecurity.org/projects/commercial/support/ _______________________________________________ mod-security-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mod-security-users Commercial ModSecurity Rules and Support from Trustwave's SpiderLabs: http://www.modsecurity.org/projects/commercial/rules/ http://www.modsecurity.org/projects/commercial/support/
signature.asc
(application/pgp-signature, 673 B)
-----BEGIN PGP SIGNATURE----- Version: Canary PGP V3 iQGtBAABCgAXEBxjdmFyYXNAaXRzZWMuY2wFAmBGA94ACgkQr42NOiXCiCtg5Av/ YUQzxL/HVAoFqDm99arodBwTkSAVUvBseqt2x7Vy0yIsj1KEK1+YXV/U+W1vFhBc osf6PqE5R6kCdm0gzfFxAKvNuQg84SVVtu+QlQCPPs5YK0E146/6De6tX/neCVX9 CqzM2GdC/EGHMTcyM/4aJQXK5kqKFLnBgF9Yh8xJ4bTDF5C1QRX8lkfA/ym534/M +lHQ6O37o2z4nIS7aJs+e4HIW2Uo69uPqKOyPNN12/yAg7KS+Qe7Kr5WhjfhWyMP +Recdn1WtAY++J+m1pFSmpxYv0q5DBv2WFFfuES6dNKaXhlP6zLTV144JU37i9Iv uyXKn+iL2md9LwdwCApNzw48aLeQ5Bv40dxfPSthGCQ+wChu2pOyuZnJ8wnFepf+ heUlZ67aqcePmf/3kwqIABVWBLo0Y9PU9u6HuVmM0qfsYpIhcf8NgLdw8/gCU3Ja 8ysDzGY7jeIFOPE1J4Qan8VXaWWOYKlSu8dfLbpKALRfndKljjL1AWioPuS0LP0m =fpBL -----END PGP SIGNATURE-----