• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 264
  • Last Modified:

Linux install: ftp issue

I installed RedHat 6.1.  With this default installation, I can ftp to the local host and all is fine.  I can see that "in.ftpd -l -a" gets started by inetd.  When I try to ftp to this same machine from another node on the network, I can see that that ftpd gets started properly - but the connection is always timed out.  Oddly enough, the same problem seems to occur with telnet.

I'm not sure what could be going on.  I was thinking that maybe my network configuration is incorrect.  But I can ftp to my local RedHat machine from itself, and I can ftp to other ftp servers on the network.  The only thing I can't do is ftp to the RedHat machine.

Any ideas would be appreciated.  Thanks!
0
BrindleFly
Asked:
BrindleFly
  • 3
  • 2
  • 2
  • +2
1 Solution
 
dcavanaughCommented:
Can you ping the ftp server's address from these other machines?  Please post the output if ifconfig and route -n and tell me something about the TCP/IP address/route settings on the other network node(s).   You might also look at /etc/hosts.allow and /etc/hosts.deny.  
0
 
biardCommented:
Sounds like an access problem.  You need to look in the /etc folder for the ftpconfig file (I can't remember its exact name, but there is only one) and set the users/groups to allow/deny.  Read the man page for you ftp program to find out more.  You also need to set up user accounts on the linux box for all users that will need to access the ftp server.  
0
 
BrindleFlyAuthor Commented:
Here is some additional info:

I can ping other machines on the net from the RedHat box, and visa versa.

/etc/hosts.allow and /etc/hosts.deny are both empty.  I edited hosts.allow with "ALL: ALL" but that had no affect.

My ftpusers file is the default.  I have tried doing an anonymous login, login as root, and login as a valid user - and all fail equally.  The oddest thing is that all ftp clients seem to timeout after sending the user name & password.

The RedHat machine has an IP on the internal net of 192.168.0.20 - and the machine I am trying to ftp from of 192.168.0.21.  As I said, they can ping each other fine.

As a test, I telneted to port 21 of the RedHat machine.  I should receive a greeting message and be asked to login.  Instead, it just hangs.

It really does seem like a hosts.allow issue.  I just don't know how to resolve it.

Again, your help is appreciated.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
BrindleFlyAuthor Commented:
New information:

As I said, I telneted to port 21 to see what was going on.  After waiting about 4-5 minutes, it finally gave me the greeting page.  I logged in successfully and was able to use some basic FTP commands.  However, if I tried to get a directory list, I would get the following error: "425 Can't build data connection: Connection refused."

I'm not sure what is going on.  I'm wondering if maybe there is more than one problem.

0
 
tknayakCommented:
can u show ur /etc/ftpaccess file here please?
0
 
j2Commented:
"It really does seem like a hosts.allow issue.  I just don't know how to resolve it." Wrong, if it was the daemone would never get started.

This is a name resolving issue.

in /etc/hosts you need to add

192.168.0.21 full.domain.name.of.machine alias alias alias

(example, "164.9.167.197   erwin.wm.net    wmgot1wi0197 erwin" means that the 164.9.167.197 system is named erwin.wm.net but also has the aliases of wmgot1wi0197 and erwin)

you need to add all hosts in this fashion, or set up a DNS.
0
 
BrindleFlyAuthor Commented:
Actually, I just figured it out.  The DNS server the RH6.1 box was pointing to was obsolete.  It appears as though when I was ftping to RH6.1, it was looking up an ip in the DNS server.  Since the DNS server was down, there was a long delay.

Thanks for all the help!
0
 
j2Commented:
.which pretty much means i was correct in my assumption. ;)
0
 
dcavanaughCommented:
I would say j2 is half right.  You need to add internal hosts to the /etc/hosts file, otherwise Linux wastes time trying to do a DNS lookup on addresses that are definitely not going to resolve.  On the other hand, proper configuration of /etc/resolv.conf is essential for remote hosts, and just having a valid DNS server probably helps even for the local addresses that do not resolve.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 3
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now