k8s test not working, possibly due to real IPs not being passed?

I have everything deployed in k8s. I am using nginx-ingress from here. I have manually modified the helm chart for the local lapi container to use the use_forwarded_for_headers flag. Whenever I use the test path aka curl -I https://<your-service-url>/crowdsec-test-NtktlJHV4TfBSK3wvlhiOBnl, I still do not get alerts. Is it because the true source IP address is not in the logs for nginx? If so, what is the best way that I can get them in there, which crowdsec will parse out properly?
Documentation | CrowdSec
CrowdSec, the open-source & participative IPS
5 Replies
CrowdSec
CrowdSec2mo ago
Important Information
Thank you for getting in touch with your support request. To expedite a swift resolution, could you kindly provide the following information? Rest assured, we will respond promptly, and we greatly appreciate your patience. While you wait, please check the links below to see if this issue has been previously addressed. If you have managed to resolve it, please use run the command /resolve or press the green resolve button below.
Log Files
If you possess any log files that you believe could be beneficial, please include them at this time. By default, CrowdSec logs to /var/log/, where you will discover a corresponding log file for each component.
Guide Followed (CrowdSec Official)
If you have diligently followed one of our guides and hit a roadblock, please share the guide with us. This will help us assess if any adjustments are necessary to assist you further.
Screenshots
Please forward any screenshots depicting errors you encounter. Your visuals will provide us with a clear view of the issues you are facing.
© Created By WhyAydan for CrowdSec ❤️
evulhotdog
evulhotdogOP2mo ago
See log line from the agent:
2025-09-02T17:47:40.529806953-04:00 stdout F 10.42.0.1 - - [02/Sep/2025:21:47:40 +0000] "HEAD /crowdsec-test-NtktlJHV4TfBSK3wvlhiOBnl HTTP/2.0" 403 0 "-" "curl/8.7.1" 68 0.037 [default-foobar-svc-80] [] 10.42.1.204:8080 0 0.002 403 5869c253de2380ad2ed1537b6b2c0c32
2025-09-02T17:47:40.529806953-04:00 stdout F 10.42.0.1 - - [02/Sep/2025:21:47:40 +0000] "HEAD /crowdsec-test-NtktlJHV4TfBSK3wvlhiOBnl HTTP/2.0" 403 0 "-" "curl/8.7.1" 68 0.037 [default-foobar-svc-80] [] 10.42.1.204:8080 0 0.002 403 5869c253de2380ad2ed1537b6b2c0c32
bui
bui2mo ago
hey, yes, crowdsec will discard log lines / alerts from private IPs that's why your test isn't working

Did you find this page helpful?