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

How do i allow access from some specified IP-Adresses (maybe a txt file?) while blocking access by default. Background is that i dont want to copy and past the ip-adresses into every single rule, since it makes it awfull to maintain!

share|improve this question
What is the background for this requirement? Perhaps some more manageable technology like domain isolation would be in order? – Oskar Duveborn Feb 8 '10 at 17:27

I don't think Windows firewall is quite flexible enough to do what you want. This is kind of hacky, but a way to solve your problem would be to setup a draconian block rule to block everything from every IP, except for the ones you want to allow.

The way to do it is to setup a block rule, and put in very large address ranges like this:

From: To:  
From: To:  
From: To:

This blocks everything except for the 3 IPs:,,

For the 3 IPs that do get in - the rest of the rules will still apply to them as they normally would.

Also, if you do a "custom" rule instead of starting out with a port rule, it allows you to choose "Any" for the protocol to block all protocols/ports.

share|improve this answer

Your Answer


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