mitchellkrogza / nginx-ultimate-bad-bot-blocker

Nginx Block Bad Bots, Spam Referrer Blocker, Vulnerability Scanners, User-Agents, Malware, Adware, Ransomware, Malicious Sites, with anti-DDOS, Wordpress Theme Detector Blocking and Fail2Ban Jail for Repeat Offenders
Other
3.81k stars 472 forks source link

[BUG] Nginx Test after install script install "nginx: [warn] duplicate network "" value: "0", old value: "1" in /etc/nginx/conf.d/globalblacklist.conf" #526

Closed Danrancan closed 7 months ago

Danrancan commented 11 months ago

Describe the bug

I have installed Bad Bot blocker according to the instructions in the README.md file. Nginx is installed in the default location on Ubuntu 20.04 in /etc/nginx.

I have completed step 5 of the install instructions, and now am on step 6. When running the command: sudo nginx -t it produces these warnings:

nginx: [warn] duplicate network "138.199.57.151", value: "0", old value: "1" in /etc/nginx/conf.d/globalblacklist.conf:18884
nginx: [warn] duplicate network "143.244.38.129", value: "0", old value: "1" in /etc/nginx/conf.d/globalblacklist.conf:18900
nginx: [warn] duplicate network "195.181.163.194", value: "0", old value: "1" in /etc/nginx/conf.d/globalblacklist.conf:18995
nginx: [warn] duplicate network "5.188.120.15", value: "0", old value: "1" in /etc/nginx/conf.d/globalblacklist.conf:19122
nginx: [warn] duplicate network "89.187.173.66", value: "0", old value: "1" in /etc/nginx/conf.d/globalblacklist.conf:19169
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

To Reproduce

Follow the readme install instructions up until (and completeing) step 5. Then run sudo nginx -t.

Expected behavior

I expect the sudo nginx -t command to produce the following output without errors or warnings:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Screenshots

None

Copy of nginx.conf

NA

Copy of vhost / website / host .conf file

NA

Server (please complete the following information):

Linux mail.facl.xyz 5.4.0-1090-raspi #101-Ubuntu SMP PREEMPT Fri Jul 14 15:59:21 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux


 - Nginx Version [post output of sudo nginx -v]

nginx version: nginx/1.25.1 Mainline



 - 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.

NA

## Additional information

NA
fidoboy commented 7 months ago

This problem is annoying. I can't understand why it still doesn't resolve with a simple update. It's not that hard.

GabrieleOlmi commented 7 months ago

Those ip addresses are declared twice with different restrictions, in the "seo analysis tools" and "bunny.net cdn" section.

mitchellkrogza commented 7 months ago

They are only warnings and should just be ignored. These warnings do not affect the performance of Nginx or the blocker. A daily list of known bad IP addresses is updated on the blocker every day, unfortunately some good IP addresses like CDN's end up on blacklists so they get listed as value 1 (blacklisted) and then overridden by our whitelist to value 0 (not blacklisted) impossible to change or fix this with any update as the bad IP lists change daily. Our whitelisting of certain things is essential to not block good IPs or ranges that somehow ended up on an IP blacklist.

mitchellkrogza commented 5 months ago

This problem is annoying. I can't understand why it still doesn't resolve with a simple update. It's not that hard.

It's not a bug nor can it be fixed, this is desired behaviour of the blocker. Daily updates of IP blacklists cause some well known IP's and ranges to be blacklisted old value "1" these are then whitelisted at the very end of globalblocklist which is the order of loading which then sets IP's we know are good to their new value "0" thereby whitelisting them. It has been this way since day 1 of the blocker and will remain this way. These are simple [WARN] messages not [EMERG] messages and they do not affect the operation of Nginx in any way whatsoever.