System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot telnet to a port from another server

 
Yaboto
Super Advisor

Cannot telnet to a port from another server

I have installed an application that automatically assign, configure and use the ports 9500, 9501 and 9502.
Locally to the server I could enter the command and the reply would be successfull:
#telnet 172.25.6.13 9500
#telnet 172.25.6.13 9501
#telnet 172.25.6.13 9502

But when I enter those commands from another server, It doesn't work, even though I could successfully do simple telnet from any other server.

Please help !

15 REPLIES
Steven Schweda
Honored Contributor

Re: Cannot telnet to a port from another server

> I have installed an application [...]

Which "an application" is this?

> [...] the server [...]

Which kind of "the server" is this?

> [...] It doesn't work [...]

Which kind of "It doesn't work" is this?

As usual, showing actual commands with their
actual output can be more helpful than vague
descriptions and interpretations.

> [...] from another server [...]

How many firewalls are involved here?
Yaboto
Super Advisor

Re: Cannot telnet to a port from another server

Sorry, you are perfectly right. This was because I was working on a lot of things at a the same time.

The servers were all RHEL5 ( Red Hat Enterprise Linux version 5 )

There is no firewall involved.
John Guster
Trusted Contributor

Re: Cannot telnet to a port from another server

is the telnet service enabled on the server?
Steven E. Protter
Exalted Contributor

Re: Cannot telnet to a port from another server

Shalom,

In the server see if any app is actually listening on those ports.

netstat -an | grep 9500

repeat for other ports.

If something is listening, proceed to check network connectivity. If not, check and see about that application. It is is either not running or not running as you expect it to run.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Yaboto
Super Advisor

Re: Cannot telnet to a port from another server

Thanks for your replies.

The telnet service is running.

Here is the output of netstat:

[root@rcbbkup ~]# netstat -an | grep 9500
tcp 0 0 :::9500 :::* LISTEN

[root@rcbbkup ~]# netstat -an | grep 9501
tcp 0 0 :::9501 :::* LISTEN

[root@rcbbkup ~]# netstat -an | grep 9502
tcp 0 0 :::9502 :::* LISTEN

[root@rcbbkup ~]# netstat -an | grep 9503
tcp 0 0 :::9503 :::* LISTEN

[root@rcbbkup ~]# netstat -an | grep 9505
tcp 0 0 :::9505 :::* LISTEN

tcp 2 0 ::ffff:10.7.2.108:9505 ::ffff:10.7.2.108:17569 CLOSE_WA
IT


Please help me interpret the output and Advice .


Steven Schweda
Honored Contributor

Re: Cannot telnet to a port from another server

> tcp 0 0 :::9500 :::* LISTEN
> [...]

Ok. Someone is listening at that (and the
other) ports. (Which was evident from the
fact that you could use Telnet to connect to
these ports from the local system.)

> > [...] It doesn't work [...]
>
> Which kind of "It doesn't work" is this?

Still wondering...

> [...] I could successfully do simple telnet
> from any other server.

> There is no firewall involved.

Those two statements seem to disagree.
Tim Nelson
Honored Contributor

Re: Cannot telnet to a port from another server

service iptables stop

try again

If it works then you need to either turn off the iptables or edit to include these port rules.

1 - this is all assuming that you have network connectivity from serverA to serverB

2 - this assumes that you can connect to these ports locally

3 - this assumes that you should not expect any input/output from these ports when using telnet ( simply a connection that would mostlikely just sit there returning nothing ).

done assuming ;)



Yaboto
Super Advisor

Re: Cannot telnet to a port from another server

Thanks very much for your replies !

The banking application is installed on server A. The application is working perfectly and locally to server A, I could TELNET to those ports mentioned above.

From the remote server B, I could TELNET server A, BUT from server B, I could not TELNET server A at the PORTS mentioned above.

There is no firewall between server A and server B, except that server A may be having in-built firewall or security features I don't know. The OS is RHEL5 Red Hat Enterprise Linux 5.

Please what are the settings I should check. I am very new to Linux.

Please Advice.
John Guster
Trusted Contributor

Re: Cannot telnet to a port from another server

what is the telnet entry in /etc/services?
Tim Nelson
Honored Contributor

Re: Cannot telnet to a port from another server

service iptables status

to check the status of the personal firewall on the server


service iptables stop

stop the firewall if it is running..

John Guster
Trusted Contributor

Re: Cannot telnet to a port from another server

what is th eoutput of iptable -L?
Steven Schweda
Honored Contributor

Re: Cannot telnet to a port from another server

> is the telnet service enabled on the server?

> what is the telnet entry in /etc/services?

He's not using the Telnet service, so none of
that matters. He's using a Telnet client as
a test program to probe other (non-Telnet)
ports. Unless you're trying to talk to port
23 (Telnet), no one cares if the Telnet
server is configured/running anywhere.
Yaboto
Super Advisor

Re: Cannot telnet to a port from another server

[root@rcbbkp /]# cat /etc/services | grep telnet
telnet 23/tcp
telnet 23/udp
rtelnet 107/tcp # Remote Telnet
rtelnet 107/udp
telnets 992/tcp
telnets 992/udp
skytelnet 1618/tcp # skytelnet
skytelnet 1618/udp # skytelnet
hp-3000-telnet 2564/tcp # HP 3000 NS/VT block mode telnet
tl1-telnet 3083/tcp # TL1-TELNET
tl1-telnet 3083/udp # TL1-TELNET
telnetcpcd 3696/tcp # Telnet Com Port Control
telnetcpcd 3696/udp # Telnet Com Port Control
scpi-telnet 5024/tcp # SCPI-TELNET
scpi-telnet 5024/udp # SCPI-TELNET
ktelnet 6623/tcp # Kerberos V5 Telnet
ktelnet 6623/udp # Kerberos V5 Telnet
[root@rcbbkp /]#

[root@rcbbkp /]# 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
[root@rcbbkp /]#

Steven Schweda
Honored Contributor

Re: Cannot telnet to a port from another server

> > > [...] It doesn't work [...]
> >
> > Which kind of "It doesn't work" is this?
>
> Still wondering...

My psychic powers are too weak to show me
the actual error message you see, so, unless
you show me, I won't know what it is.

> As usual, showing actual commands with their
> actual output can be more helpful than vague
> descriptions and interpretations.

Still true.
Nunes_2
Regular Advisor

Re: Cannot telnet to a port from another server

Hi!


do cat /etc/services | grep 9500
cat /etc/services | grep 9501
cat /etc/services | grep 9502

look if there is there.
look the firewall log, maybe its locking.

Regards