How to check open tcp/ip ports in windows

There were times when we used to test network connectivity of a specific port of the router using telnet command. Telnet used to come pre-installed in Windows but not in Windows 10. We explore different possibilities to check if a remote network port is open using command line options in Windows 10.

Windows 10 does not come with Telnet pre-installed. Even DOS Command Prompt has also become secondary with PowerShell taking the center stage.

Portqry used to be the command of choice for checking remote ports being alive and listening but it was only available up till Windows XP and Windows Server 2003.

Install Telnet in Windows 10

If you are going strictly with a DOS based command then you are left with no option but to install telnet in Windows 10. To install Telnet, follow the instructions below:

  1. Open Command Prompt Run –> cmd
  2. Run the following command:
    pkgmgr /iu:”TelnetClient”
  3. Go to Run –>telnet

Check whether the port is open or not using Command Prompt

To check the network port, follow the instructions below:

Open Telnet using the three steps described above and issue the following command:

open google.com 80

Where google.com is the host you want to test. You can also put an IP address instead of the name. 80 is the port number which you want to probe. You should replace 80 with you desired port number.

If you receive “Press any key to continue” prompt, this means that the port is open and responding to telnet. If you receive “Could not open connection” or a blank screen with blinking cursor, this means the port is closed.

If you receive “Connection to host lost“, this means that the port is open but the host is not accepting new connections.

Check open port using PowerShell

Since Microsoft is pushing PowerShell and CMD has become a legacy system, we should be using PowerShell for most of our working. Let’s check whether a remote network port is open and listening or not.

  1. Open PowerShell by going to Run –> powershell
  2. Run the following command
    tnc google.com -port 80

Checking open port using PowerShell

tns is short for Test-NetworkConnection command. google.com is the host name. You can also put an IP address instead of the host name. You can specify the port number using the -port switch at the end of tnc command.

The TNC command will give you basic information about the network connection like computer name, IP address, Interface through which you are connecting, source IP, whether the ping is successful or not, Ping reply time and finally TcpTestSucceeded. TcpTestSucceeded will give you True if the port is open and false if the port is closed.

These commands and techniques are very useful when you are troubleshooting a network. Please let us know if this has been useful for you in the comments below and we will add more troubleshooting techniques in future.

How do I unblock a port on windows to get an http connection?

I have already tried opening the port but when I use a port checker it says the port is still closed.

How to check open tcp/ip ports in windows

2 Answers 2

Open TCP Port 80 (HTTP) in Windows Firewall:

  1. From the Windows Start menu, open Control Panel.
  2. Select Windows Firewall.
  3. Select Advanced settings in the left column of the Windows Firewall window.
  4. Select Inbound Rules in the left column of the Windows Firewall with Advanced Security window.
  5. Select New Rule in the right column.
  6. Select Port in the New Inbound Rule Wizard and then click Next. Note: Do not create a Program rule – you must create a Port rule.
  7. Select which protocol this rule will apply to TCP, select Specific local ports, type port number 80, and then click Next.
  8. Select Allow the connection and then click Next.
  9. Select when this rule applies (check all of them for the port to always stay open) and then click Next.
  10. Give this rule a name and then click Finish to add the new rule. TCP Port 80 is now open and ready to be used.

If You still find it blocked follow these steps:

  1. Open cmd
  2. type netstat -a -n -o
  3. find TCP [the IP address]:[port number] . #[target_PID]#

CTRL+ALT+DELETE and choose “start task manager

Click on “Processes” tab

Enable “PID” column by going to: View > Select Columns > Check the box for PID

Find the PID of interest and “END PROCESS

At any point in time, Windows will have a lot of applications connected or trying to connect to the internet. With all those applications, it is only natural that they are using a lot of ports. From time to time, two applications may need the same port to work. When that specific port is in use by another application, it cannot use that port and the application may show a warning message or crash entirely. In those situations, it is better to know which ports are in use and which application is using that specific port. That way, you can either change the port or terminate the problem causing application so that the other one works as it should. Without further ado, let me show you how to find which ports are in use in Windows 10.

Below show methods work in Windows 7 and Windows 8 too.

Method #1: Use Command Prompt to Check Ports in Use

Using a single command, you can get a list of all the ports that are in use by various programs. This method is quite useful if you want to take a quick glance at the ports in use.

1. Search for “cmd” in the start menu, right-click on the Command Prompt and select “Run as Administrator”. This option lets you open the command prompt with admin rights.

How to check open tcp/ip ports in windows

2. In the elevated command prompt window, execute the below command. You can copy the command and paste it in the command prompt window by right-clicking inside it.

3. In the resulting output, you will see the port number right next to the IP address (ex: 192.168.42.198:50943). You can see the highlighted portion in the below image for better representation.

How to check open tcp/ip ports in windows

Keep in mind that the list will not be refreshed automatically. You have to execute the command again when you need an updated list. If you want the used port list to be updated automatically, use the below two methods.

Method #2: Use CurrPorts Utility to Find Ports in Use

Nirsoft Utilities has a pretty neat and lightweight tool called CurrPorts which lists all the ports that are in use by Windows and other programs. In case you don’t, Nirsoft has a lot of small and portable apps that are quite useful in day to day life. If you’ve never used Nirsoft Utilities, go browse the developer site and you will find interesting little tools.

1. First, download CurrPorts from the official website. Being a portable application, you don’t have to install it. After downloading, extract the exe file from the zip file and double-click on it to open.

2. As soon as you open the window, the application will list all the connections and their ports. You can find the port number under the Local Port section.

How to check open tcp/ip ports in windows

3. Being a dedicated port monitoring application, it offers quite a few options to manage the applications and ports. Just right-click on any option and you will see relevant options like the ability to close the TCP connection, copying properties, application properties, etc.

How to check open tcp/ip ports in windows

4. If you want finer control, you can create your own filters to narrow down the search. To do that, select “Options -> Advanced Filters” option.

How to check open tcp/ip ports in windows

Method #3: Use Sysinternals TCPView to See Which Ports Are in Use

Sysinternals TCPView is a Microsoft tool that makes it easy to view all the TCP connections and ports in use in Windows 10. The tool is very similar to CurrPorts.

1. Download TCPView from the Sysinternals website, extract the exe file to your desktop and double-click on it.

2. As soon as you open the application, you will be shown a user agreement. Agree to the agreement and you will instantly see all the TCP connections. You will find the port numbers in the Local Port section.

How to check open tcp/ip ports in windows

3. If you want to, you can end the connection and free the port. To do that, right click on the connection and selecting “End Process”. This will terminates the process.

How to check open tcp/ip ports in windows

That is all. It is that simple to find which ports are in use in Windows 10. If you like this article, do check out how to change network name in Windows 10 and how to show download and upload speed on taskbar in Windows.

How to check open tcp/ip ports in windows

Firewalls are there to protect you from threats on the internet (both traffic from the internet and from local applications trying to gain access when they shouldn’t). Sometimes, though, you’ll want to allow otherwise restricted traffic through your firewall. To do so, you’ll have to open a port.

When a device connects to another device on a network (including the internet), it specifies a port number that lets the receiving device know how to handle the traffic. Where an IP address shows traffic how to get to a particular device on a network, the port number lets the receiving device know which program gets that traffic. By default, most unsolicited traffic from the internet is blocked by Windows Firewall. If you’re running something like a game server, you might need to open a port to allow that specific kind of traffic through the firewall.

Note: This article shows you how to open a port on a particular PC’s firewall to let traffic in. If you have a router on your network (which you likely do), you will also need to allow the same traffic through that router by forwarding the port there.

How to Open a Port on Windows 10

Clicking Start, type “Windows Firewall” into the search box, and then click on “Windows Defender Firewall.”

How to check open tcp/ip ports in windows

Once Windows Firewall opens, click on “Advanced Settings.”

How to check open tcp/ip ports in windows

This launches Windows Defender Firewall with Advanced Security. Click the “Inbound Rules” category on the left. In the far right pane, click the “New Rule” command.

How to check open tcp/ip ports in windows

If you need to open a rule for outgoing traffic, instead of clicking “Inbound Rule,” you’d click “Outbound Rule.” Most apps are pretty good about creating their own outbound rules when you install them, but you might occasionally run into one that cannot.

How to check open tcp/ip ports in windows

On the Rule Type page, select the “Port” option and then click “Next.”

How to check open tcp/ip ports in windows

On the next screen, you’ll have to choose whether the port you’re opening uses the Transmission Control Protocol (TCP) or User Datagram Protocol (UDP). Unfortunately, we can’t tell you specifically which to use because different apps use different protocols. Port numbers can range from 0-65535, with ports up to 1023 being reserved for privileged services. You can find an unofficial list of (most) TCP/UDP ports on the Wikipedia page, and you can also search for the app you’re using. If you can’t determine the specific protocol to use for your app, you can create two new inbound rules—one for TCP and one for UDP.

Select the “Specific Local Ports” option and then type the port number into the field provided. If you’re opening more than one port, you can separate them by commas. If you need to open a range of ports, use a hyphen (-).

Click “Next” when you’re done.

How to check open tcp/ip ports in windows

On the next page, click “Allow the Connection” and then click “Next.”

How to check open tcp/ip ports in windows

Note: For this guide, we’ll be using the “Allow the Connection” option, as we trust the connection for which we’re creating a rule. If you want a little more piece of mind, the “Allow the connection if it is secure” rule uses Internet Protocol security (IPsec) to authenticate the connection. You can try that option, but many apps do not support it. If you try the more secure option and it doesn’t work, you can always come back and change to the less secure one.

Next, choose when the rule applies and click “Next.” You can choose one or all of the following:

  • Domain: When a PC is connected to a domain controller that Windows can authenticate access to the domain.
  • Private: When a PC is connected to a private network, like a home network or a network that you trust.
  • Public: When a PC is connected to an open network, like a cafe, airport, or library where anyone can join, and the security is unknown to you.

How to check open tcp/ip ports in windows

In the final window, give your new rule a name and an optional, more detailed description. Click “Finish” when you’re done.

How to check open tcp/ip ports in windows

If you want to disable the rule at any point, locate it in the list of Inbound or Outbound Rules, right-click it, and then click “Disable Rule.”

How to check open tcp/ip ports in windows

That’s all there is to it. If you need to open any other ports for a different program or with a different rule, repeat the steps above using a different set of ports to open.

You never know when this will come in handy

In another article, we explained computer ports and what they’re used for. Other than that, what can we do with port information? Since all traffic in and out of the computer goes through ports, we can check on them to see what they’re doing. Maybe the port isn’t listening for traffic? Maybe something is using a port that shouldn’t be?

We’re going to use the Windows command netstat to see our listening ports and PID (Process ID). We’re also going to see what we can do with that information.

How to check open tcp/ip ports in windows

What Is Netstat?

The netstat command is a combination of the words ‘network’ and ‘statistics’. The netstat command works in all versions of Windows from Windows XP right up to Windows 10. It’s also used in other operating systems (OS) like Unix and Linux, but we’ll stick to Windows here.

Netstat can provide us with:

  • The name of the protocol the port is using (TCP or UDP).
  • The local IP address and name of the computer and the port number being used.
  • The IP address and port number to which we’re connecting.
  • The state of a TCP connection. For details on what these states are, read the Event Processing section of RFC 793.

Using Netstat To See Listening Ports & PID

  • Use the key combination Win Key + X. In the menu that opens, select Command Prompt.

How to check open tcp/ip ports in windows

  • Enter the command . The parameters for netstat are preceded with a hyphen, not a forward slash like many other commands. The -a tells it to show us all active connections and the ports on which the computer is listening.

The -n tells netstat to show the IP addresses and ports as numbers only. We’re telling it to not try to resolve the names. This makes for a quicker and neater display. The -o tells netstat to include the PID. We’ll use the PID later to find out what process is using a specific port.

  • View the results and take note of the addresses, port numbers, state, and PID. Let’s say we want to know what’s using port 63240. Note that its PID is 8552 and it’s connecting to the IP address 172.217.12.138 on port 443.

How to check open tcp/ip ports in windows

What’s Using That Port?

  • Open Task Manager. That’s most easily done by using the key combination Ctrl + Shift + Esc.

How to check open tcp/ip ports in windows

  • Click on the Details tab. To make this easier to find, click on the PID column header to sort the PIDs numerically.

How to check open tcp/ip ports in windows

  • Scroll down to PID 8552 and see what process it is. In this case, it’s googledrivesync.exe. But is it really? Sometimes viruses can make themselves look like legitimate processes.

How to check open tcp/ip ports in windows

  • In a web browser, go to ipinfo.io. Enter the IP address 172.217.12.138. As we can see, the IP address is registered to Google. So this googledrivesync.exe is a legitimate one.

How to check open tcp/ip ports in windows

How To Get Port, PID, & Process Name In PowerShell

PowerShell is Microsoft’s newer way to use a command-line interface with Windows. We say newer, but it’s been around for several versions. You should learn PowerShell even if you’re a home user.

Most Windows commands also work in PowerShell, plus we can combine them with PowerShell’s cmdlets – pronounced command-lets. Joe at Winteltools.com provides the script for this method.

  • Open Notepad and enter the following code:

How to check open tcp/ip ports in windows

  • Save the file as get-NetstatProcessName.ps1. Make sure to note where it’s being saved. It’s important to change the Save as type: to All Files (*.*) or it will get saved as get-NetstatProcessName.ps1.txt and it won’t work for us.

How to check open tcp/ip ports in windows

  • Open PowerShell and navigate to the location in which the script was saved. In this case, it’s . Hit Enter to run the command.
  • Run the script using dot-sourcing to make it work. That means use ./ before the name of the file. The command will be
  • Now we can see all the traditional netstat info plus the process name. No need to open Task Manager anymore.

How to check open tcp/ip ports in windows

Go Get Them

We’ve covered two ways to use the netstat command to see listening ports. It can be used either in the old Command Prompt or within a PowerShell script. With the information it can give us, we’ve looked at how it can help us figure out what our computer is doing.

If you thought netstat is a great utility, take a look at some other Windows TCP/IP utilities like tracert, ipconfig, and nslookup. Or use Resource Monitor to get a better look into hidden website and Internet connections. There is a lot you can do to see exactly what your computer is doing.

Have you used netstat to solve a problem? Please tell us what you did. Any questions about how to use netstat? Please ask us in the comments below.

Guy has been published online and in print newspapers, nominated for writing awards, and cited in scholarly papers due to his ability to speak tech to anyone, but still prefers analog watches. Read Guy’s Full Bio

How do I unblock a port on windows to get an http connection?

I have already tried opening the port but when I use a port checker it says the port is still closed.

How to check open tcp/ip ports in windows

2 Answers 2

Open TCP Port 80 (HTTP) in Windows Firewall:

  1. From the Windows Start menu, open Control Panel.
  2. Select Windows Firewall.
  3. Select Advanced settings in the left column of the Windows Firewall window.
  4. Select Inbound Rules in the left column of the Windows Firewall with Advanced Security window.
  5. Select New Rule in the right column.
  6. Select Port in the New Inbound Rule Wizard and then click Next. Note: Do not create a Program rule – you must create a Port rule.
  7. Select which protocol this rule will apply to TCP, select Specific local ports, type port number 80, and then click Next.
  8. Select Allow the connection and then click Next.
  9. Select when this rule applies (check all of them for the port to always stay open) and then click Next.
  10. Give this rule a name and then click Finish to add the new rule. TCP Port 80 is now open and ready to be used.

If You still find it blocked follow these steps:

  1. Open cmd
  2. type netstat -a -n -o
  3. find TCP [the IP address]:[port number] . #[target_PID]#

CTRL+ALT+DELETE and choose “start task manager

Click on “Processes” tab

Enable “PID” column by going to: View > Select Columns > Check the box for PID

Find the PID of interest and “END PROCESS

This support article provides solutions on what to do when you see an error in the Windows Server event viewer that contains:

Error Message : Only one usage of each socket address (protocol/network address/port) is normally permitted.

The full error message is at the bottom of this article.

Explanation of Issue

On Windows Server with ASP, .NET, IIS, etc – there is normally only one (1) permitted usage of each socket address (protocol/network address/port). When a client initiates a TCP/IP socket connection to a server the client typically connects to a specific port on the server and requests that the server respond to the client on a TCP or UDP port chosen from an available pool of ports. Under certain conditions it is possible that the available ports in the default range will be exhausted. A new client connection will be refused if all ports are used and a message will be written to the event log.

Why this happens

TCP/IP port exhaustion can occur on a client computer if the client computer is engaging in an unusually high number of TCIP/IP socket connections with a Server application. When a FileHold Server application is very busy with client requests, each FileHold client is making repeated, authenticated calls to the FileHold server application, and consequently there is repeated and continuous open and closing of connections. A client connection is comprised of 5 parts ( Protocol, Local IP, Local Port, Remote IP, Remote Port).

By default there are 4076 ports available in Windows 2003 because the usable port range is between port 1025 and port 5000. The FileHold web services communicate with the authenticated client repeatedly. On a very busy server the FileHold application can run into these port bottlenecks within the Windows server.

By default on Windows 2008 servers the operating system allows socket connections to be established between the ports 49152 – 65535; this equates to a little over 13,000 user ports. This is a larger amount than the default of Windows 2003, but it may need to be increased on a busy server.

If all of the available ports are allocated to FileHold client sessions then new clients experience a condition known as TCP/IP port exhaustion. When TCP/IP port exhaustion occurs client port reservations cannot be made and errors will occur in client applications that attempt to connect to a server via TCP/IP sockets. TCP/IP port exhaustion is more likely to occur under high load conditions than under normal load conditions. It can also be an indicator that the server hardware is underpowered and not adequate for the job.

At the bottom of this support article is a listing of event ID’s that can be an indicator that this is occurring. Each of these events will display a similar error: TCP Provider, error: 0 – An existing connection was forcibly closed by the remote host.

EventID’s: 100, 141, 177, 223, 288, 291, 293, 312, 323

Resolution for Windows 2003 Server and Windows 2008 Server

Adjust the web server TCP/IP socket parameters to provide the IIS/ASP.NET FileHold Windows Server environment with adequate network sockets at a sufficient reusable rate. To do this, perform the following tasks in the Windows registry:

IMPORTANT: Incorrect use of the Windows registry editor for Windows 2003 may prevent the operating system from functioning properly. Great care should be taken when making changes to a Windows registry. Registry modifications should only be carried-out by persons experienced in the use of the registry editor application. It is recommended that a complete backup of the registry be made prior to making any registry changes.

Windows 2008 Server

  • On Windows 2008 servers, by default the operating system allows socket connections to be established between the ports 49152 – 65535; this equates to a little over 13,000 user ports. This should be increased if you see the warning signs in the Windows event viewer logs.
  • To display the current ports for the TCP protocol use the netsh command
  • Open command prompt as administrator
  • Then type

netsh int ipv4 show dynamicport tcp

-To increase the ports use the net shell command

netsh int ipv4 set dynamicport tcp start=1500 num=63000

This will provide 63,000 TCP user ports.

  • When increasing the MaxUserPort, Microsoft recommends that port 1434 be reserved for use by the SQL Server Browser service (sqlbrowser.exe).
  • On a Windows 2008 server we simply start the port allocation at 1500 as shown in the previous Windows 2008 netsh command.

Windows 2003 Server

1. On the FileHold Application Server please locate the following key in the Windows registry:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

2. Update the following values, or create them if they do not already exist:

In this article I’ll describe a few ways to verify over the network if a remote TCP port on a host is open or not. This is a popular troubleshooting method to identify if a specific service or application is running on a remote server or computer.

How to check open tcp/ip ports in windows

As you might know already, when an application or service is running on a host, it has a specific TCP or UDP port associated to it in order to communicate over a TCP/IP network (i.e in order for the service to send and receive TCP/IP packets over the network).

For example, some popular (well-known) services use the following TCP ports:

  • Web Service: Ports 80 (HTTP), 443 (HTTPs)
  • Windows Remote Desktop Service: Port 3389
  • Secure Shell (SSH): Port 22
  • File Transfer Protocol (FTP): Ports 20,21
  • Telnet: Port 23
  • Simple Mail Transfer Protocol (SMTP): Port 25
  • Post Office Protocol (POP3): Port 110

If you want to troubleshoot connectivity issues from your local computer/server towards a remote host, it’s better to start working from the lower OSI layers and more your way up to identify the problem.

For example, let’s say a remote web server does not respond to HTTP requests (i.e you have started your browser and visited the remote URL with no response).

One of the first things to check is whether the remote web server’s TCP port 80 or 443 are open and reachable from your end.

If you try to “ping” the remote ports (i.e try to communicate with the ports) and you get no-response, it means the problem is on the network between your end and the server (maybe a firewall problem, network routing problem etc).

3 Ways to “Ping” a Remote Port

To be accurate here, the term “ping the remote port” is not actually a valid statement. The “Ping” protocol is actually using ICMP packets (echo, echo reply etc) to identify if a remote host is “alive” (i.e connected to the network and replying to the ICMP packets).

The ping protocol does not send TCP packets to the remote host to identify open ports.

In this article, I’m just using the term “ping the port” in the context of “poking the port” to verify if it’s open (listening) or not.

Let’s see three ways to check if a port is open:

Using Telnet

Telnet is a popular (and very old and unsecure) protocol to connect remotely to systems (e.g to network devices, Linux machines etc).

It has its origins back to 1969 (from when the Internet was born) and provides a text-based (command line) terminal for interacting with remote systems.

By default, the telnet protocol uses port 23 to connect to the remote system. However, you can specify the destination (remote) port that you want to connect to.

Example:

telnet www.google.com 443

As shown on the screenshot above, I have used “telnet” to connect to www.google.com at port 443. The reply from Google is “Connected” which means that port 443 is open.

Now, let’s try to “ping” (connect) to a random port (e.g 12345) which is probably closed:

telnet www.google.com 12345

As you can see from above, port 12345 does not respond to our telnet request which means it’s closed.

Using NMAP

I have explained what NMAP is and how to use it in the articles here and here.

Basically with nmap you can send TCP packets to specific remote ports and listen to the reply packets to verify if the port is open or closed.

Let’s use nmap to see if port 53 (DNS) is listening on the Google DNS service (IP address 8.8.8.8)

Example:

Starting Nmap 7.70SVN ( https://nmap.org ) at 2019-09-16 13:16 EDT
Nmap scan report for dns.google (8.8.8.8)
Host is up (0.0095s latency).
PORT STATE SERVICE
53/tcp open domain
Nmap done: 1 IP address (1 host up) scanned in 0.21 seconds

How to check open tcp/ip ports in windows

As you can see from above, port 53 (DNS) is open on the remote server (8.8.8.8).

Using NetCat (“NC”)

NetCat (abbreviated as “nc”) is considered the “swiss army knife” of networking utilities. It can send and receive TCP packets among other useful functions.

Similar to Telnet, we can use NC to send TCP packets to a destination port and see if the port is open:

Example:

# nc -v www.google.com 80

www.google.com [172.217.6.196] 80 (http) open

Make sure to use the “-v” switch in order to get verbose output from the netcat command. As shown above, port 80 is open on Google.

Final Words

So here you go, three different ways to “ping a port” and check if it responds or not. I have used the three methods above on a Linux host but you can use them on Windows machines as well (especially NMAP can easily be installed on Windows as well).

Note: Although NetCat is a very useful utility, do not use it on Windows machines because most probably the Antivirus will detect the tool as “malicious”. NetCat is actively being used by hackers (because of its versatility and powerful features) so it got a bad reputation in the security industry.

Related Posts

  • 12 Types of Network Devices Found in Modern Enterprise Networks
  • Comparison and Differences Between MAC vs IP Address
  • Comparison of VLAN vs Subnet in TCP/IP Computer Networks
  • Comparison of FTP and HTTP Network Communication Protocols
  • 8 Different Types of Servers in Computer Networks

About Harris Andrea

Harris Andrea is an Engineer with more than two decades of professional experience in the fields of TCP/IP Networks, Information Security and I.T. Over the years he has acquired several professional certifications such as CCNA, CCNP, CEH, ECSA etc.

He is a self-published author of two books (“Cisco ASA Firewall Fundamentals” and “Cisco VPN Configuration Guide”) which are available on Amazon and on this website as well.

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Categories

About Networks Training

In Windows 10, there is an ability to check the connection to a certain port on a remote machine. This is possible thanks to PowerShell. So, no third party tools are required and you can do it natively.

PowerShell is an advanced form of command prompt. It is extended with a huge set of ready-to-use cmdlets and comes with the ability to use .NET framework/C# in various scenarios. If you have the skill to write scripts, you can create some very powerful ones to automate Windows.

One of its cmdlets, Test-NetConnection, can be used to check the connection to a remote address and to a custom port specified by the user.

It has the following syntax:

Use it as follows.

Test remote network port connection in Windows 10

  1. Open PowerShell
  2. Type the following command:

Replace the COMPUTER_NAME portion with the actual remote PC name or IP address. Specify the port you need to connect to instead of the PORT_NUMBER portion.

For example, let’s test the connection to the DNS port (53) of the public Google DNS server (8.8.8.8). The command will look as follows:

The output: The line TcpTestSucceeded: True indicates that the connection was successful and the port 53 is open.

If you try to connect to some random port, which is closed for incoming connections, the Test-NetConnection cmdlet will respond with the following information:

The output indicates that the connection has failed. The line TcpTestSucceeded has the value “False”, but the cmdlet shows additional information that the target server is alive. It pinged the destination address and includes the results in the output. See the lines:

For some servers, you may face the situation where PingSucceeded is False but TcpTestSucceeded is True. It just means that ICMP Ping is disabled on the target server but the destination port is open for incoming connections.

The cmdlet Test-NetConnection is one of the most useful PowerShell cmdlets. It saves your time and extends the built-in network diagnostics functionality in Windows 10.

The Test-NetConnection cmdlet is available in Windows 8.1 too.

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

Share this post

About Sergey Tkachenko

Sergey Tkachenko is a software developer from Russia who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.

1 thought on “ Test remote network port connection in Windows 10 ”

what i do to open that port ? allready open it on my modem but still Port 30120 is closed on 109.131.175.13.

WARNING: TCP connect to (8.8.8.8 : 30120) failed
ComputerName : 8.8.8.8
RemoteAddress : 8.8.8.8
RemotePort : 30120
InterfaceAlias : Ethernet
SourceAddress : 192.168.1.11
PingSucceeded : True
PingReplyDetails (RTT) : 10 ms
TcpTestSucceeded : False

Leave a Reply Cancel reply

Connect with us

We discontinued Facebook to deliver our post updates.