How to block an IP


#1

Blocking an Ip address should be done like this?!

Allow from all
Deny from 59.56.109.34

Thanks!


#2

Robert G. wrote:

Blocking an Ip address should be done like this?!

Allow from all
Deny from 59.56.109.34

Thanks!

Sorry, I mean:

location / {
allow all;
deny 59.56.109.34;

}


#3

On Wed, Apr 15, 2009 at 09:06:14PM +0200, Robert G. wrote:

location / {
allow all;
deny 59.56.109.34;

}

No, nginx stops at the first matching rule, therefore:

deny 59.56.109.34;
deny …
deny …
deny …
allow all;