7

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?

1
  • 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. Commented Nov 10, 2014 at 9:03

1 Answer 1

7

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 
2
  • 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 Commented Nov 10, 2014 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 Commented Nov 10, 2014 at 15:04

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.