Windows OS

How to Stop Port 80 in Windows 10

Ports are physical or logical endpoints used for connection or communication purposes. The physical ports are used to connect different hardware devices for communication purposes. However, logical ports are used to make connections logically, such as port 80 and port 443. These two ports are making connections logically and are used as a communication medium between the web server and web client.

Occasionally, we need to stop port 80 to stop communication over the untrusted HTTP protocol. The other reason is to prevent attacks from networks.

This post demonstrates various methods to stop port 80 on windows 10.

How to Stop Port 80 in Windows 10?

Transmission of data or information over HTTP protocol is done through port 80. We can stop port 80 in order to stop communication over HTTP protocol. The following listed steps will guide you to stop port 80 on windows.

Step 1: Open Control Panel

Type “Control Panel” in the “Startup” menu and Open Control Panel Settings:

Step 2: Visit System and Security Settings

From the control panel settings, open the “System and Security” settings that permit us to make changes in system security:

Step 3: Open Windows Defender Firewall Advanced Settings

Open the Windows Defender Firewall settings next. The Windows Defender Firewall advanced settings allow us to view and block unauthorized network traffic:

Navigate the Advanced settings of Windows Defender Firewall settings:

Step 4: Set New Outbound Rule to Stop Port 80

Set the new Outbound Rule (that allows to set the rule for outgoing traffic). However, we can also set the Inbound rule (that allows to set the rule for incoming traffic) in the same manner. For this purpose, click on the “Outbound Rules” option then select the “New Rule” option from the “Actions” panel:

After that, mark the “Port” radio button from Rule Type settings and click on the “Next” button:

From the “Protocol and Ports” settings, mark the “TCP” radio button and apply the rule for specific remote ports. Mark the “Specific remote ports” radio button and type “80” port no in the text field. Then, hit the “Next” button:

From the “Action” settings panel, enable the “Block the connection” option and press the “Next” button:

Set the rule for all profiles “Domain”, “Private”, and “Public” by marking their respective checkboxes and hitting the “Next” button:

Name the rule according to your preference. We have used “Port 80” as a name. After that, press the “Finish” button:

You can see that we have successfully set a new rule to block port 80 in Windows:

Note: To block port 80 against incoming traffic you can set the “Inbound” new rule by following the same step as we have done to set a new Outbound rule:

Bonus-Tip: How to Stop a Process on Port 80?

Processes are the execution of some program or application on Windows that is listening on some port. To stop the process on port 80, you can utilize either Windows Command Prompt or Windows PowerShell.

Using Command Prompt

To find which process is listening on port 80, utilize the “netstat” command. Note the PID (Process IDentifier) of the process you want to stop:

> netstat -ano | findstr :80

 

Next, execute the “taskkill” command and provide process id “PID” to kill the desired process:

> taskkill /PID 4292 /F

 

Using PowerShell

The PowerShell command “Stop-Process” is used to stop or kill any process. Follow the mentioned command to stop all processes that are currently listening on port 80:

> Get-Process -Id (Get-NetTCPConnection -LocalPort "80").OwningProcess | Stop-Process

 

The “Get-Process” command is used to retrieve process information from port 80 and then send it to the “Stop-Process” command:

That is, it! You are now able to stop port on windows and stop any process as well.

Conclusion

We can stop port 80 in order to stop communication over HTTP protocol. To stop port 80, open the Windows Defender Firewall advanced settings, and set the new Outbound rule that prevents the outgoing traffic and specifies the port. The outbound rule refers to applying any rule on outgoing connections. To prevent attacks on the incoming traffic, you can set a new “Inbound” rule. This post has demonstrated the method to stop port 80 on windows.

About the author

Rafia Zafar

I am graduated in computer science. I am a junior technical author here and passionate about Programming and learning new technologies. I have worked in JAVA, HTML 5, CSS3, Bootstrap, and PHP.