6

I have two server with these specifications:

  1. IP address: 192.168.1.94

  2. IP address: 192.168.1.221

I want to telnet to the first one from the second one (to port 5029) but I get this error:

root@debian:~# telnet 192.168.1.94 5029
Trying 192.168.1.94...
telnet: Unable to connect to remote host: Connection refused

I can telnet from 192.168.1.94 to itself. this means that a program is listening to 5029 port:

[root@myelastix ~]# telnet localhost 5029
Trying 127.0.0.1...
Connected to myelastix.mohaymen.co (127.0.0.1).
Escape character is '^]'.

I thought may be firewall is blocking connection in 192.168.1.94 server but these are firewall rules:

[root@myelastix ~]# 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

besides I stopped iptables also but nothing happens again:

[root@myelastix ~]# service iptables stop
Flushing firewall rules:                                   [  OK  ]
Setting chains to policy ACCEPT: filter                    [  OK  ]
Unloading iptables modules:                                [  OK  ]

what is the problem?

  • I just installed telnetd on my machine (Ubuntu 12.04) to try this and I can connect from both the localhost and from my server (after ssh-ing) into it. Please update your question with the distro and distro-version info, and possible which telnet daemon you installed. – Anthon Nov 10 '14 at 9:03
6

Can you do this?

[root@myelastix ~]# telnet 192.168.1.94 5029

If not, make sure telnetd is configured to listen on an external interface.

netstat -tulpn | grep :5029
  • can't do telnet 192.168.1.94 5029 neither and the output of netstat is tcp 0 0 127.0.0.1:5029 0.0.0.0:* LISTEN 2848/voipmonitor – amir jj Nov 10 '14 at 12:55
  • There you have it. telnetd is configured to only accept connections from localhost. Check /etc/xinetd.d/telnet file and add bind = 192.168.1.94 – a21 Nov 10 '14 at 15:04

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.