how to find if port is blocked by router over ssh
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
add a comment |
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
add a comment |
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
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
networking ssh router
edited Jan 4 at 18:09
InsaneBot
asked Aug 29 '14 at 13:11
InsaneBotInsaneBot
11615
11615
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
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
add a comment |
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).
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
add a comment |
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
add a comment |
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
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
answered Aug 29 '14 at 13:32
MolegrammerMolegrammer
413
413
add a comment |
add a comment |
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).
add a comment |
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).
add a comment |
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).
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).
answered Aug 29 '14 at 13:36
max890max890
25115
25115
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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