# Telnet into a Linux box??



## danag42 (Jun 3, 2001)

I have set up a Red Hat Linux machine on my network and I would like to telnet into it from my Windows box. I was able to do this on a Red Hat 6.2 machine but I installed 7.1 and I can ping the Linux box but it will not allow a Telnet connection. I took the default security settings on installation. I seem to recall there is a file that controls who may connect to the machine, there was a line "hosts allow" in it and I would like to put my local network in the allowed hosts and preferrably keep everyone else out (not critical since I'm behind a hardware firewall). Anyone know the name and location of the file?


----------



## stufine (Jul 27, 2001)

/etc/hosts.allow maybe?!?!!?


----------



## danag42 (Jun 3, 2001)

Yup, there is a file /etc/hosts.allow. Now all I need is the format to enter my local network in it, all the HowTo articles assume that you already know the format for entering your information. 
The file on my machine has a nice little blurb (commented out) but no sample entries. Could some folks out there who have working Telnet look at their /etc/hosts.allow files and post examples? I did some experimenting but I have not hit on it yet!!

There used to be examples in the standard files that were commented out, but it seems that is no longer the case. All help appreciated!!

--Dana G


----------



## stufine (Jul 27, 2001)

mine says all:all
real secure huh
so i would imagine 192.168.50.0/24 or something like that????
By the way I am just guessing in case you didn't notice.


----------



## danag42 (Jun 3, 2001)

Hey, thanks, I'll try it. If I keep trying combinations I will have to hit it eventually!


----------



## danag42 (Jun 3, 2001)

update: NO SUCH LUCK! Anyone else have any ideas?

Thanks for the try, though!!


----------



## MikeV (Jul 1, 1999)

Look in your /etc/inetd.conf file. Make sure you don't have a *#* in front of your telnetd line. Sounds like the telnet daemon isn't started.

Also, try logging in to the machine and type in "telnet localhost" to see whether or not it's working.

-M


----------



## danag42 (Jun 3, 2001)

Yikes!! There is no etc/inetd.conf file!! The answer to telnet localhost was Host Unknown! I tried to run rpm -qa grep telnet and was informed that Telnet is loaded. So what's going on, and how does one load Telnet onto an already installed machine (I mean other than re-installing the whole thing)?


----------



## stufine (Jul 27, 2001)

check /etc/services and see if telnet is turned on.


----------



## danag42 (Jun 3, 2001)

FURTHER RESEARCH:

The file in 7.1 is /etc/inetd.d/telnet, and there was a line that said 
disable = yes
which I commented out. Now I can telnet to localhost from the console, but I still can't get in from the network. Further research is underway, but now I think that it has to do with hosts.allow. Will report results.
Thanks, one and all for your suggestions!


----------



## danag42 (Jun 3, 2001)

OK, I mostly got it!! Seems that About the telnet, by default after the installation, telnet is disabled. You have to enable it by using the command: 

chkconfig telnet on 

Also, the firewall has to be configured by using the command 

lokkit

and choosing the Customize option, that lets you enable telnet.

So now all I need to figure out is why root can't operate from a telnet session with all it's priviledges, it can't log in and if you su into it the priviledges are the same as the account you started from.



Thanks to Ryan del Rosario of Red Hat for the insights!!

Thanks to all involved for your assistance. Almost there!!


----------

