Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

enable/disable Windows firewall rules?


  • Please log in to reply
1 reply to this topic
mugtastic
  • Guests
  • Last active:
  • Joined: --
Hi all,

I've been trying to find a way to do this but have not had success searching. The only solution I can find it scripting a sequence of keyboard shortcuts once the windows firewall settings window is open, which I'm not thrilled with.

I'm hoping there is a better way to enable/disable specific rules in the firewall. I've attempted using RegWrite to change the value of the registry keys for the rules I'm concerned with. While I could verify that the value for the registry key was changed to the correct setting, it did not seem to have an effect on the system (the program was still blocked when it should not be anymore).

Any thoughts?

mugtastic
  • Guests
  • Last active:
  • Joined: --
I ended up finding a solution. I can't remember if I found this in the forum, or if I came up with it myself. I just happened upon this old post of mine and thought I'd put the solution I used in case anyone else needs help. =)

enable firewall rule:
run, netsh advfirewall firewall set rule name="NameOfFirewallRule" new enable=yes

disable firewall rule:
run, netsh advfirewall firewall set rule name="NameOfFirewallRule" new enable=no

I can only confirm this works in Win7. Not sure about XP.