Windows – How to block all traffic but one IP in Windows Firewall

firewallnetworkingSecuritywindowswindows 7

I'm trying to use Windows 7 firewall to block all outgoing and incoming traffic, from all IP's and for all protocals, except for UDP to and from one particular IP address.

The reason why is because I am using a VPN over UDP, and so no other traffic is necessary so I'd like to shut it all down.

My configuration blocks all outgoing traffic, but also it blocks traffic going out to the IP I want to be able to access. I can't for example ping the allowed IP address (notice I have it set as any protocol allowed, so ping should work). I get 'General Failure' when I try to ping it.

I figured having the allow rule at the top of the list would make it work but it doesn't. Am I missing something here?

Best Answer

The proper way to accomplish this is to configure Windows Firewall to block all outgoing traffic by default, and then only allow the incoming connection(s) you want.

To do that, click on Windows Firewall with Advanced Security in the left pane, and choose Windows Firewall Properties from the right pane. Next to Outbound connections, choose Block. Then, click OK.

Windows Firewall block outbound by default

Once you've done that, just delete the block all outgoing traffic rule and you should be all set.

Related Question