How to open TCP and upd port in Windows 10 using command Prompt

Introduction

In this article, we will show you how to open TCP and UDP ports in Windows 10 using the command prompt. Understanding how to open ports can be useful for a variety of reasons, such as setting up a game server, troubleshooting network issues, or simply allowing certain apps and services to work properly.

Requirements

  • A computer running Windows 10
  • Administrative privileges on your computer
Step 1: Open the Command Prompt

Step 1: Open the command prompt. You can do this by clicking the start menu and searching for “command prompt”, or by pressing the Windows key + R and typing “cmd” into the Run box.

Step 2: Find the PID of the Process

Before you can open a port, you need to find the PID (process ID) of the process that is using the port.

To do this, type these command into the command prompt and press enter:

netstat -a -o

This will display a list of all the open ports on your computer and the PID of the process that is using each port. Find the port that you want to open and make note of the PID.

Step 3: Kill the Process

Next, you need to kill the process that is using the port. To do this, type the following command into the command prompt and press enter:

taskkill /F /PID [PID]

Replace [PID] with the PID of the process that you found in step 2. This will kill the process and free up the port.

Step 4: Open the Port

Now that the port is free, you can open it using the following command:

netsh interface portproxy add v4tov4 listenport=[PORT] listenaddress=0.0.0.0 connectport=[PORT] connectaddress=[IP ADDRESS]

Replace [PORT] with the port number that you want to open, and replace [IP ADDRESS] with the IP address of the computer that you want to connect to. For example, if you want to open TCP port 80 and connect to 192.168.1.1, you would use the following command:

netsh interface portproxy add v4tov4 listenport=80 listenaddress=0.0.0.0 connectport=80 connectaddress=192.168.1.1
Step 5: Verify that the Port is Open

To verify that the port is open, you can use the netstat command again. Type the following command into the command prompt and press enter:

netstat -a -o

This will display a list of all the open ports on your computer. If the port that you opened is listed, then it is open and available for use.

Leave a Reply

Your email address will not be published. Required fields are marked *