I have two server with these specifications:

  1. IP address:

  2. IP address:

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

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

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

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

I thought may be firewall is blocking connection in 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

Can you do this?

[root@myelastix ~]# telnet 5029

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

netstat -tulpn | grep :5029
  • can't do telnet 5029 neither and the output of netstat is tcp 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 = – 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.