Operating System - Linux
1832871 Members
3652 Online
110048 Solutions
New Discussion

Re: Can't telnet to RH7.2 new installed box

 
SOLVED
Go to solution
Tony Rose
Advisor

Can't telnet to RH7.2 new installed box

I have installed RH7.2 on a workstation. I am in an internal LAN (using a LinkSys DSL router; 192.160.x.x network). DHCP assigned 192.168.1.104 to the workstation and everything works fine going out. However, I can't telnet to the box from another PC inside the network. /etc/services has telnet in it. What else am I missing?

Thanks,
-tr
10 REPLIES 10
Kodjo Agbenu
Honored Contributor

Re: Can't telnet to RH7.2 new installed box

Hi,

By default, for security reasons, only a minimum set of services are enabled on RedHat 7.2.

You have to enable the telnet server by doing the following :

1. Edit /etc/xinetd.d/telnet and toggle "disable=yes" to "disable=no".

2. Restart the "xinetd" daemon (/etc/init.d/xinetd restart).

Good luck.

Kodjo
Learn and explain...
Tony Rose
Advisor

Re: Can't telnet to RH7.2 new installed box

Thanks for your reply, but I don't have a 'telnet' file in my /etc/xinit.d directory. I have files for 'chargen', 'daytime', 'echo', 'rsync', 'sgi_fam', and 'time'.

I see the format of these files and they have the parameters you mentioned. But no 'telnet' file.

Thanks again for your assistance.

-tr
Kodjo Agbenu
Honored Contributor

Re: Can't telnet to RH7.2 new installed box

Hello,

It seems that telnet server package is not installed on your RedHat system. It is generally the case if you choose "workstation" during the installation steps.

To correct this, mount the cdrom device on /mnt/cdrom, then :

rpm -ivh /mnt/cdrom/telnet-server-0.17-20.i386.rpm (or any other version of telnet-server).

After that, check in /etc/xinetd.d/telnet that the "disable" flag is set to no.

Good luck.

Kodjo
Learn and explain...
Ron Kinner
Honored Contributor

Re: Can't telnet to RH7.2 new installed box

From
http://www.webmo.net/support/linux72.html

Telnet
Telnet is not generally recommended because login information (username and password) and all commands (su and root password) are transmitted as plain text. One should use ssh instead. However, telnet is sometimes used on a secure local network when security is less of a concern. To turn on telnet
# cd /etc/xinet.d
# vi telnet
disable = no
# /sbin/service xinetd restart
If telnet fails,make sure that the iphains firewall contains a line for service 23 (telnet) like
-A input -s 0/0 -d 0/0 23 -p tcp -y -j ACCEPT
that the telnet server software is installed
# rpm -qa | grep telnet-server
and that either /etc/hosts.deny contains no entries or /etc/hosts.allow permits access by the client
ALL:{network_address}/{subnet_mask}
where {network_address} may be calculated from
$ ipcalc --network {ip_address} {subnet_mask}

Ron
Mark Fenton
Esteemed Contributor

Re: Can't telnet to RH7.2 new installed box

As Kodio said, the default installation for Redhat has telnet disabled. In addition, the default workstation installation doesn't include a telnet server, this will then have to be installed in order to get things working properly.

If security is not an issue, then telnet is an acceptable, proven tool. SSH, though, is better. (and included on the install media that comes from RedHat)

I use RH 7.2 in a small network, and find it very stable.

Enjoy
Stuart Browne
Honored Contributor

Re: Can't telnet to RH7.2 new installed box

... just for those that didn't know, RH (from somewhere in the v6.0+ field) has a utility called 'chkconfig'.

chkconfig telnet on

would change the appropriate part of /etc/inetd.conf (or /etc/xinetd.d/*) to turn the 'telnet' configuration on.

This is also capable of managing the startup files (ie. chkconfig --level 2345 xfs on) based on run level.

This is just a cleaner way of enabling or disabling a given service on a RH linux box.
One long-haired git at your service...
Tony Rose
Advisor

Re: Can't telnet to RH7.2 new installed box

Thanks for all the help guys. The chkconfig command looks like it will be useful. BTW, here is an interesting occurance:

I installed 7.2 on 2 boxes and 2 different locations. I did the same install (I went back and did the Server install on both), and the only difference was the network numbers.

One box works fine sending mail. The other one, gives me a hostname lookup, and a route to host error. The file /etc/sysconfig/networking has the right gateway. If I do a netstat -rn however, the gateway is 152.33.255.254 instead of 152.33.254.254. When I do a manual route add for the right one, about 30 minute later it starts working! Until of course I reboot. So my question is:

1) Why does this one box behave this way and the other one didn't?

2) How can I fix this (and I would prefer to "fix" the problem rather than just patch it by making the route add command part of the boot process)?

Thanks,
-tr
Stuart Browne
Honored Contributor
Solution

Re: Can't telnet to RH7.2 new installed box

1) I really don't know why one box would behave one way and the other a different way (give or take 'typos').

2) Check /etc/sysconfig/network, in particular the 'GATEWAY=' line. if the line isn't there, then check /etc/sysconfig/network-scripts/ifcfg-eth0 (or eth1, depending on which interface) for a similar line.

When the system comes up, the 'ifup' command gets issued with whatever ethernet interfaces it finds listed in that directory. It uses the settings in these text files to configure the networking on your system.

If the 'GATEWAY' values are correct, you might want to check your 'NETMASK' values, making sure they have the right bitmasks in place.

If you need further help, just post some of those details.
One long-haired git at your service...
rudy_4
Advisor

Re: Can't telnet to RH7.2 new installed box

go to setup and go to firewall and put minimum security and that is it
Tony Rose
Advisor

Re: Can't telnet to RH7.2 new installed box

Thanks again guys. Stuart actually hit the nail on the head with the 2nd problem I mentioned with the 2 like boxes when he said:
Stuart actually hit the nail on the head with my second question regarding the two like boxes. I must have fat fingered the GW address and the scripts-ifcfg0 file had the wrong address in it. I edited that and it fixed the problem.

Thanks again for your help.You guys are great!