how to find if port is blocked by router over ssh












0














I have several servers deployed behind consumer grade NAT (home routers). My client connects periodically to these servers on port 3000, I have a hole punched in the firewall for port 3000 and port 22 for ssh debugging.



Occasionally the client can't connect to one or more server. How can I debug this situation?. I want to be able to tell if the failure was caused by the firewall blocking my client or if it was a bug in the server/client code.










share|improve this question





























    0














    I have several servers deployed behind consumer grade NAT (home routers). My client connects periodically to these servers on port 3000, I have a hole punched in the firewall for port 3000 and port 22 for ssh debugging.



    Occasionally the client can't connect to one or more server. How can I debug this situation?. I want to be able to tell if the failure was caused by the firewall blocking my client or if it was a bug in the server/client code.










    share|improve this question



























      0












      0








      0







      I have several servers deployed behind consumer grade NAT (home routers). My client connects periodically to these servers on port 3000, I have a hole punched in the firewall for port 3000 and port 22 for ssh debugging.



      Occasionally the client can't connect to one or more server. How can I debug this situation?. I want to be able to tell if the failure was caused by the firewall blocking my client or if it was a bug in the server/client code.










      share|improve this question















      I have several servers deployed behind consumer grade NAT (home routers). My client connects periodically to these servers on port 3000, I have a hole punched in the firewall for port 3000 and port 22 for ssh debugging.



      Occasionally the client can't connect to one or more server. How can I debug this situation?. I want to be able to tell if the failure was caused by the firewall blocking my client or if it was a bug in the server/client code.







      networking ssh router






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 2 days ago

























      asked Aug 29 '14 at 13:11









      InsaneBot

      11615




      11615






















          2 Answers
          2






          active

          oldest

          votes


















          2














          You should use netcat, it is a Linux command line utility that will allow to create a server or client on the fly on the remote machine and create the corresponding server or client on your machine, then you send messages from one end and if it is received on the other end then the port is open.
          https://www.digitalocean.com/community/tutorials/how-to-use-netcat-to-establish-and-test-tcp-and-udp-connections-on-a-vps






          share|improve this answer





























            0














            Not sure to really understand your situation.



            But three things are on my mind.



            First, if all your computers are behind a router on the same network, nothing will be blocked (router block ports from outside, not inside).



            Second, if you can SSH and your application is using the port 3333, maybe your SSH server is not listening to the port 3333. SSH use the port 22 by default, if you want to use the port 3333 for ssh you need to configure all your machines to use that port instead of 22.



            Finaly, maybe your firewall is simply blocking the port, look for iptables documentation to open that port (which is the firewall used by many distributions).






            share|improve this answer





















              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              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%2fsuperuser.com%2fquestions%2f804676%2fhow-to-find-if-port-is-blocked-by-router-over-ssh%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









              2














              You should use netcat, it is a Linux command line utility that will allow to create a server or client on the fly on the remote machine and create the corresponding server or client on your machine, then you send messages from one end and if it is received on the other end then the port is open.
              https://www.digitalocean.com/community/tutorials/how-to-use-netcat-to-establish-and-test-tcp-and-udp-connections-on-a-vps






              share|improve this answer


























                2














                You should use netcat, it is a Linux command line utility that will allow to create a server or client on the fly on the remote machine and create the corresponding server or client on your machine, then you send messages from one end and if it is received on the other end then the port is open.
                https://www.digitalocean.com/community/tutorials/how-to-use-netcat-to-establish-and-test-tcp-and-udp-connections-on-a-vps






                share|improve this answer
























                  2












                  2








                  2






                  You should use netcat, it is a Linux command line utility that will allow to create a server or client on the fly on the remote machine and create the corresponding server or client on your machine, then you send messages from one end and if it is received on the other end then the port is open.
                  https://www.digitalocean.com/community/tutorials/how-to-use-netcat-to-establish-and-test-tcp-and-udp-connections-on-a-vps






                  share|improve this answer












                  You should use netcat, it is a Linux command line utility that will allow to create a server or client on the fly on the remote machine and create the corresponding server or client on your machine, then you send messages from one end and if it is received on the other end then the port is open.
                  https://www.digitalocean.com/community/tutorials/how-to-use-netcat-to-establish-and-test-tcp-and-udp-connections-on-a-vps







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Aug 29 '14 at 13:32









                  Molegrammer

                  413




                  413

























                      0














                      Not sure to really understand your situation.



                      But three things are on my mind.



                      First, if all your computers are behind a router on the same network, nothing will be blocked (router block ports from outside, not inside).



                      Second, if you can SSH and your application is using the port 3333, maybe your SSH server is not listening to the port 3333. SSH use the port 22 by default, if you want to use the port 3333 for ssh you need to configure all your machines to use that port instead of 22.



                      Finaly, maybe your firewall is simply blocking the port, look for iptables documentation to open that port (which is the firewall used by many distributions).






                      share|improve this answer


























                        0














                        Not sure to really understand your situation.



                        But three things are on my mind.



                        First, if all your computers are behind a router on the same network, nothing will be blocked (router block ports from outside, not inside).



                        Second, if you can SSH and your application is using the port 3333, maybe your SSH server is not listening to the port 3333. SSH use the port 22 by default, if you want to use the port 3333 for ssh you need to configure all your machines to use that port instead of 22.



                        Finaly, maybe your firewall is simply blocking the port, look for iptables documentation to open that port (which is the firewall used by many distributions).






                        share|improve this answer
























                          0












                          0








                          0






                          Not sure to really understand your situation.



                          But three things are on my mind.



                          First, if all your computers are behind a router on the same network, nothing will be blocked (router block ports from outside, not inside).



                          Second, if you can SSH and your application is using the port 3333, maybe your SSH server is not listening to the port 3333. SSH use the port 22 by default, if you want to use the port 3333 for ssh you need to configure all your machines to use that port instead of 22.



                          Finaly, maybe your firewall is simply blocking the port, look for iptables documentation to open that port (which is the firewall used by many distributions).






                          share|improve this answer












                          Not sure to really understand your situation.



                          But three things are on my mind.



                          First, if all your computers are behind a router on the same network, nothing will be blocked (router block ports from outside, not inside).



                          Second, if you can SSH and your application is using the port 3333, maybe your SSH server is not listening to the port 3333. SSH use the port 22 by default, if you want to use the port 3333 for ssh you need to configure all your machines to use that port instead of 22.



                          Finaly, maybe your firewall is simply blocking the port, look for iptables documentation to open that port (which is the firewall used by many distributions).







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Aug 29 '14 at 13:36









                          max890

                          25115




                          25115






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Super User!


                              • 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.





                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                              Please pay close attention to the following guidance:


                              • 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%2fsuperuser.com%2fquestions%2f804676%2fhow-to-find-if-port-is-blocked-by-router-over-ssh%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

                              How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

                              is 'sed' thread safe

                              How to make a Squid Proxy server?