Hopeless? Win Svr 2008 firewall drama

Hey all, quick one for folks smarter than me...

Is there a way to reset Windows Firewall without actually opening up the firewall app/msc component?

We recently had a batch of rules applied to two servers via powershell script. One server (svr 2008 r2, postgres, hmailserver, strawberry perl) works fine after the push, one of many over a long period. Another server (svr 2008 r2, apache, PHP, MySQL, strawberry perl) had the same rules applied by the same script,m but has now gone to 50% CPU utilisation and can no longer open the firewall msc object or the control panel app. The firewall seems to have shit itself. Things are fine if we disable the firewall service. Turn it back on, and the CPU spikes to 50% and stays there (although it fluctuates a lot, it stays roughly 50% for hours).

Any ideas on this? Would be great if we could reset the firewall rules (without having to turn the service on) and re-apply the script's changes one at a time to see what the issue was. I am guessing it's a lost cause and we'll have to rebuild the damn thing, but I would be very pleased to be shown that I am wrong.

Thanks all

Posted Jan 9, 2017, 12:45 PM UTC

16
Redditano•

Hi,

Maybe you could try using the netsh command line tool : https://support.microsoft.com/en-us/kb/947709 ( Example 7: Restore policy defaults ) or just google something like " netsh firewall reset " " reset windows firewall command line ".

bye

1
impossinatorOP•

thanks mate, will give that a go

1
unkownunkowns•

netsh advfirewall reset

1
impossinatorOP•

Nice, will give that a try.

Any guess as to what tipped over the one sever, while the other one chugs along like a champ, with the same rules having been applied to both? Seems rather odd.

thks mate

1
fireflaschJack of All Trades•

could you show us the rules, maybe you blocked some port for php or mysql, which would explain it

1
impossinatorOP•

Nah mate it's all good, the netsh advfirewall reset did the job, just having the boys piece together the ports that we need re-opened.

The script that did the damage is a script we've used for years and years, just pushes IP blocking rules based on a simple algorithm and is based on a bunch of text files we chuck in a folder. If the files aren't formatted properly etc., the scipt will catch it before it shovels them into the firewall. Not really sure what went wrong this time, but every so often Windows firewall lays an egg. Usually it self-corrects. Not this time.

We're back in and at standard CPU %, thanks to you all. Much appreciated.

1