Solved

Connection Refused. REDHAT 6.2

Posted on 2001-08-20
9
488 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
  • 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
 

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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Ubuntu/Asterisk after upgrade Wav issue 19 55
LINUX CENTOS + APACHE 9 65
How can i set a Environment Variable in my Unix script ? 3 52
Adding more CPU cores to a Linux VM 5 66
In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

864 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now