Why I can't I telnet to a specific port?

the port 7778 is in listen,

netstat -tulpn
tcp 0 0 127.0.0.1:7778 0.0.0.0:* LISTEN 22776/java

but I can't telnet that port from remote machine while I can telnet other port by using this command

telnet 192.168.1.100 port_number
9

2 Answers

The address 127.0.0.1 is the loopback address.

As you have the 127.0.0.1:7788 in the "Local Address" of netstat output, this means that the connection is only listening for connections originating from this computer only on the loopback interface. No other computers on the network can reach your loopback address directly hence the telnet is failing from other computers.

1

java is listening in 127.0.0.1, that is localhost.

You can't connect from outside, unless you do some kind of forwarding, using ssh for instance.

Edit:

from external hosts,

if unix/linux

ssh -L 1234:127.0.0.1:7778 runtime
  • then from that external host, telnet 127.0.0.1 1234(ssh will forward you)

if windows, use putty or bitwise to forward local port 1234 to 7778 on host holding runtime.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like