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