If you need to configure the Windows Firewall to allow incoming connections on specific ports, here's how you can do it:
-
Open Windows Defender Firewall Settings:
- Press
Win + R
to open the search bar. - Type "wf.msc" and hit enter.
- In the left pane, click on "Advanced settings." This will open the Windows Defender Firewall with Advanced Security window.
- Press
-
Create Inbound Rule:
- In the left pane, click on "Inbound Rules."
- In the right pane, click on "New Rule..." to open the New Inbound Rule Wizard.
-
Select Rule Type:
- Choose "Port" and click Next.
-
Specify Port:
- Choose "TCP" and enter the port(s) in the "Specific local ports" field.
- Click Next.
-
Choose Action:
- Select "Allow the connection" and click Next.
-
Choose Profile:
- Click Next.
-
Name and Finish:
- Enter a name for your rule, e.g., "Web Server - TCP."
- Click Finish.
-
Repeat for UDP (if needed):
- Follow the same steps, but this time choose "UDP" in step 4.
-
Verify Rules:
- In the Windows Defender Firewall with Advanced Security window, ensure that your new inbound rules for TCP and UDP on the port(s) are listed.