Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can’t test a port with the standard ping command: it checks whether a host responds to ICMP, not whether a TCP or UDP service accepts traffic. To test a TCP port, use Test-NetConnection on Windows or nc on macOS and Linux. For example, try Test-NetConnection 192.0.2.10 -Port 443 or nc -vz -w 3 192.0.2.10 443.

What “ping an IP address and port” means

The phrase usually combines two separate checks:

  • Host reachability: Does the target respond to an ICMP echo request?
  • Port reachability: Can your computer reach a service listening on a particular TCP or UDP port?

For example, a test of 203.0.113.25 on port 22 should specify whether the service uses TCP or UDP. The number alone does not settle that: the same port number can be used with either transport. DNS, for instance, can use both UDP and TCP on port 53.

Ordinary ping sends ICMP echo requests, which have no TCP or UDP destination-port field. It can show that an ICMP exchange succeeded, but it cannot tell you whether a web server, SSH server, database, or other service is accepting connections. GNU Inetutils’ ping documentation describes this ICMP behavior.

Run the tests on Windows

Check ICMP reachability

ping 192.0.2.10

To send four requests, use ping -n 4 192.0.2.10. To select an address family, use ping -4 192.0.2.10 or ping -6 2001:db8::10. Windows command-line options differ in places from Unix-like systems.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Klein Tools VDV526-200 LAN Scout Jr Cable Tester Ethernet Cable Tester Kit
  • VERSATILE CABLE TESTING: Cable tester for data (RJ45) terminated cables and patch cords, ensuring comprehensive testing capabilities
  • LARGE BACKLIT LCD: Backlit LCD display enables easy reading of pin-to-pin wiremap results, even in low-lit areas
  • COMPREHENSIVE FAULT DETECTION: Test for Open, Short, Miswire, Split-Pair faults, Cross-over, and Shield, providing thorough fault detection
  • INTUITIVE USER INTERFACE: User-friendly interface with three buttons and simple, easy-to-identify test responses, ensuring a smooth testing experience
  • MULTIPLE TONE GENERATOR STYLES: Tone on a single wire, wire pair, or all 8 conductor wires using the multiple style tone generator (solid/warble); requires probe Cat. No. VDV500-123 (sold separately)

Check a TCP port

Test-NetConnection -ComputerName 192.0.2.10 -Port 443

Check the output for TcpTestSucceeded. A value of True means the TCP connection test succeeded; False means it did not. The detailed output can also show ComputerName, RemoteAddress, and RemotePort. For a Boolean-only result, run:

Test-NetConnection 192.0.2.10 -Port 443 -InformationLevel Quiet

The shorter alias is tnc. PowerShell also supports the documented common TCP port names HTTP, RDP, SMB, and WINRM; for example, Test-NetConnection server.example.com -CommonTCPPort RDP. Use -Port for an arbitrary port. Microsoft documents Test-NetConnection syntax and its TCP port test.

Rank #2
NOYAFA NF-8508 Network Cable Tester with Optical Power Meter
  • Multifunctional NOYAFA NF-8508 Network Cable Tester: There are nine features to meet your needs. Continuity Testing, Cable Scan, Port Flash, Length Measurement, POE Power Supply Test, QC testing, Optical Power Meter, VFL and NVC function.It is perfectly suited for various engineering cabling projects, network troubleshooting, network equipment maintenance and testing scenarios. Its precise cable scanning and fault localization capabilities help you effortlessly pinpoint the root cause of issues.
  • 7 WAVELENGTHS OPTICAL POWER METER: NF-8508 network cable tester can measure 7 standard wavelengths, 850/1300/1310/1490/1550/1625/1650, power detecting range(dBm): -70 ~ +10. Its power detection range spans from -70 dBm to +10 dBm, supporting FC/SC/ST connectors. It enables precise fiber optic power measurement, helping users efficiently assess fiber signal strength and ensure healthy fiber link operation. It effortlessly detects attenuation issues within fibers, thereby safeguarding fiber network stability.
  • High Efficiency Visual Fault Locator: Easy identification of fiber breakpoints, poor connections, bending or cracking. Excellent for finding the right fiber to splice or quickly finding a break. Emmiting Energy: standard wavelenth: 650nm. Fast flashing, slow flashing, high precison.The built-in self-calibration ensures stable long-term performance, and Class IIIa laser (output<5mW) ensures safe daily operation.
  • PORT FLASHING:The indicator light on the connection port in the NF-8508 device flashes to help accurately locate the cable. Displays port information, including operating speed, duplex mode, and negotiation settings. Port lights flash on the same screen to show the port's operating speed, making it easy to pinpoint lines and ports.
  • PoE Testing and Cable Length Test: PoE testing can check cable mapping polarity and voltage of PoE network switches, withstand 60VDC. Automatically detects and switches between 10M/100M/1000M modes, Includes cable tracking, short circuit test, interruption of circuit test and etc The RJ45 cable tester can quickly measure the length of the cable with a range of 200m. Not only network cables, but also phone lines and BNC cables.

Run the tests on macOS or Linux

Check ICMP reachability

ping -c 4 192.0.2.10

The -c 4 option sends four requests. Options vary between platforms; for example, Windows uses -n to set the request count.

Check a TCP port with netcat

nc -vz -w 3 192.0.2.10 443

Here, -v requests verbose output, -z checks for a listening service without sending application data, and -w 3 sets a three-second timeout on implementations that support it. A success message may look like Connection to 192.0.2.10 443 port [tcp/https] succeeded!

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Klein Tools VDV501-851 Scout Pro 3 Tester Starter Set Cable Tester
  • VERSATILE CABLE TESTING: Cable tester tests voice (RJ11/12), data (RJ45), and video (coax F-connector) terminated cables, providing clear results for comprehensive testing on unenergized Ethernet cables (not designed to test PoE)
  • EXTENDED CABLE LENGTH MEASUREMENT: Measure cable length up to 2000 feet (610 m), allowing for precise cable length determination
  • COMPREHENSIVE FAULT DETECTION: Test for Open, Short, Miswire, or Split-Pair faults, ensuring thorough fault detection and identification
  • BACKLIT LCD DISPLAY: Backlit LCD screen displays cable length, wiremap, cable ID, and test results, ensuring easy readability in various lighting conditions
  • EFFICIENT CABLE TRACING: Trace cables, wire pairs, and individual conductor wires using the multiple style tone generator (requires analog probe Cat. No. VDV500-123, sold separately), simplifying cable tracing tasks

With nc, enter the address and port as separate arguments; 192.0.2.10:443 is not the syntax shown here. Netcat flags and output vary by implementation and OS release. Check the local help with nc -h or the manual with man nc. See the OpenBSD netcat manual for the documented behavior of its -z, -v, and -w options, and the macOS-related netcat manual for macOS syntax.

Use Nmap for multiple ports or additional detail

Nmap is useful when you need to check multiple ports or distinguish host discovery from port scanning. Use it only on systems you own or have explicit permission to test.

Rank #4
Network Ethernet Cable Tester for LAN RJ45 Cat5 Cat5e Cat6 Cat6a Cat7 UTP/Shielded Cable and RJ11 RJ12
  • The LAN cable tester can test both of the RJ11 telephone cable and RJ45 network cables such as RJ45 Cat5 Cat6 Cat7. Built-in high performance chip, which provide faster test results when checking wires and data points.
  • The network provides the verification detail of wires to ensure that your networking is flowing optimally. And it will inform you whether the cables are paired and connected correctly or not.
  • The network cable tester features a nice LED display which indicates. And the results that are easy for anyone to understand. It can be used by both professionals and unskilled home-users.
  • Note: The cable tester needs a 9-volt battery to function. The battery is not included in the package at the time of purchase.
  • If you are not satisfied with this Ethernet cable tester, please feel free to contact us. We will solve all your problems well.
  • One TCP port: nmap -p 443 192.0.2.10
  • Several TCP ports: nmap -p 22,80,443 192.0.2.10
  • A TCP port range: nmap -p 1-1024 192.0.2.10
  • Optional service/version detection: nmap -sV -p 443 192.0.2.10

If Nmap’s initial host-discovery step does not find the host, but you are authorized to check its port, skip that step with nmap -Pn -p 443 192.0.2.10. Nmap’s -Pn option treats targets as up for the scan rather than relying on host discovery first. See the Nmap host-discovery guide and the Nmap manual for discovery and scan options.

Test UDP with a protocol-aware check

A TCP connection test does not test UDP. UDP is connectionless, and a generic probe may receive no response even when a service is available. To scan a UDP port with Nmap, use nmap -sU -p 53 192.0.2.10. A result of open|filtered is inconclusive: Nmap did not receive enough information to distinguish an open port from filtering.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
TESMEN TLP-123A Network Cable Tester for RJ11 RJ45, Ethernet Wire Tool for CAT5/CAT5E/CAT6/CAT6A/CAT7/UTP&STP, LAN & TEL Continuity Test, Suitable for Cable Maintenance - Green
  • Multifunctional Network Cable Tester: TESMEN TLP-123A Supports RJ45 and RJ11, enabling rapid detection of line connectivity, short circuits, open circuits, miswiring, and cable shielding status. An essential tool for troubleshooting line faults and network maintenance, it effectively boosts your work efficiency
  • Convenient and Efficient: Featuring one-button operation and a test speed adjustment gear on the main control unit for enhanced flexibility. Clear LED indicators provide intuitive test result displays, making it easy for both professionals and home users to operate
  • Portable and Durable: Compact and lightweight design for easy portability. Constructed with high-quality plastic housing for robust structure, ensuring both durability and stability. Ideal for home wiring, IT equipment setup, electrical maintenance, and LAN DIY projects
  • Detachable design: The main control unit and remote unit can be separated and used independently, allowing you to test both ends of long cables. This makes it ideal for wall-mounted ports, long-distance cabling, or structured cabling systems, perfect for homes, offices, or professional IT environments
  • What you will get: 1 * TLP-123A Network Cable Tester, 1 * user manual, 2 * AAA batteries

Where possible, use the client for the service you are checking. For DNS, for example, query the server with dig @192.0.2.10 example.com. Do not treat a generic UDP timeout as proof that a port is closed. Nmap’s port-state documentation explains the possible UDP results and their limits.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Interpret ping and port-test results

These results are clues, not definitive diagnoses: firewalls and other network devices can block, reject, or alter traffic.

ICMP ping TCP port test Likely interpretation
Succeeds Succeeds The host responds to ICMP and the TCP service is reachable from the test location.
Succeeds Connection refused The host is reachable, but no service accepted the connection, or a device actively rejected it.
Succeeds Times out The port or return traffic may be filtered, or the service may be unavailable.
Fails Succeeds ICMP may be blocked or deprioritized while the TCP service remains reachable.
Fails Fails The host or path may be unreachable, or both protocols may be filtered.
Fails UDP result is ambiguous Use a protocol-aware test or confirm the service from the server; UDP silence alone is not conclusive.

Connection refused generally means a response indicated that the connection was not accepted or was actively rejected. Connection timed out means no usable response arrived before the timeout; it cannot distinguish on its own among a dead host, packet filtering, routing trouble, or an unavailable service.

Troubleshoot a failed port test

  1. Check the target and port. Confirm the IP address, port number, and whether the service uses TCP or UDP. If testing a hostname, check that it resolves to the address you intend.
  2. Check whether the service is listening. On the server, use a service-status tool or a local socket tool such as ss, lsof, or netstat. A running process may still be listening on the wrong port.
  3. Check the bind address. A service bound only to 127.0.0.1 accepts local connections but not connections through the server’s other interfaces.
  4. Review filtering and forwarding. Check the server firewall, cloud security group or network ACL, router/NAT port-forwarding rule, VPN route, and any corporate outbound filtering. Rules may allow only specific source addresses.
  5. Test from the network where access matters. For an external-access problem, run the test from an external network. A test on the server or same LAN can behave differently because of local firewall rules, NAT loopback, VPN routing, or internal DNS.
  6. Separate IPv4 and IPv6. A hostname can resolve to both address families. On Unix-like systems, try ping -4 example.com and ping -6 example.com. To isolate a port test, use the literal IP address you want to check; PowerShell may choose an address based on system resolution and routing.
  7. Continue with an application-level check. A successful TCP connection proves transport-level reachability, not that the application is healthy or configured correctly. For an appropriate service, test the protocol itself—for example, curl -I https://192.0.2.10/ for HTTPS or ssh -v user@192.0.2.10 for SSH. These are service-specific checks, not generic port tests.

Choose the right tool

Question First tool to try
Does the host respond to ICMP? ping
Is one TCP port reachable on Windows? Test-NetConnection
Is one TCP port reachable on macOS or Linux? nc -vz
Do several ports need checking? Nmap, with authorization
Is a UDP service responding? The service’s client, or Nmap with protocol-aware interpretation
Is the issue with routing? traceroute, tracert, or PowerShell route diagnostics

The example addresses 192.0.2.10, 203.0.113.25, and 2001:db8::10 are documentation examples, not real service targets.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Test only systems you are allowed to check

A single connectivity test can be part of routine troubleshooting, but Nmap and netcat can also perform broader scans. Testing systems without authorization may violate organizational policy, a service’s terms, or applicable law. Get explicit permission before scanning systems you do not own or administer.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.