?
Solved

Connection Refused. REDHAT 6.2

Posted on 2001-08-20
9
Medium Priority
?
503 Views
Last Modified: 2013-12-15
I have just installed RH 6.2 in office. But when I telnet to the box, it gives "connection refused". I can ping the box.

Any files which I must modify?

Thanks
0
Comment
Question by:Judy_M
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
  • 2
9 Comments
 

Expert Comment

by:sdc_phong
ID: 6408908
I think you should check the following:

1. Check if in.telnetd is installed (rpm -qf `which in.telnetd`). If it's not, install it (this is should installed by default, however)

2. Check if inetd or xinetd is installed
 (rpm -qa|grep inetd)

3. Check if inetd/xinetd is listen for telnet connection (netstat -na|grep :23)

4. If inetd is installed, check if a following line is present in your /etc/inetd.conf (grep telnet /etc/inetd.conf)

telnet  stream  tcp     nowait  root    /usr/sbin/tcpd  in.telnetd

5. If xinetd is installed, check if file /etc/xinetd.d/telnet doesn't contain something like
disable=true

Hope you can get it working.

Cheers.

Nguyen Thanh Phong.
0
 

Author Comment

by:Judy_M
ID: 6409073
Hi,

inetd was installed after reading your note.

xinetd is not installed.

The rest of the conditions you specified are met.

Now, the error is slightly different. Connection was closed *immediately* after I telnet to the box
Error Message --> Connection closed by foreign host.
0
 

Expert Comment

by:sdc_phong
ID: 6409116
Can you send the screen dump of the telnet session (from beginning to connection closed).

BTW, do you telnet in as root or normal user? If you did with root, try again with normal user. By default, root user is NOT ALLOWED to telnet to the host.

Cheers.

Nguyen Thanh Phong
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 

Author Comment

by:Judy_M
ID: 6409538
Hi,

Here's the dump:

$telnet myhost
Trying 165.204.194.115...
Connected to myhost.blahblah.com.
Escape character is '^]'.
Connection closed by foreign host.
$
0
 
LVL 4

Expert Comment

by:MFCRich
ID: 6410880
The files '/etc/hosts.allow' and '/etc/hosts.deny' control access through inetd services. Check "man 5 hosts_access" for the details.
0
 

Author Comment

by:Judy_M
ID: 6411673
Hi,

inetd was installed after reading your note.

xinetd is not installed.

The rest of the conditions you specified are met.

Now, the error is slightly different. Connection was closed *immediately* after I telnet to the box
Error Message --> Connection closed by foreign host.
0
 

Author Comment

by:Judy_M
ID: 6411692
Both hosts.allow and hosts.deny has nothing in them.

But after adding ALL:ALL in hosts.allow, I still get the same error:

$telnet myhost
Trying 165.204.194.115...
Connected to myhost.blahblah.com.
Escape character is '^]'.
Connection closed by foreign host.
$
0
 

Author Comment

by:Judy_M
ID: 6412004
Updates:

$ftp myhost
Connected to myhost.blahblah.com.
421 Service not available, remote server has closed connection

In my inetd.conf, I have:
ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd -l -a
telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd
........
........

Thanks.
0
 
LVL 4

Accepted Solution

by:
MFCRich earned 150 total points
ID: 6414889
Do you have a file '/usr/sbin/tcpd'? I believe it is part of the tcpwrappers package. Also inetd may need to be restarted if you touched any if its configuration files.

> /etc/rc.d/init.d/inet restart   # Restart inetd
or
> /etc/rc.d/init.d/inet status    # check status of inetd

Also check to see if inetd is set to start at boot time;

> chkconfig --list  inet # as root

The above command will show whether inetd is configured to start for each run level

> chkconfig --level 345 inet on # also as root

will set it so inetd starts up in run levels 3, 4, and 5 which is most likely what you want.

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will giveā€¦
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month9 days, 13 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question