0

Trying to figure out a way to do this:

netsh advfirewall firewall add rule name="ES 9500 (Block)" dir=in action=block protocol=TCP localport=9500

netsh advfirewall firewall add rule name="ES 9500 (Allow)" dir=in action=allow protocol=TCP localport=9500 remoteip=207.207.207.207

Doesn't seem that it's possible as "Override block rules" requires specifying specific machines: http://technet.microsoft.com/de-de/library/dd734783(v=ws.10).aspx.

Any way to do this on Windows?

Nariman
  • 229
  • 3
  • 10

1 Answers1

3

Unless you have another rule in your windows firewall or you have changed the default behavior of the incoming connections, ALL incoming connections will be blocked by default.

So you have to start with the allow rules for incoming connections. Also, try adding the enable argument like so

netsh advfirewall firewall add rule name="ES 9500" dir=in action=allow 
remoteip=207.207.207.207/32 protocol=TCP localport=9500 enable=yes
user
  • 1,418
  • 8
  • 10
  • The enable switch doesn't make a difference but you're right that there is no need for the explicit block rule (which I don't think can be overridden). – Nariman May 02 '13 at 11:15