-
Notifications
You must be signed in to change notification settings - Fork 8.4k
ModSecurity [uri "/is-dynamic-lb-initialized"] Host header is a numeric IP address #8974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@julianxhokaxhiu: This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
I'm interested in seeing this fixed. Please do not close it. |
/help |
@longwuyuan: GuidelinesPlease ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met. If this request no longer meets these requirements, the label can be removed In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Hi @julianxhokaxhiu , SecRule REQUEST_HEADERS:Host "@rx ^[\d.:]+$" \
"id:920350,\
phase:2,\
block,\
t:none,\
msg:'Host header is a numeric IP address',\
logdata:'%{MATCHED_VAR}',\
tag:'application-multi',\
tag:'language-multi',\
tag:'platform-multi',\
tag:'attack-protocol',\
tag:'paranoia-level/1',\
tag:'OWASP_CRS',\
tag:'capec/1000/210/272',\
tag:'PCI/6.5.10',\
ver:'OWASP_CRS/3.3.2',\
severity:'WARNING',\
setvar:'tx.anomaly_score_pl1=+%{tx.warning_anomaly_score}'" I just added a new security with the helm value like in the one below, and it stopped giving errors like that. It just makes an exception for the requests that start with Here is the configuration I use --set controller.config.enable-modsecurity='true' \
--set controller.config.enable-owasp-modsecurity-crs='true' \
--set controller.config.modsecurity-snippet='Include /etc/nginx/modsecurity/modsecurity.conf
SecRuleEngine On
SecAuditLogFormat JSON
SecAuditLog /dev/stdout
SecRule REQUEST_HEADERS:Host "@rx ^127.0.0.1" "id:100\,phase:1\,allow\,nolog"' Hope it helps |
well, SecRule REMOTE_ADDR "@ipMatch 127.0.0.1" "id:87,phase:1,pass,nolog,ctl:ruleEngine=Off" from #8388 which, I suspect, was based on following P.S. also, some good customizations can be found here |
Same issue. I do not fully understand that rule so I can't even tell what would be the right solution. In any case it is really flooding the logs, as a result I simply disabled this specific rule:
However it is not ideal to bypass a rule so I hope somebody can jump in and found out what to do to fix this. |
I just now tried to enable mosecurity and look at the logs. I dont see the error message There is no activity on this issue for a long time. There is no reproduce success. The code has changed a lot. There is also a new PR to bump the CRS to v4.4.0. And this issue is just adding to the open issues tally without offering any action-item or trackable problem. So I will close this for now. Please feel free to re-open after posting detailed data from a reproduce attempt on a kind of minikube cluster, using the latest release of the controller. thanks /close |
@longwuyuan: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What happened:
Enabling ModSecurity with OWASP CRS brings this warning log over and over again:
The responsible piece of code triggering it seems to be this one: https://github.com/kubernetes/ingress-nginx/blob/main/internal/nginx/main.go#L62-L78
What you expected to happen:
The warning log should not be there.
NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):
Kubernetes version (use
kubectl version
):How was the ingress-nginx-controller installed:
How to reproduce this issue:
Just deploy the latest Ingress via Helm and override the values with these ones:
Anything else we need to know:
N/A
The text was updated successfully, but these errors were encountered: