1

I'm trying to setup a script to unblock IP's that may get caught up in a custom rule on Windows Firewall. I am trying this:

netsh advfirewall firewall delete rule name="rule_name" remoteip="ip"

In the scope within Windows Firewall, I see the IP is listed and blocked but when I try to run the script I am getting:

No rules match the specified criteria.

Is this the correct way to script to remove these IPs on an automated script or is there a simpler way to approach this?

3
  • What version of Windows? If Windows 10 you would probably be better off using the Powershell commandlets from the NetSecurity module instead of the netsh. In any case if you need more help unblocking something it might help to add a screenshot or log entry with the information about the rule or whatever that you are trying to bypass.
    – Zoredache
    Aug 3, 2017 at 23:20
  • It is for Server 2016 (it looks like that was stripped off). Its literally a block connection rule in the incoming tab (to all ports, etc for excessive login attempts). Just trying to remove an IP from the scope tab that got added in error on an automated basis.
    – Win CS
    Aug 3, 2017 at 23:50
  • I am not too familiar with that but maybe something with the Get-NetFirewallAddressFilter and Set-NetFirewallAddressFilter PS commands?
    – Zoredache
    Aug 4, 2017 at 0:34

0

You must log in to answer this question.

Browse other questions tagged .