Open BigAndini opened 4 years ago
Hi @inbaz the best way always is to load the blocker first before anything else. So your config 2 is actually correct. You want the blocker to stop anything at first point of contact before sending it onto something else first and then trying to intercept later, it simply won't work. The whole idea is to not send rubbish traffic to wordpress, a plugin or even Nginx to have it's time and resources wasted.
Just remember all we are doing is blocking traffic that we don't want to waste time and resources on.
What happens after it passes through the blocker is entirely up to Nginx, Wordpress and WP Rocket from thereon.
Hi @mitchellkrogza, I absolutely agree. The "bug" goes rather against the installer, because the installer doesn't include the lines before the first include within the server definition.
It's been very tricky with the installer to cater for all possible placements of the include. Very difficult to detect other includes which may or may not be present.
On my own servers I have a central include that goes into every vhost and is placed at the highest level before any further customizations, just after my ssl includes and just before my Location /
block. This makes it impossible for me to stop it working further down with other rules.
First of all: pretty awesome collection! Thank you very much!
Describe the bug
I'm using wp rocket as cache plugin for my wordpress website. They have a configuration set that let wp rocket work in combination with nginx: https://github.com/SatelliteWP/rocket-nginx When their config include is stated before the ddos and blockbots conf files the webserver gives a response even if it shouldn't.
To Reproduce
Steps to reproduce the behavior: Their tool is quite simple and generates a simple config to include in the server part without adjusting servername or anything else. So maybe you can have a try, generate their config and put it right before your includes. Then you should see the responses even if the user agents or referers are in the blacklist. I've tested only with user agents and referers, I did no ip spoofing to check if that's not working as well.
Expected behavior
A clear and concise description of what you expected to happen. I would simply be a bit arrogant and put my includes right at the top of the configuration file before everything else. Blocking bad clients quite early is a good idea. If sysadmins want to do anything else beforehand, they normally know how to adjust the configurations.
Copy of vhost / website / host .conf file
If applicable please paste your site/vhost configuration file in between the code ticks (paste in between the
markers)
This is the difference:
doesn't work:
while this works pretty well:
Server (please complete the following information):
Operating System:
[ ] Ubuntu
[ ] Alpine
[ ] Arch Linux
[ ] Debian
[X] CentOS
[ ] Fedora
[ ] Deepin
[ ] Windows
[ ] Other
Nginx Version [post output of sudo nginx -v]
Other Environments [include Version information]
[ ] Plesk
[ ] CPanel
[ ] Synology NAS
[ ] Other
Specify Other / Specific Version Information Here:
Any other applicable log / error messages that may help us to help you.
Additional information
Add any other context about the problem here.