How do I set up the built in windows firewall in a way that follows this logic...

Allow ALL traffic to/from [Application] to/from [IP]

Deny all OTHER traffic to/from [Application]


Essentially, a whitelist of IPs, but ONLY for that specific application.

I know I could do this with a global deny + an allow for the one application. But then everything else would be denied and I can't have that.


Here is my idea:

Using Windows Defender Firewall with Advanced Security, you may create a Custom rule pertaining to the program in question.

When you arrive in the New Rule wizard to the Scope section, choose for remote IP addresses the option of "These IP addresses", click "Add...", choose "This IP address range", and give a range of and up to the allowed address minus one. Create the rule as blocking.

Repeat this for creating another rule for this program that blocks the address range of from the allowed address plus one and up to

Now only that IP address should be allowed for this program.

| improve this answer | |
  • Yeah. This is how I ended up doing it. But you got your answer in before I could get back here to answer it myself. So you get the Internet Points. – Overwatch Dec 4 '18 at 21:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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