1753959 Members
7461 Online
108811 Solutions
New Discussion юеВ

Re: telnetd

 
SOLVED
Go to solution
Tarek
Super Advisor

telnetd

Hi there,
i have installed a linux Redhat 7.0 on my network and i'm trying to configure it. I'm having problems with telnetd. From linux i can telnet to other pc but i can't vice versa.
Some one told me that i have to download the telnet server because it isn't installed. I did that but i'm still not able to telnet to linux. What do i have to configure to let it work? Port is set in /etc/services
Thanks
Tarek
8 REPLIES 8
Marco Paganini
Respected Contributor

Re: telnetd

Hello,

There are a few steps to follow in order to solve your problem.

1) First of all, try:

telnet localhost

and see if you can telnet to your own server. If you get a message saying "connection refused", you don't have telnet enabled. If that is the case, check your /etc/inetd.conf (or /etc/xinetd.d/telnet file if you're using xinetd) and enable telnet. Don't forget to do killall -1 inetd (or killall -1 xinetd if you're using xinetd).

2) If you don't see the "connection refused" message but nothing comes out on your screen, try to wait a little bit longer.
If you can see the telnetd message after a few minutes, you may have an incorrectly configured DNS/resolver. Temporarily move your /etc/resolv.conf file to /etc/resolv.conf.OLD. This will disable name server resolution. Try telnetting again to localhost and see if the problem still happens (PS: Don't forget to move /etc/resolv.conf.OLD back to /etc/resolv.conf after the test).

3) If you can telnet locally, try telnetting to your linux box remotely. If you see the "connection refused" message, you may have iptables, ipchains or a tcpwrapper blocking traffic. Do "iptables -F INPUT" and "ipchains -F input" as root and try again. If it still happens, check your /var/log/secure.log for relevant messages. Also, check the tcpd manpage if you see tcpd complaining about remote connections to the telnet port.

Note: Make sure you re-enable your iptables or ipchains after you finish the test!
4) When you telnet from another box, make sure you wait a LONG time before you give up. If after a long time you see the telnetd banner, again you may have a DNS problem (your host tries to "resolve" the remote connection but it cannot -- This procedure takes a while). In this case, follow the steps outlined in case (2) (renaming the /etc/resolv.conf file to something else) and try telnetting again.

Hope it helps,
Paga
Keeping alive, until I die.
Tarek
Super Advisor

Re: telnetd

telnet from another host:
error:
Trying...
telnet: Unable to connect to remote host: Connection refused
The /etc/xinet.d/telnet is properly configured i think.
Volker Borowski
Honored Contributor

Re: telnetd

Hi,
did you check /etc/inetd.sec ?
Do not know if this applies to 7.x
Volker
Bernie Vande Griend
Respected Contributor

Re: telnetd

I'm thinking you checked this already, but make sure that in /etc/xinetd.d/telnet, that disable = no. If not, change this line and then restart xinetd.
Ye who thinks he has a lot to say, probably shouldn't.
Marco Paganini
Respected Contributor

Re: telnetd

Hello tarek,

If it gives you a 'connection refused' right away I'd say you have a ipchains/iptables based solution blocking the outside world. If it takes a little while, you may have a tcpwrapper (tcpd) blocking your incoming telnetd connections.

Some steps:

1) Check /var/log/secure* and look for any clues (tcpd logs there)
2) Did you try (as root) ipchains -F input and iptables -F INPUT ?

Regards,
Paga
Keeping alive, until I die.
Tarek
Super Advisor

Re: telnetd

Hi all,
first of all thanks for the help your providing me.
I checked /var/log/secure, i have an authentication error:
login: FAILED LOGIN 1 From wsname FOR root, authentication failure.

output of iptables -F INPUT:
iptables v1.1.1 can't initialize iptables table 'filter': iptables who? (do you need to insmod?) Perhaps iptables on your kernel needs to be upgraded.

ipchains -F input no output.

Any further tip? Is there any file that allows telnet access as the /etc/ftpusers does for ftp remote access?
Thanks again.
Tarek


Santosh Nair_1
Honored Contributor
Solution

Re: telnetd

Looks like you don't have ipfilters or ipchains set up. Not very secure, but it shouldn't prevent you from telnetting into the machine.

First try telnetting as a normal user...root is not allowed to telnet into the machine directly (security risk). If you need to have this ability, just mv /etc/securetty to something else (although I wouldn't recommend it).

Also, when you're telnetting into the machine are you getting the login prompt? If not, then the message from /var/log/secure is not related to the problem since you're not entering any login informtion.

Make sure that telnetd is listening:

netstat -na |grep LISTEN|grep 23

should return something like:

tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN

If not, then telnet is not running. Run the following command:

chkconfig --list|grep telnet

If it comes back with:

telnet: off

then run:

chkconfig telnet on

and try telnetting again.
Hope this helps.

-Santosh
Life is what's happening while you're busy making other plans

Re: telnetd

Telnet is disabled in redhat linux 7.0 by default. To enable it got /etc/xinetd.d/telnet file. In that there'l be a line

"disable = yes"

make it to

"disable = no"

And thatz it.

bye
Sunil