Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In nginx we can define access (allow/deny) rules as follows:


However when we want to use wildcard for last 2 segments of an IP address,

allow 192.168.0/255.0/255

that does not work and it says this syntax is incorrect. What is the way to do that? Is it impossible because two segments mean different subnets or what? An explanation about this would be a great resource for future, I assume.

share|improve this question
up vote 5 down vote accepted

Your 10.1.1 rule is wrong, what are you trying to accomplish with it?

The syntax is CIDR network numbering.

share|improve this answer
Wrong rule is in nginx documentation as you can see. – Ahmet Alp Balkan Nov 8 '11 at 11:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.