Given access to suspected compromised hosts and appropriate credentials.
Operator Note: Local firewall rules provide critical insight into allowed and blocked communications on hosts.
Operator Note: Document all rule changes and justification for audit purposes.
Local firewall rules baseline established and maintained.
netsh advfirewall firewall show rule name=all
netsh advfirewall set currentprofile state on
netsh advfirewall set currentprofile firewallpolicy blockinboundalways,allowoutbound
netsh advfirewall set allprofile state on
netsh advfirewall set allprofile state off
Operator Note: Changing firewall status impacts network security. Obtain approval before altering settings.
netsh advfirewall firewall add rule name="Open Port 80" dir=in action=allow protocol=TCP localport=80
netsh advfirewall firewall delete rule name="My Application" program="C:\\MyApp\\MyApp.exe"
netsh advfirewall firewall set rule group="remote desktop" new enable=Yes profile=domain
netsh advfirewall set currentprofile logging C:\\Logs\\firewall.log
more %systemroot%\system32\LogFiles\Firewall\pfirewall.log
netsh advfirewall set allprofile logging droppedconnections enable
netsh advfirewall set allprofile logging allowedconnections enable
Get-Command *-*firewall*
2.19_CreateFirewallRuleList.ps1
:.\2.19_CreateFirewallRuleList.ps1
Operator Note: Domain firewall rules may override local rules. Validate which profile is active.
Platform | Tool | Purpose |
---|---|---|
Windows | netsh | CLI-based firewall rule management |
Windows | PowerShell NetSecurity module | Scriptable firewall rule collection |
Universal | Advanced Security Firewall GUI | Visual firewall rule review |
New-NetFirewallRule -DisplayName "Allow HTTP" -Direction Inbound -LocalPort 80 -Protocol TCP -Action Allow
netsh advfirewall export "C:\firewall-config.wfw"
Date | Version | Description | Author |
---|---|---|---|
2025-05-02 | 1.8 | Full original + enriched firewall rule collection, validation, and operator procedures | Leo |