Recommendations for a Free WAF for NGINX on Kubernetes?

0
5
Asked By CuriousTraveler99 On

I'm hosting a Kubernetes cluster at home, and while I have some services exposed to the internet, I only allow HTTP(S) traffic from Cloudflare IPs. This setup works fine for web apps, but it's problematic for media hosting since Cloudflare has limitations on larger file uploads, like big Docker images. I'm also seeing some unwanted requests trying to access sensitive files, like `.git` and `.env`.

Currently, I'm using `nginx-ingress`, but I'm not interested in the paid F5 WAF they offer. I'd prefer to implement something like [Coraza](https://coraza.io/) or a similar free solution, though I haven't found clear integration documentation.

My goals are to:
- Filter HTTP(S) traffic within my Kubernetes cluster.
- Use a free tool that can safely receive traffic outside of Cloudflare.
- Ideally, set up domain-specific rules (e.g., some domains would only accept Cloudflare traffic while others could handle traffic from any source).
- Ensure support for services like Docker Registry and Nextcloud.

If I consider alternatives to `nginx-ingress`, they should support cert-manager & Let's Encrypt, work with websockets, and correctly fetch the real IP from Cloudflare headers, as well as the original router's IP for incoming traffic.

What are your recommendations?

2 Answers

Answered By TechGuru84 On

Consider deploying `owasp/modsecurity-crs` as a sidecar to proxy your traffic through it. It's a solid setup for filtering malicious requests as it helps guard against common vulnerabilities.

Answered By SecurityExpert42 On

You might want to look into Crowdsec. It has WAF capabilities that could be useful. Just keep in mind that my past experience with it showed some performance issues under heavy loads, so testing it thoroughly would be wise.

ReluctantTester22 -

I had similar concerns! I started small, and it seemed fine, but once I ramped up traffic, it really struggled. Performance dropped drastically, so I had to step back and reevaluate.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.