ufw allowed port 9999 but connection refusedUnable to ssh out from my laptopTrying to SSH to local VM Ubuntu...
Swapping rooks in a 4x4 board
Counting occurrence of words in table is slow
Impossible darts scores
What is the line crossing the Pacific Ocean that is shown on maps?
Short story with brother-sister conjoined twins as protagonists?
The impact of an intelligent and (mostly) hostile flying race on weapons and armor
Layout of complex table
How can I convince my reader that I will not use a certain trope?
C-152 carb heat on before landing in hot weather?
Is adding a new player (or players) a DM decision, or a group decision?
Calculating the partial sum of a expl3 sequence
Find smallest index that is identical to the value in an array
What determines the "strength of impact" of a falling object on the ground, momentum or energy?
How can Charles Proxy change settings without admin rights after first time?
Is there a maximum distance from a planet that a moon can orbit?
Content builder HTTPS
Why aren't (poly-)cotton tents more popular?
Going to get married soon, should I do it on Dec 31 or Jan 1?
How many satellites can stay in a Lagrange point?
Inverse-quotes-quine
Why do some games show lights shine through walls?
Should I include salary information on my CV?
Is my Rep in Stack-Exchange Form?
How to determine what is the correct level of detail when modelling?
ufw allowed port 9999 but connection refused
Unable to ssh out from my laptopTrying to SSH to local VM Ubuntu with Puttytelnet connection closesSSH into VirtualBox on MacHow can I reach an open & listening port on Linux?VNC Client - Server, Unable to connect to remote serverTesting remote host connectivity using telnetService is Listening on port, no firewall enabled, but port shows closed when attempting to connect externallySSH cannot connect to qemu ARM emulatorHow to connect to a IPv6 service using IPv4 connection on CentOS 7?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
port is allowed however connection is refued?
# sudo ufw allow 9999/tcp
Rule added
Rule added (v6)
When I check status
# sudo ufw status
9999/tcp ALLOW Anywhere
9999/tcp (v6) ALLOW Anywhere (v6)
Everything seems fine but connection is yet refused. I tried to telnet from local machine
# telnet 127.0.0.1 9999
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
as well as from external machine (actual ip redacted)
# telnet 1.1.1.1 9999
Trying 1.1.1.1...
telnet: Unable to connect to remote host: Connection refused
While other ports connections can be established but this newly added port isn't working. What could be the reason?
PS. server OS is Ubuntu 16.04
linux ubuntu tcp
bumped to the homepage by Community♦ 1 hour ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
port is allowed however connection is refued?
# sudo ufw allow 9999/tcp
Rule added
Rule added (v6)
When I check status
# sudo ufw status
9999/tcp ALLOW Anywhere
9999/tcp (v6) ALLOW Anywhere (v6)
Everything seems fine but connection is yet refused. I tried to telnet from local machine
# telnet 127.0.0.1 9999
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
as well as from external machine (actual ip redacted)
# telnet 1.1.1.1 9999
Trying 1.1.1.1...
telnet: Unable to connect to remote host: Connection refused
While other ports connections can be established but this newly added port isn't working. What could be the reason?
PS. server OS is Ubuntu 16.04
linux ubuntu tcp
bumped to the homepage by Community♦ 1 hour ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
1
Do you have some process listening on port 9999?
– Andy Dalton
Mar 9 '18 at 2:30
when I run this: sudo netstat -tulpn | grep LISTEN, I don't see 9999 anywhere so it's not listening by any process
– GoodtheBest
Mar 9 '18 at 2:34
@GoodtheBest There you go. You need to listen on this port.
– Tomasz
Mar 9 '18 at 2:36
how do I do that? I opened port and tried to telnet as you can see above, connection is refused
– GoodtheBest
Mar 9 '18 at 2:37
add a comment |
port is allowed however connection is refued?
# sudo ufw allow 9999/tcp
Rule added
Rule added (v6)
When I check status
# sudo ufw status
9999/tcp ALLOW Anywhere
9999/tcp (v6) ALLOW Anywhere (v6)
Everything seems fine but connection is yet refused. I tried to telnet from local machine
# telnet 127.0.0.1 9999
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
as well as from external machine (actual ip redacted)
# telnet 1.1.1.1 9999
Trying 1.1.1.1...
telnet: Unable to connect to remote host: Connection refused
While other ports connections can be established but this newly added port isn't working. What could be the reason?
PS. server OS is Ubuntu 16.04
linux ubuntu tcp
port is allowed however connection is refued?
# sudo ufw allow 9999/tcp
Rule added
Rule added (v6)
When I check status
# sudo ufw status
9999/tcp ALLOW Anywhere
9999/tcp (v6) ALLOW Anywhere (v6)
Everything seems fine but connection is yet refused. I tried to telnet from local machine
# telnet 127.0.0.1 9999
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
as well as from external machine (actual ip redacted)
# telnet 1.1.1.1 9999
Trying 1.1.1.1...
telnet: Unable to connect to remote host: Connection refused
While other ports connections can be established but this newly added port isn't working. What could be the reason?
PS. server OS is Ubuntu 16.04
linux ubuntu tcp
linux ubuntu tcp
edited Mar 9 '18 at 2:26
GoodtheBest
asked Mar 9 '18 at 2:21
GoodtheBestGoodtheBest
63 bronze badges
63 bronze badges
bumped to the homepage by Community♦ 1 hour ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 1 hour ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
1
Do you have some process listening on port 9999?
– Andy Dalton
Mar 9 '18 at 2:30
when I run this: sudo netstat -tulpn | grep LISTEN, I don't see 9999 anywhere so it's not listening by any process
– GoodtheBest
Mar 9 '18 at 2:34
@GoodtheBest There you go. You need to listen on this port.
– Tomasz
Mar 9 '18 at 2:36
how do I do that? I opened port and tried to telnet as you can see above, connection is refused
– GoodtheBest
Mar 9 '18 at 2:37
add a comment |
1
Do you have some process listening on port 9999?
– Andy Dalton
Mar 9 '18 at 2:30
when I run this: sudo netstat -tulpn | grep LISTEN, I don't see 9999 anywhere so it's not listening by any process
– GoodtheBest
Mar 9 '18 at 2:34
@GoodtheBest There you go. You need to listen on this port.
– Tomasz
Mar 9 '18 at 2:36
how do I do that? I opened port and tried to telnet as you can see above, connection is refused
– GoodtheBest
Mar 9 '18 at 2:37
1
1
Do you have some process listening on port 9999?
– Andy Dalton
Mar 9 '18 at 2:30
Do you have some process listening on port 9999?
– Andy Dalton
Mar 9 '18 at 2:30
when I run this: sudo netstat -tulpn | grep LISTEN, I don't see 9999 anywhere so it's not listening by any process
– GoodtheBest
Mar 9 '18 at 2:34
when I run this: sudo netstat -tulpn | grep LISTEN, I don't see 9999 anywhere so it's not listening by any process
– GoodtheBest
Mar 9 '18 at 2:34
@GoodtheBest There you go. You need to listen on this port.
– Tomasz
Mar 9 '18 at 2:36
@GoodtheBest There you go. You need to listen on this port.
– Tomasz
Mar 9 '18 at 2:36
how do I do that? I opened port and tried to telnet as you can see above, connection is refused
– GoodtheBest
Mar 9 '18 at 2:37
how do I do that? I opened port and tried to telnet as you can see above, connection is refused
– GoodtheBest
Mar 9 '18 at 2:37
add a comment |
2 Answers
2
active
oldest
votes
You need to listen on that port in order to be able to connect to it. For simple testing, you can use nc
or netcat
:
nc -l -p 9999
Now nc
is listening on port 9999
and you can telnet
to this port from another terminal (or machine):
$ telnet localhost 9999
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Once you connect, you can type in one terminal and after pressing Enter, the text should show up in the other terminal.
add a comment |
Let's ignore firewalls for a moment. When a client process tries to create a TCP connection to a host, that host needs to have some server process running on it that is "listening" for incoming connections on that port. If the port is not "open", meaning that no process is listening on the port, when the client process tries to connect, the kernel of the host will send back a response to indicate that there is no process listening on the port. When you see Connection refused
on the client, that's what that means.
Enter the firewall. If a host has a firewall is place, the firewall can block network traffic going out of or coming into the host. It would then be possible that a client process tries to connect to a server process on a given port, and the connection be rejected by the firewall even if there was a server process listening on that port. That, however, is not the problem you're encountering.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2funix.stackexchange.com%2fquestions%2f429150%2fufw-allowed-port-9999-but-connection-refused%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 need to listen on that port in order to be able to connect to it. For simple testing, you can use nc
or netcat
:
nc -l -p 9999
Now nc
is listening on port 9999
and you can telnet
to this port from another terminal (or machine):
$ telnet localhost 9999
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Once you connect, you can type in one terminal and after pressing Enter, the text should show up in the other terminal.
add a comment |
You need to listen on that port in order to be able to connect to it. For simple testing, you can use nc
or netcat
:
nc -l -p 9999
Now nc
is listening on port 9999
and you can telnet
to this port from another terminal (or machine):
$ telnet localhost 9999
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Once you connect, you can type in one terminal and after pressing Enter, the text should show up in the other terminal.
add a comment |
You need to listen on that port in order to be able to connect to it. For simple testing, you can use nc
or netcat
:
nc -l -p 9999
Now nc
is listening on port 9999
and you can telnet
to this port from another terminal (or machine):
$ telnet localhost 9999
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Once you connect, you can type in one terminal and after pressing Enter, the text should show up in the other terminal.
You need to listen on that port in order to be able to connect to it. For simple testing, you can use nc
or netcat
:
nc -l -p 9999
Now nc
is listening on port 9999
and you can telnet
to this port from another terminal (or machine):
$ telnet localhost 9999
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Once you connect, you can type in one terminal and after pressing Enter, the text should show up in the other terminal.
edited Mar 9 '18 at 3:02
answered Mar 9 '18 at 2:57
TomaszTomasz
10.9k7 gold badges35 silver badges73 bronze badges
10.9k7 gold badges35 silver badges73 bronze badges
add a comment |
add a comment |
Let's ignore firewalls for a moment. When a client process tries to create a TCP connection to a host, that host needs to have some server process running on it that is "listening" for incoming connections on that port. If the port is not "open", meaning that no process is listening on the port, when the client process tries to connect, the kernel of the host will send back a response to indicate that there is no process listening on the port. When you see Connection refused
on the client, that's what that means.
Enter the firewall. If a host has a firewall is place, the firewall can block network traffic going out of or coming into the host. It would then be possible that a client process tries to connect to a server process on a given port, and the connection be rejected by the firewall even if there was a server process listening on that port. That, however, is not the problem you're encountering.
add a comment |
Let's ignore firewalls for a moment. When a client process tries to create a TCP connection to a host, that host needs to have some server process running on it that is "listening" for incoming connections on that port. If the port is not "open", meaning that no process is listening on the port, when the client process tries to connect, the kernel of the host will send back a response to indicate that there is no process listening on the port. When you see Connection refused
on the client, that's what that means.
Enter the firewall. If a host has a firewall is place, the firewall can block network traffic going out of or coming into the host. It would then be possible that a client process tries to connect to a server process on a given port, and the connection be rejected by the firewall even if there was a server process listening on that port. That, however, is not the problem you're encountering.
add a comment |
Let's ignore firewalls for a moment. When a client process tries to create a TCP connection to a host, that host needs to have some server process running on it that is "listening" for incoming connections on that port. If the port is not "open", meaning that no process is listening on the port, when the client process tries to connect, the kernel of the host will send back a response to indicate that there is no process listening on the port. When you see Connection refused
on the client, that's what that means.
Enter the firewall. If a host has a firewall is place, the firewall can block network traffic going out of or coming into the host. It would then be possible that a client process tries to connect to a server process on a given port, and the connection be rejected by the firewall even if there was a server process listening on that port. That, however, is not the problem you're encountering.
Let's ignore firewalls for a moment. When a client process tries to create a TCP connection to a host, that host needs to have some server process running on it that is "listening" for incoming connections on that port. If the port is not "open", meaning that no process is listening on the port, when the client process tries to connect, the kernel of the host will send back a response to indicate that there is no process listening on the port. When you see Connection refused
on the client, that's what that means.
Enter the firewall. If a host has a firewall is place, the firewall can block network traffic going out of or coming into the host. It would then be possible that a client process tries to connect to a server process on a given port, and the connection be rejected by the firewall even if there was a server process listening on that port. That, however, is not the problem you're encountering.
answered Mar 9 '18 at 18:27
Andy DaltonAndy Dalton
5,4371 gold badge8 silver badges24 bronze badges
5,4371 gold badge8 silver badges24 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f429150%2fufw-allowed-port-9999-but-connection-refused%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
1
Do you have some process listening on port 9999?
– Andy Dalton
Mar 9 '18 at 2:30
when I run this: sudo netstat -tulpn | grep LISTEN, I don't see 9999 anywhere so it's not listening by any process
– GoodtheBest
Mar 9 '18 at 2:34
@GoodtheBest There you go. You need to listen on this port.
– Tomasz
Mar 9 '18 at 2:36
how do I do that? I opened port and tried to telnet as you can see above, connection is refused
– GoodtheBest
Mar 9 '18 at 2:37