This tutorial will be completed in time with netsh advfirewall commands to configure your Windows operating system.
You can use Command Prompt or choose Run as Administrator.
1. to show all rules:
1 | netsh advfirewall firewall show rule name=all |
2. to block up a range of ports 600 to 7000 for UDP inbound traffic:
1 2 | netsh advfirewall firewall add rule name="UDP ports" protocol=UDP dir=in localport=600-7000 action=block |
3. to see whether the Windows Firewall is enabled on a server or computer:
1 | netsh advfirewall show allprofiles |
4. enable advfirewall:
1 | netsh advfirewall set allprofiles state on |
5. disable advfirewall:
1 | netsh advfirewall set allprofiles state off |
6. reset the advanced firewall to default settings:
1 | netsh advfirewall reset |
7. set firewall policy:
1 | netsh advfirewall set domainprofile firewallpolicy allowinboound,allowoutbound |
8. export advanced firewall settings:
1 | netsh advfirewall export "configuration.wfw" |
9. import advanced firewall settings:
1 | netsh advfirewall import "configuration.wfw" |