Windows Firewall
2024-03-05 20:28:17
Enable/Disable Firewall
1 | netsh advfirewall set currentprofile state <on/off> |
Netsh Usage
The netsh advfirewall firewall
command-line context is available in Windows Server 2012 R2 & after. netsh firewall
may be deprecated in future versions. It is advised to use netsh advfirewall firewall
.
1 | # Enable a program |
Common Firewall Groups
Remote Admin Stuff
Enables firewall rules for RDP and ports remote admin ports like 135 and 445.
1 | netsh firewall set service RemoteDesktop enable |
File Sharing
Enables file sharing - opens ports 135, 139, 445
1 | netsh firewall set service FileAndPrint |
2024-03-05 20:28:17