Why is the following not working?
I have a freshly installed Debian 9 system. iptables
is wide-open:
[···]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
I log in on two separate consoles (well, two separate ssh logins). In one of them, I run:
[···]# nc -l 11115
Then, I go to the other console, and run:
[···]# nc localhost 11115
and I get a Connection refused error:
[···]# nc localhost 11115
localhost [127.0.0.1] 11115 (?) : Connection refused
I also tried nc 127.0.0.1 11115
, tried with telnet
--- always Connection refused.
On the "listening" side, I also tried nc -l localhost 11115
--- no difference.
What am I missing or doing wrong?
[EDIT]: On a CentOS 6.9 machine, the exact same commands above work as expected. Same thing on my Ubuntu 14.04 at home. I thought it may be that running as root makes nc
disallow some functionality. But no, I just tried as a regular user on the Debian 9 machine, and it fails all the same. Any ideas why?