Discussion Locked

no telnet to linux serv from other m/c

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have loaded linux red hat 8 on a m/c.
i can telnet from this linux server to any m/c but i cannot make telnet to this linux server from any other m/c. self telnet is working fine. i can also ping to this linux server from any other m/c.
i have checked /etc/inetd.conf, /etc/hosts.allow, /etc/hosts.deny ... all the files are o.k
/usr/sbin/tcpd is present.

can anybosy help me why i am not able to telnet to this linux server from any other m/c.

9 replies

by rbgnr111

check your:
/etc/xinetd.d/telnet

it should look like this:

service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
disable = yes
}

by paulo.sedrez

First of all, the previous answer is wrong: if there is the line "disabled = yes", the telnet server is POSITIVELY disabled.

In RedHat 7 and above, the telnet daemon is not started from inetd, but from xinetd. The standard way to enable the daemon is:

chkconfig telnet on
service xinetd reload

But THE main reason for not being able to telnet to a Linux box is the ability to resolve IP address to names. If your Linux box can't do - OR fail to do in a short amount of time - the reverse resolution, the connection will hang to timeout.

Interim solution:

In /etc/nsswitch.conf, set the line hosts to:

hosts = files [NOTFOUND=return]

OR register the telnet client addresses in /etc/hosts.

Permanent solution:

Register thetelnet client addresses reverse reolution in your name server.

--Sedrez

by alveden

self telnet is working fine .... meaning you can telnet to localhost.

If that's the case, did you install Redhat with the firewall options?

If you did, and confirm that your telnet server is running (as recommended by previous post), then probably the telnet port have been blocked by the firewall rules.

Option 1
Modify the iptables rules to allow incomming telnet connection.

Option 2
If you don't really require firewall, disable the iptable all together by using the "chkconfig" command, then running "/etc/init.d/iptables stop"

by avswamy

as per the second answer, he is correct the desable should be no and the config for RH8.0 should be like this

# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
}
and one more file from /etc the file is securetty which will won't allow you to log into server through telnet with root, but you can su to root after logging as an user. only these two constraints for any telnet session.
check list is your firewall should allow 23 port then only this work. i hope this will help you

This discussion is closed to new replies.