Solved

Connection Refused. REDHAT 6.2

Posted on 2001-08-20
9
497 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
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 

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 50 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

728 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