How to ping a specific port Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)how to ping & use specific network cardHow to show failed ping?Why ping -f command needs sudo privileges?Set wildcard mask for pingCan't ping most urlsBoot randomly leaves eth1 unable to send but can receiveHow to ping the Internet on Ubuntu?can ping but cannot browseChange the size of a pingHow can I ping from specific network card on Ubuntu v16.04 LTS?

What's the point in a preamp?

How can I protect witches in combat who wear limited clothing?

How to pour concrete for curved walkway to prevent cracking?

Why don't the Weasley twins use magic outside of school if the Trace can only find the location of spells cast?

When communicating altitude with a '9' in it, should it be pronounced "nine hundred" or "niner hundred"?

Single author papers against my advisor's will?

Are my PIs rude or am I just being too sensitive?

What would be Julian Assange's expected punishment, on the current English criminal law?

Can a monk deflect thrown melee weapons?

How are presidential pardons supposed to be used?

Array/tabular for long multiplication

Determine whether f is a function, an injection, a surjection

Writing Thesis: Copying from published papers

What kind of display is this?

Does a C shift expression have unsigned type? Why would Splint warn about a right-shift?

I'm thinking of a number

Using "nakedly" instead of "with nothing on"

How to add zeros to reach same number of decimal places in tables?

Need a suitable toxic chemical for a murder plot in my novel

Slither Like a Snake

How does modal jazz use chord progressions?

Can't figure this one out.. What is the missing box?

Is it possible to ask for a hotel room without minibar/extra services?

Antler Helmet: Can it work?



How to ping a specific port



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)how to ping & use specific network cardHow to show failed ping?Why ping -f command needs sudo privileges?Set wildcard mask for pingCan't ping most urlsBoot randomly leaves eth1 unable to send but can receiveHow to ping the Internet on Ubuntu?can ping but cannot browseChange the size of a pingHow can I ping from specific network card on Ubuntu v16.04 LTS?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








4















I often use the ping command to check if a website is available or not, or if I can access a machine, so basically mostly for diagnostics, and what would be really useful is if I could specify which port(s) those ICMP echoes go to, is there any way of doing this with ping, or another tool which would allow for me to easily do this without having to generate packets manually?



An option for instance would be to create a custom ICMP packet set to go to a specific port, and then I could use bittwist to send it, and Wireshark to monitor if I am getting anything in return, but this seems a bit of a hassle to do every time, so I was wondering if there is an easier route?










share|improve this question

















  • 3





    There is no concept of "port" in ICMP. If you want to reach a TCP or UDP port, use netcat.

    – Jos
    Jun 24 '15 at 12:30











  • you can try with TCPPing or smokeping tools...

    – Geo Hurling
    Feb 16 '18 at 13:03

















4















I often use the ping command to check if a website is available or not, or if I can access a machine, so basically mostly for diagnostics, and what would be really useful is if I could specify which port(s) those ICMP echoes go to, is there any way of doing this with ping, or another tool which would allow for me to easily do this without having to generate packets manually?



An option for instance would be to create a custom ICMP packet set to go to a specific port, and then I could use bittwist to send it, and Wireshark to monitor if I am getting anything in return, but this seems a bit of a hassle to do every time, so I was wondering if there is an easier route?










share|improve this question

















  • 3





    There is no concept of "port" in ICMP. If you want to reach a TCP or UDP port, use netcat.

    – Jos
    Jun 24 '15 at 12:30











  • you can try with TCPPing or smokeping tools...

    – Geo Hurling
    Feb 16 '18 at 13:03













4












4








4


2






I often use the ping command to check if a website is available or not, or if I can access a machine, so basically mostly for diagnostics, and what would be really useful is if I could specify which port(s) those ICMP echoes go to, is there any way of doing this with ping, or another tool which would allow for me to easily do this without having to generate packets manually?



An option for instance would be to create a custom ICMP packet set to go to a specific port, and then I could use bittwist to send it, and Wireshark to monitor if I am getting anything in return, but this seems a bit of a hassle to do every time, so I was wondering if there is an easier route?










share|improve this question














I often use the ping command to check if a website is available or not, or if I can access a machine, so basically mostly for diagnostics, and what would be really useful is if I could specify which port(s) those ICMP echoes go to, is there any way of doing this with ping, or another tool which would allow for me to easily do this without having to generate packets manually?



An option for instance would be to create a custom ICMP packet set to go to a specific port, and then I could use bittwist to send it, and Wireshark to monitor if I am getting anything in return, but this seems a bit of a hassle to do every time, so I was wondering if there is an easier route?







networking software-recommendation ping diagnostic packet-analyzer






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jun 24 '15 at 12:28







user364819














  • 3





    There is no concept of "port" in ICMP. If you want to reach a TCP or UDP port, use netcat.

    – Jos
    Jun 24 '15 at 12:30











  • you can try with TCPPing or smokeping tools...

    – Geo Hurling
    Feb 16 '18 at 13:03












  • 3





    There is no concept of "port" in ICMP. If you want to reach a TCP or UDP port, use netcat.

    – Jos
    Jun 24 '15 at 12:30











  • you can try with TCPPing or smokeping tools...

    – Geo Hurling
    Feb 16 '18 at 13:03







3




3





There is no concept of "port" in ICMP. If you want to reach a TCP or UDP port, use netcat.

– Jos
Jun 24 '15 at 12:30





There is no concept of "port" in ICMP. If you want to reach a TCP or UDP port, use netcat.

– Jos
Jun 24 '15 at 12:30













you can try with TCPPing or smokeping tools...

– Geo Hurling
Feb 16 '18 at 13:03





you can try with TCPPing or smokeping tools...

– Geo Hurling
Feb 16 '18 at 13:03










2 Answers
2






active

oldest

votes


















6














IIRC you cannot send a "ping" packet to a specific port.



On a port, there is a "software" listening. This software will implement it's own protocol - HTTP, SMTP, FTP, or even some own protocol.



Those servers won't respond to an ICMP packet. ICMP packets need to be sent to the ICMP port.



However, you may just try to open a TCP connection (telnet host 12345) and see if the connection is successfully.






share|improve this answer






























    0














    Here is an example of how to ping a specific IP-port on your network:



    1. Download and install nMap.

    2. Run ifconfig -a to identify your network topology; the terminal output should display the host IP-address traced to your command-line, displayed after "inet" (e.g. inet: 10.0.0.2).

    3. Now open the nMap tool to scan your network by running nmap -sP network-ip-address topology/24 (e.g. nmap -sP 10.0.0.1/24); that should display all hosts connected to the network.

    4. Locate the host IP-address of the port you wish to ping; for example, if your network is hosting a VPN server on a router at IP address 10.0.0.233. First, try to ping the address by running nmap -sn host-ip-address (eg nmap -sn 10.0.0.233)- the terminal output should return a report that the server is either up or down.

    5. However, sometimes a host may only be visible or identifiable if you ping a specific port by running nmap -Pn port-number ip-address; for example, the subject router may only be traceable if we ping a specific port on the router- in this case UDP port 1143 for OpenVPN (e.g. nmap -Pn 1143 10.0.0.233). The aforementioned command should confirm that the port is open within the terminal output, even if the host is ostensibly down according to the initial run of the nmap port-scan.

    Hope that helps- it helped me!






    share|improve this answer

























      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "89"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f640379%2fhow-to-ping-a-specific-port%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown
























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      6














      IIRC you cannot send a "ping" packet to a specific port.



      On a port, there is a "software" listening. This software will implement it's own protocol - HTTP, SMTP, FTP, or even some own protocol.



      Those servers won't respond to an ICMP packet. ICMP packets need to be sent to the ICMP port.



      However, you may just try to open a TCP connection (telnet host 12345) and see if the connection is successfully.






      share|improve this answer



























        6














        IIRC you cannot send a "ping" packet to a specific port.



        On a port, there is a "software" listening. This software will implement it's own protocol - HTTP, SMTP, FTP, or even some own protocol.



        Those servers won't respond to an ICMP packet. ICMP packets need to be sent to the ICMP port.



        However, you may just try to open a TCP connection (telnet host 12345) and see if the connection is successfully.






        share|improve this answer

























          6












          6








          6







          IIRC you cannot send a "ping" packet to a specific port.



          On a port, there is a "software" listening. This software will implement it's own protocol - HTTP, SMTP, FTP, or even some own protocol.



          Those servers won't respond to an ICMP packet. ICMP packets need to be sent to the ICMP port.



          However, you may just try to open a TCP connection (telnet host 12345) and see if the connection is successfully.






          share|improve this answer













          IIRC you cannot send a "ping" packet to a specific port.



          On a port, there is a "software" listening. This software will implement it's own protocol - HTTP, SMTP, FTP, or even some own protocol.



          Those servers won't respond to an ICMP packet. ICMP packets need to be sent to the ICMP port.



          However, you may just try to open a TCP connection (telnet host 12345) and see if the connection is successfully.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jun 24 '15 at 12:31









          Florian BachFlorian Bach

          839




          839























              0














              Here is an example of how to ping a specific IP-port on your network:



              1. Download and install nMap.

              2. Run ifconfig -a to identify your network topology; the terminal output should display the host IP-address traced to your command-line, displayed after "inet" (e.g. inet: 10.0.0.2).

              3. Now open the nMap tool to scan your network by running nmap -sP network-ip-address topology/24 (e.g. nmap -sP 10.0.0.1/24); that should display all hosts connected to the network.

              4. Locate the host IP-address of the port you wish to ping; for example, if your network is hosting a VPN server on a router at IP address 10.0.0.233. First, try to ping the address by running nmap -sn host-ip-address (eg nmap -sn 10.0.0.233)- the terminal output should return a report that the server is either up or down.

              5. However, sometimes a host may only be visible or identifiable if you ping a specific port by running nmap -Pn port-number ip-address; for example, the subject router may only be traceable if we ping a specific port on the router- in this case UDP port 1143 for OpenVPN (e.g. nmap -Pn 1143 10.0.0.233). The aforementioned command should confirm that the port is open within the terminal output, even if the host is ostensibly down according to the initial run of the nmap port-scan.

              Hope that helps- it helped me!






              share|improve this answer





























                0














                Here is an example of how to ping a specific IP-port on your network:



                1. Download and install nMap.

                2. Run ifconfig -a to identify your network topology; the terminal output should display the host IP-address traced to your command-line, displayed after "inet" (e.g. inet: 10.0.0.2).

                3. Now open the nMap tool to scan your network by running nmap -sP network-ip-address topology/24 (e.g. nmap -sP 10.0.0.1/24); that should display all hosts connected to the network.

                4. Locate the host IP-address of the port you wish to ping; for example, if your network is hosting a VPN server on a router at IP address 10.0.0.233. First, try to ping the address by running nmap -sn host-ip-address (eg nmap -sn 10.0.0.233)- the terminal output should return a report that the server is either up or down.

                5. However, sometimes a host may only be visible or identifiable if you ping a specific port by running nmap -Pn port-number ip-address; for example, the subject router may only be traceable if we ping a specific port on the router- in this case UDP port 1143 for OpenVPN (e.g. nmap -Pn 1143 10.0.0.233). The aforementioned command should confirm that the port is open within the terminal output, even if the host is ostensibly down according to the initial run of the nmap port-scan.

                Hope that helps- it helped me!






                share|improve this answer



























                  0












                  0








                  0







                  Here is an example of how to ping a specific IP-port on your network:



                  1. Download and install nMap.

                  2. Run ifconfig -a to identify your network topology; the terminal output should display the host IP-address traced to your command-line, displayed after "inet" (e.g. inet: 10.0.0.2).

                  3. Now open the nMap tool to scan your network by running nmap -sP network-ip-address topology/24 (e.g. nmap -sP 10.0.0.1/24); that should display all hosts connected to the network.

                  4. Locate the host IP-address of the port you wish to ping; for example, if your network is hosting a VPN server on a router at IP address 10.0.0.233. First, try to ping the address by running nmap -sn host-ip-address (eg nmap -sn 10.0.0.233)- the terminal output should return a report that the server is either up or down.

                  5. However, sometimes a host may only be visible or identifiable if you ping a specific port by running nmap -Pn port-number ip-address; for example, the subject router may only be traceable if we ping a specific port on the router- in this case UDP port 1143 for OpenVPN (e.g. nmap -Pn 1143 10.0.0.233). The aforementioned command should confirm that the port is open within the terminal output, even if the host is ostensibly down according to the initial run of the nmap port-scan.

                  Hope that helps- it helped me!






                  share|improve this answer















                  Here is an example of how to ping a specific IP-port on your network:



                  1. Download and install nMap.

                  2. Run ifconfig -a to identify your network topology; the terminal output should display the host IP-address traced to your command-line, displayed after "inet" (e.g. inet: 10.0.0.2).

                  3. Now open the nMap tool to scan your network by running nmap -sP network-ip-address topology/24 (e.g. nmap -sP 10.0.0.1/24); that should display all hosts connected to the network.

                  4. Locate the host IP-address of the port you wish to ping; for example, if your network is hosting a VPN server on a router at IP address 10.0.0.233. First, try to ping the address by running nmap -sn host-ip-address (eg nmap -sn 10.0.0.233)- the terminal output should return a report that the server is either up or down.

                  5. However, sometimes a host may only be visible or identifiable if you ping a specific port by running nmap -Pn port-number ip-address; for example, the subject router may only be traceable if we ping a specific port on the router- in this case UDP port 1143 for OpenVPN (e.g. nmap -Pn 1143 10.0.0.233). The aforementioned command should confirm that the port is open within the terminal output, even if the host is ostensibly down according to the initial run of the nmap port-scan.

                  Hope that helps- it helped me!







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Apr 11 at 15:03

























                  answered Apr 11 at 13:17









                  alexanderjsingletonalexanderjsingleton

                  1115




                  1115



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f640379%2fhow-to-ping-a-specific-port%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Tamil (spriik) Luke uk diar | Nawigatjuun

                      Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

                      Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?