Managing ports in Windows Firewall is essential for controlling network traffic and securing your system. This guide explains step-by-step how to allow or block specific ports using Windows Defender Firewall with Advanced Security.
Allow a Port
- Open Windows Defender Firewall by searching for firewall.cpl in the Start menu.
- Click Advanced Settings on the left panel.
- In the Windows Firewall with Advanced Security window, select Inbound Rules (for incoming traffic) or Outbound Rules (for outgoing traffic).
- Click New Rule in the right panel.
- Select Port and click Next.
- Choose TCP or UDP, then enter the specific port number (e.g., 8080).
- Select Allow the connection and click Next.
- Choose the network profiles where the rule applies (Domain, Private, Public).
- Name the rule and click Finish.
Block a Port
- Repeat steps 1 to 6 above.
- Select Block the connection instead of allowing it.
- Complete steps 8 and 9 to finalize the rule.
By following these steps, you can precisely control which ports are accessible on your Windows system. Proper firewall configuration helps protect against unauthorized access while allowing necessary applications to function correctly.
