3

How do I create a Windows firewall rule that lets application X only open connections (outbound) to two ip addresses, while blocking everything else?

1 Answers1

1

If you want to deny all outbound traffic, except for connections to 2 specific endpoints, you can change the default behavior for outbound connections to "Block". This way, all outbound connections will be blocked, unless they are explicitly allowed.

Open the Windows Firewall with Advanced Security MMC, right-click the Firewall in the left pane, and select properties. Select a Profile tab and change the behavior under "State"

Firewall Properties

Then create new outbound rules to allow the 2 connections: http://technet.microsoft.com/en-us/library/cc771477%28v=ws.10%29.aspx

Mathias R. Jessen
  • 24,907
  • 4
  • 62
  • 95
  • 1
    Yes - but I want this to happen only when connections come from a specific program (say telnet client for example). Another way of saying it would be "I want telnet on my computer to only be able to connect to ip1 and ip2" – Henry Smith Dec 22 '12 at 00:08
  • Only way to do that is by using ipsec and connection security rules or authentication bypass rules. Or you can try to create a block rule that covers the entire ipv4 internet range except the allowed IP:s. – Molotch Dec 22 '12 at 13:47