How to see which ports are open on your computer and who is using them

I have already written many articles about how to open a port on routers of various models. But in the comments to almost each of these instructions, I come across a situation where the user opens a port on the router, but when checking it from the outside, it turns out that it is closed. Many people run into this and don’t know what to do next. One common reason is the computer's security system. The point here is that opening a port on the router is often half the battle - you also need to open it in the firewall rules on the computer. In this article, I will detail how to open a port in Windows 7, Windows 8 and Windows 8.1 using the built-in Windows firewall.

Setting up a firewall in the operating systems Windows 7, Windows 8 and Windows 8.1 is almost identical, as is the procedure for creating port forwarding rules.

What is a “Port” and why is it needed?

The main task of a personal computer is to process information using many programs for various purposes. Most programs access their own server to receive and send data packages, for example, regular updates or individual files (file sharing services). Information is transmitted over a specific channel – a port. Each port (tunnel) has its own number, which is an identifier and determines its purpose. For example, to use the remote desktop of another computer, you need to check the status and, if necessary, open port 3389.

When installing a new game or other software, by default the tunnel is automatically checked and connected to the server. Windows Firewall displays a window asking you to allow or block the activity of this program on the network. If this is not observed and the software does not want to connect, you need to open its port on the computer.

Checking port status

Before opening a tunnel, you first need to check the open ports in Windows. The regular command line is perfect for this.

We do the following:

  1. Open the “Start/Programs/Accessories” menu and select the “Command Prompt” program.

Another way is to type “cmd” (without quotes) into the Start search bar and press “Enter.”

  1. In the command line that opens, enter the command “netstat –aon | more" without quotes. The system will display the status of all active tunnels.

We look at the last two columns and find the desired number. Opposite the number is its status:

  • Listening – the system is polling a free port. It is open.
  • Established – data is being transferred, the port is busy.
  • Close wait – the process of stopping data transfer.
  • Time wait – the port is not responding.
  1. By opening the “Task Manager” using the Ctrl+Alt+Delete key combination, you can find out what the required port is occupied by comparing its number from the console with the process ID.

If the required port is missing or busy, move on to the next step.

Method 4: TCPView

TCPView is a small GUI software that was purchased by Microsoft and is now freely available on the company's official website. In essence, this is an analogue of the command discussed above, but the information is shown in a more understandable form, and the presence of a graphical interface is a huge advantage of TCPView.

  1. Follow the link above and download TCPView from the official website.
  2. There is no need to install the program, so you can immediately launch it from the resulting archive.
  3. In the TCPView menu, view the list of active processes, and then pay attention to the list of local ports. This will help you find out which programs in Windows 10 are using ports, which means they are open.
  4. Scroll to the right of the table to see what state the port is in. For example, it may be bugged, pending, or not being used at all.

Opening a port through Windows Firewall

The firewall serves as protection (screen) against the introduction of dangerous programs, spyware and viruses that can penetrate from the Internet. It monitors running processes and traffic. It can be used to unblock ports for a specific task.

The release process looks like this:

  1. Go to “Start/Control Panel/System and Security” and find “Windows Defender Firewall” (or “Windows Firewall”).
  2. Select the item “Advanced options”.
  1. This menu contains a list of processes that use pipes to connect to servers. In order to open ports in the firewall, click on “Rules for incoming connections” and “Create a rule”.
  2. If you know which channel you need, then indicate the “For port” item.

For the sake of an example, let's try to open port 27015 for the online shooter Counter-Strike 1.6.

How to open a port on a router

If after the above steps the software still does not work, then all that remains is to check the router. The main problem in this case is that router models differ in interface and functional settings

The tips given apply to several of the most common brands.

Enter the standard IP address – 192.168.1.1 – in the address bar of any browser, the administrative interface of the router will open, enter the authorization data. In rare cases, manufacturers use a different IP; if the standard one does not fit, then the required one can be found on the back of the router, where its address and login/password are written.

Once you have entered the web interface, you must enter your login and password. The further path may vary depending on the manufacturer and model.

TENDA

“Advanced”? "Advanced Setup" ? NAT? “Virtual Server” (Virtual Servers Setup).

  1. Click the “add” button, in the “Select a Service” item, select one of the ready-made templates, in the “Server IP address” line, indicate the PC’s IP in the form of a mask: “192.168.1.” without the last digit.
  2. In “External Port Start”, specify the required port, in the “Protocol” drop-down list, select “TCP”, “UDP” or “TCP/UDP” - apply the “APPLE/SAVE” changes. The remaining lines will be filled in automatically.

D-Link

"Advanced settings"? "Firewall" ?Virtual server? "Add".

Next, fill in the settings:

  1. In the template we set Custom,
  2. Start/end external port – set the number that needs to be opened or the range,
  3. Internal IP - write the computer address, look in the windows network settings,
  4. Protocol – it is better to set TCP, but if the program requires “UDP”, select it.

Then the "Edit" and "Save" button

TP-Link

Forwarding? Virtual servers? "Add".

  • Service port - write what we want to open,
  • IP address - computer IP.

Open port 80

This channel is the main one for transmitting data between a PC and the World Wide Web via the http protocol. Port 80 cannot be released using the method described above, since it is controlled by a special system driver http.sys.

This time we'll turn to the command line.

  1. Open the command line in a known way and enter the command “netsh http “add iplisten ipaddress=::” (without quotes) and press “Enter”.
  2. The second step is to make changes to the hosts notepad file, located at the path “C:\Windows\System32\drivers\etc\hosts”. You need to add the entry “127.0.0.1 local” (without quotes) in it. After that, restart your PC and check the status of port 80.
  1. If this does not help, then open the “Start/Control Panel/Programs/Programs and Features” menu and click on “Turn Windows features on or off.”
  2. Disable IIS services by unchecking all the boxes.

Reboot the computer and again check the availability of port 80.

Method 5: PortQry

PortQry is an additional console utility from Microsoft that allows you to view open ports. We recommend using it if the netstat command and other options do not suit you, but you need to view a list of absolutely all open ports by entering just one command.

  1. PortQry is downloaded from the official Microsoft website.
  2. Once the download is complete, all that remains is to install it by following the instructions displayed on the screen. Do not change the unpacking path of the program or, when reading the following commands described in the instructions, take into account the new location.
  3. Open Command Prompt as an administrator, for example through the Start menu.
  4. There, follow the PortQry installation path to be at its root. This is done by entering the command cd + full path to the directory.
  5. All that remains is to enter the command portqry.exe –local and activate it by pressing Enter to view the list of open local ports.
  6. Scroll down, following the rows and columns to determine the port status, its number and external address.

Using third-party software CurrPorts

The methods discussed above used only standard Windows resources, however, there are several programs on the Internet for opening ports on Windows. Our first choice for review was “CurrPorts” version 2.51 from the developer Nir Sofer. It helps you find out all your active ports on Windows and is useful for quickly freeing them, removing unnecessary or dangerous processes. The program is free and easy to learn.

To use it:

  1. Go to the developer’s website https://www.nirsoft.net/utils/cports.html and download the program and cracker to your PC. Unpack the cracker into the folder with the software files.
  1. The program offers a lot of information about the process, including the port it occupies.

In the screenshot we see that Avast antivirus occupies two ports: 80 and 443. If desired, we can close this connection from the context menu or the program toolbar (but we do not recommend doing this for obvious reasons). Close only those unnecessary processes whose purpose you know.

Advantages

  • Free program in Russian.
  • No installation required.
  • Displays all running processes and the ports they occupy in real time.
  • Provides the most detailed information.
  • You can release ports from one or all processes.
  • Classic, clear interface.

Flaws

  • Not found.

Online service 2ip.ru

And finally, we will use the simple online service “2ip.ru”, designed to display various useful information on the computer, including network ports.

To visit the service:

  1. Open an Internet browser and follow the link https://2ip.ru/check-port.
  2. In the empty line, enter the port number, for example, 25565 and click “Check”.
  1. As you can see in the screenshot above, tunnel 25565 is already occupied. This way you can check any channel to see if it is busy.

The advantages of this method are its accessibility and the absence of the need to install separate software. But it only serves as a complement to the previous two options.

Method 1: netstat utility

netstat is a standard utility included in the Windows 10 operating system. It is used to display network information, including allowing you to view a list of open ports. Thanks to this, you can find out the status, port type, local and external address. This option is a priority because it does not require going to different sites and downloading additional software, and about the principles of interaction with this team, read the article at the link below. It also describes the available arguments that are recommended to be used to show only the information of interest.

Read more: Using the netstat command to view open ports

Rating
( 1 rating, average 4 out of 5 )
Did you like the article? Share with friends:
For any suggestions regarding the site: [email protected]
Для любых предложений по сайту: [email protected]