-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Modsecurity failing with "Database is not open. Use: SecGeoLookupDb directive" #12882
Comments
/remove-kind bug I think we can work together and possibility locate root cause. |
Thank you @longwuyuan. I have created a job to pull the download to the controller filesystem from the MaxMind permalink. I will be testing for a few days in our development environment to ensure it continues to work, as we have seen it stop working randomly. |
Tested in another one of our dev clusters - this is the Job and PVC updated; I am creating these before the nginx is deployed and updating the modsecurity.conf to point to the correct file location. We are still getting the error in the debug logs
It appears as though it started then stopped working, then started working again? an example of the debug log
I was able to switch to Germany using a VPN and was able to reach the applications website |
My suggestion was different from what you tried. Then download the db inside that image and serve the image from webroot. |
We have been running ingress-nginx with modsecurity rules in place for over two years. Recently the we have been unable to block geolocations and are getting this error in the debug logs
I have the GeoLite2-Country.mmdb mounted using an azure file back PV:
This is my ingress-nginx-controller ConfigMap:
extra values:
Modsecurity Configuration:
ingress-nginx helm chart version 4.8.3
AKS version 1.30.0
ingress-nginx App Version 1.9.4
We have this configuration running in four Kubernetes clusters. Up until recently it was working just fine, then we started getting the above error in the logs.
I have tried restarting the ingress-nginx-controller deployments, and that helped in our development clusters, for a little while, then we started seeing the error message again, and I was able to reach all sites from a blocked country.
I have tried upgrading the helm chart from 4.8.2 to 4.8.3 in all clusters, which oddly worked for one replica in one of our production clusters (there are two replicas running in each cluster) but not any of the others.
This also fixed one of or dev clusters for a few days, but it has started giving the above error message again.
I expect the configuration to be able to find the database and use it when I set SecGeoLookupDb to the correct file path, everytime.
Not sure what else to try to resolve this, and find it odd that it sometimes works, and other times does not.
The text was updated successfully, but these errors were encountered: