-->

How To Ping A Port Number

How To Ping A Port Number

https://www.rootusers.com/how-to-ping-a-port/

RootUsers

Guides, tutorials, reviews too intelligence for System Administrators.

How to "ping" a port

Most of us would last familiar amongst the uncomplicated ICMP based 'ping' ascendancy which allows us to examine for a basic response from some network connected device. While slap-up for basic troubleshooting it does non allow us to confirm if the detail host at the other terminate is responding on TCP or UDP ports where the bulk of services are probable to last provided.

Ping isn't the last all too terminate all of network troubleshooting, if a firewall blocks inbound ICMP traffic thus a ping volition non succeed which tin hit a faux perception that the host is downward every bit it is non responding to the ping, yet other services could soundless last responding fine.

Alternatively spell ping may come upward dorsum fine amongst a response it doesn't dot if a spider web server is responding on port fourscore for HTTP requests, the spider web server may conduct maintain failed too no longer last responding.

So if ping is ICMP based, tin nosotros hitting a TCP or UDP port for response instead? The response is yes, let's accept a look.

Enter tcping

tcping is i such tool that tin last used to depository fiscal establishment stand upward for that a TCP port is responding, at that topographic point are a few versions available yet I role this one: http://www.elifulkerson.com/projects/tcping.php

The manual is on the same page, basically yous tin run a ascendancy similar to the below.

C:\Users\Admin\Desktop>tcping.exe google.com 443    Probing 150.101.161.230:443/tcp - Port is opened upward - time=2.203ms  Probing 150.101.161.230:443/tcp - Port is opened upward - time=1.426ms  Probing 150.101.161.230:443/tcp - Port is opened upward - time=1.764ms  Probing 150.101.161.230:443/tcp - Port is opened upward - time=1.393ms    Ping statistics for 150.101.161.230:443       4 probes sent.       4 successful, 0 failed.  Approximate trip times inwards milli-seconds:       Minimum = 1.393ms, Maximum = 2.203ms, Average = 1.697ms  

Here nosotros are using tcping to depository fiscal establishment stand upward for port 443 at google.com. As tin last seen the port is showing every bit beingness opened upward too responding, if the port is non opened upward it volition exhibit every bit no response afterward 2000ms past times default.

You could also use telnet to examine for TCP connectivity to a port, yet the tcping tool provides farther features every bit outlined inwards the usage section here. Some such features include beingness able to continually run the examine allowing a agency to generate traffic for yous to lookout adult man out for inwards alive parcel captures every bit good every bit the response time.

What nearly UDP?

As UDP is a connectionless protocol, determining if it is responding is a fleck different. H5N1 TCP 'ping' industrial plant past times performing a 3 agency mitt shake, the source volition shipping a SYN to the destination, the goal volition response amongst a SYN-ACK, too the source volition thus shipping an ACK completing the handshake too establishing the connection. As UDP does non found a connexion nosotros can't merely aspect for this to create upward one's heed if the port is responding, nosotros instead require to shipping specific information too encounter if nosotros have a response.

NMAP is a slap-up tool for this, yous tin download it too role it to port scan a goal address to create upward one's heed what ports are open.

In this event nosotros are querying if 8.8.8.8 is responding on UDP port 53, every bit it serves DNS nosotros would aspect it to last open.

C:\Users\Admin\Desktop\nmap-6.47>nmap -sU -p 53 8.8.8.8    Nmap scan written report for google-public-dns-a.google.com (8.8.8.8)  Host is upward (0.0050s latency).  PORT   STATE         SERVICE  53/udp open|filtered domain    Nmap done: 1 IP address (1 host up) scanned inwards 5.31 seconds  

The open|filtered upshot is used when nmap is unable to create upward one's heed if the port is opened upward or filtered, the opened upward port may non conduct maintain given a response. It shows that the service has been identified every bit 'domain' every bit it's for serving DNS. I've tested this to another DNS servers out on the Internet too some practise exhibit every bit opened upward exclusively confirming that they are responding.

NMAP tin also last used to depository fiscal establishment stand upward for a TCP port is opened upward inwards a similar way, merely alter -sU to -sT.

Why a port may non respond

There are a few uncomplicated reasons that a port may non respond to your test.

  • A firewall is blocking the traffic: There may last a firewall running betwixt the source too goal filtering the traffic depending on the rules inwards identify fifty-fifty if yous know the goal should last responding on a detail port.
  • The goal may non last listening on the port: Simply put, the goal yous are trying to connect to may non conduct maintain whatsoever services listening on the port specified thus at that topographic point volition non last whatsoever response. This tin also give if a service has been stopped, for event if yous halt Apache a spider web server volition no longer respond to port fourscore requests.
  • There is another network work betwixt the source too goal of the traffic: There could last whatsoever issue of network connectivity problems betwixt the source too destination, if possible depository fiscal establishment stand upward for the network yet if the traffic is traversing the Internet yous volition last express inwards what yous tin check.

You tin depository fiscal establishment stand upward for the connectivity along the path of the traffic past times running a parcel capture amongst something similar Wireshark or tcpdump, this volition exhibit yous where the traffic is getting through to too where it's beingness stopped along the route. You could run it on the source too goal servers, every bit good every bit devices inwards betwixt that yous conduct maintain access to such every bit firewalls or routers. Follow the period of time of traffic until yous create upward one's heed where the work is.

Summary

While performing a TCP 'ping' to a goal yous tin confirm if it is responding every bit intended, though at that topographic point are a few reasons the port may non respond every bit noted. UDP tin last checked yet it's a fleck to a greater extent than hard to last for certain if you're correctly receiving a response thus the tests aren't e'er reliable, which makes feel every bit UDP is non a reliable protocol. These tests tin last useful when testing safety past times confirming if ports are opened upward or closed.


Blogger
Disqus
Pilih Sistem Komentar

No comments

Advertiser