• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question IP Range Banning in Nginx.

Zardiw

Basic Pleskian
Hey....

Currently I am banning IP ranges/addresses using .htaccess.

The notation is really simple, in that I can ban an entire country easily.

For instance.

Deny 1. (Bans 1.0.0.0 to 1.255.255.255)
Deny 128. (Bans 128.0.0.0 to 128.255.255.255)

Or I can Deny a part of a range like

Deny 128.45. (Bans 128.45.0.0 to 128.45.255.255)

But apparently using this type of notation is only used in .htaccess files.

Everywhere else they use CIDR notation, which is a PITA to understand and find out exactly which IP range is being referred to.

So to ban IP ranges in Nginx, you have to create a file (something like bannedips.list) which contains
lines like:

Deny --- IP Range --
Deny --- IP Range --

And refer to that file in the nginx.conf file thusly by adding these lines to it:

## Listen banned IP addresses via bannedips.list ##
include bannedips.list;

If I use the .htaccess notation in that file.....i.e 44. to ban the entire 44. IP range......
will that work?

Or do I have to do something like 44.0.0.0/some number

Thanks

PS. Is there a way to add tags after you post a thread?

z
 
Thank you for the response.......I will try that out.....
What is the notation to deny say 14. ?

Also, I have a LOT of banned IP ranges........small sample:

Deny from 1.
Deny from 14.
Deny from 27.
Deny from 31.
Deny from 37.
Deny from 41.
Deny from 42.
# Deny from 46. SiteUpTime Phillipines
Deny from 49.
# Deny from 50.
Deny from 59.
Deny from 60.
Deny from 62.
# Deny from 77. Germany/England
Deny from 79.
Deny from 80.
Deny from 82.
Deny from 83.
# Deny from 84. # Germany.
# Deny from 86. Netherlands User
Deny from 87.
Deny from 88.
Deny from 89.
Deny from 91.
Deny from 92.
Deny from 93.
Deny from 95.

z
 
Back
Top