Red Hat Configuration - FTP: connection refused

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat Configuration > January 2004 > FTP: connection refused





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author FTP: connection refused
Brenden T.

2004-01-23, 7:26 pm

Hi all, I have a tough problem that hopefully has a not so tough
solution. I'm trying to setup a simple ftp server on Red Hat 7.2 and I
can't get beyond "connection" refused when trying to connect externally.
I've read every FAQ and online guide I can and I can't figure out why.

The big clue I think is that netstat -a says that ftp is not being
listened on. /etc/services looks ok to me (ftp is on port 21 for both
UDP and TCP), I added the ftp service in /etc/xinet.d/ftp and restarted
xinetd, so I'm not sure what could be inhibiting ftpd. Here's my config
from /etc/xinet.d/ftp:
serice ftp {
disable = no
socket_type = stream
wait = no
nice = 10
user = root
server = /usr/sbin/in.ftpd
server_args = -l
instances = 4
log_on_sucess += DURATION HOST USERID
}

I modified /etc/hosts.allow and /etc/hosts.deny too. I wasn't sure
about hosts.allow so I copied the working nfs stuff to a new line and
changed it:
in.ftpd: 10.0.0.0/255.255.255.224
which is just like the entries for mountd, statd, etc.

Not sure what else to say. Here's the long story summarized:
1. Dowloaded wu-ftp and built it with ./configure and make
2. Created /usr/ftp and the little jail for it to run in.
3. Check the firewall to make sure it didn't reject ftp.
4. Made changed to /etc/xinetd.d/ftp above and hosts files.
5. Restarted xinetd
There maybe a few other things I did, this is what I recall for now.

I did a tcpdump trace of the connect attempt, the packets are reaching
the server and it replies, but the replies are all R (resets). I think
this is related to the fact that xinetd doesn't think it has something
to run on port 21 (ftp port).


Help? What could I be missing?

Cyfisto

2004-01-23, 7:26 pm


"Brenden T." <brendenNO@sureSPAMwest.net> schreef in bericht
news:vr7tirge2irc01@corp.supernews.com...
quote:

> Hi all, I have a tough problem that hopefully has a not so tough
> solution. I'm trying to setup a simple ftp server on Red Hat 7.2 and I
> can't get beyond "connection" refused when trying to connect externally.
> I've read every FAQ and online guide I can and I can't figure out why.
>
> The big clue I think is that netstat -a says that ftp is not being
> listened on. /etc/services looks ok to me (ftp is on port 21 for both
> UDP and TCP), I added the ftp service in /etc/xinet.d/ftp and restarted
> xinetd, so I'm not sure what could be inhibiting ftpd. Here's my config
> from /etc/xinet.d/ftp:
> serice ftp {
> disable = no
> socket_type = stream
> wait = no
> nice = 10
> user = root
> server = /usr/sbin/in.ftpd
> server_args = -l
> instances = 4
> log_on_sucess += DURATION HOST USERID
> }
>
> I modified /etc/hosts.allow and /etc/hosts.deny too. I wasn't sure
> about hosts.allow so I copied the working nfs stuff to a new line and
> changed it:
> in.ftpd: 10.0.0.0/255.255.255.224
> which is just like the entries for mountd, statd, etc.
>
> Not sure what else to say. Here's the long story summarized:
> 1. Dowloaded wu-ftp and built it with ./configure and make
> 2. Created /usr/ftp and the little jail for it to run in.
> 3. Check the firewall to make sure it didn't reject ftp.
> 4. Made changed to /etc/xinetd.d/ftp above and hosts files.
> 5. Restarted xinetd
> There maybe a few other things I did, this is what I recall for now.
>
> I did a tcpdump trace of the connect attempt, the packets are reaching
> the server and it replies, but the replies are all R (resets). I think
> this is related to the fact that xinetd doesn't think it has something
> to run on port 21 (ftp port).
>
>
> Help? What could I be missing?
>



You're right about the netstat. There should be a process
listening on the ftp port.
Are there any messages in /var/log/messages ?
(if that's the location on rh7.2, I'm only familiar with rh9).
About the config: did you copy it to this post?
In that case there's a typo: serice should be service.



Brenden T.

2004-01-23, 7:26 pm

Cyfisto wrote:
quote:

> You're right about the netstat. There should be a process
> listening on the ftp port.
> Are there any messages in /var/log/messages ?
> (if that's the location on rh7.2, I'm only familiar with rh9).
> About the config: did you copy it to this post?
> In that case there's a typo: serice should be service.
>



That's for the reply. Unforuately I just re-typed the config, so
"serice" is spelled correctly in the config file.

My logs show nothing at all when I attempt to connect with ftp.
Scrolling back a bit, I see xinetd starting up. It prints out a lot of
services that are disabled ("xinetd [898]: login disabled, removing")
and then finishes with "xinetd Version 2.3.3 started with libwrap
options compiled in" and "xinetd[898]: Started working: 0 available
services". This seems ominous.

xinetd says both login and shell are disabled, could that be an issue
for ftp?

Brenden T.

2004-01-23, 7:26 pm

Brenden T. wrote:
quote:

> service ftp {
> disable = no
> socket_type = stream



Found it. The { goes on the second all, not the first. Sheesh.

Thanks all.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com