LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-27-2001, 09:40 AM   #1
ivannus
LQ Newbie
 
Registered: Jun 2001
Posts: 8

Rep: Reputation: 0
Question Can't make the wu-ftpd work properly


Hello,

I'm having problems connecting to my ftp server. Whenever i try to connect i receive a message "Connected to 10.0.0.3" (which is my server) and then nothing, until it times out and a get a "Connection closed by remote server" message.
In the past, I was able to try this several times until it did work, and I did connect correctly to the server. The connection worker perfectly from then on.
However, since yesterday I have been unable to make the connection, no matter how many times i try.
The version i'm using is wu-ftpd-2.6.1-16, and it makes no difference which client i'm using to connect to it.
Please note that i am able to connect to the server using telnet or http, only the ftp isn't working.

Any help would be greatly appreciated.

Ivan
 
Old 06-27-2001, 11:09 AM   #2
LionKing
Member
 
Registered: Jun 2001
Location: Allen, Texas, USA
Distribution: Redhat
Posts: 82

Rep: Reputation: 15
add the ip address and host name to the /etc/hosts file where you are connecting from, so the ftp server can resolve it.
Also, check /etc/xinit.d/wu-ftpd, and make sure it is not disabled.
there should be line says: disable=no
if it is says disable=yes, then change it to 'no' and restart
the xinet:
#/etc/rc.d/init.d/xinet restart
That probably will fix the problem. let me know if it does or not.
Good luck.
 
Old 06-27-2001, 01:33 PM   #3
ivannus
LQ Newbie
 
Registered: Jun 2001
Posts: 8

Original Poster
Rep: Reputation: 0
Thank you very much for your help. Although it's taking about 40 seconds for the ftp to connect, it does connect, so i can work.
However i would like to allow my whole intranet to access the server, and due to my very scarce knowledge of the linux system, i don't know how to do so.
I would like to allow from 10.0.0.1 to 10.0.0.255. What entry should a place into the hosts file? And how would i allow any address to access the server?

Thank you again!

Ivan
 
Old 06-27-2001, 01:57 PM   #4
LionKing
Member
 
Registered: Jun 2001
Location: Allen, Texas, USA
Distribution: Redhat
Posts: 82

Rep: Reputation: 15
If you want restrict ftp client access and only allow connection from 10.0.0.1 to 10.10.0.255 range, then add following line to the /etc/xinet.d/wu-ftpd:

only_from = 10.0.0.0/24

This allows the whole subnet on 10.0.0.0/24 to connect; if you want exclude say 10.0.0.8 for some reason, then add this line in front of the above line:

no_access = 10.0.0.8

And if you want to more secure and only allow a few hosts, then you put the ip address instead of the network address. And if you want more detailed log on ftp connections, then modify the the file so it looks like this:

log_on_failure = ATTEMPT HOST RECORD
log_on_success = PID HOST EXIT DURATION


Then, and restart your xinetd daemon:
/etc/rc.d/init.d/xinetd restart

Easy, right?
btw, ftp transfers are usally logged by default at: /var/log/xferlog, so you don't need add any additional stuff.
 
Old 06-27-2001, 02:15 PM   #5
LionKing
Member
 
Registered: Jun 2001
Location: Allen, Texas, USA
Distribution: Redhat
Posts: 82

Rep: Reputation: 15
In terms why it takes 40s to receive the ftp prompt is likely a DNS related issue - Your linux box tries to resove the incoming ip address to a host ip, but since you are on 10.x.x.x, it cannot resove using default DNS server, then it tries next DNS, and next... that's why you get long delay. Try to modify your /etc/resolve.conf and /etc/hosts, so your linux box have knowledge of the IPs and names that you are going to connect from.
Also there are couple of other files you should take look and modify to your need:
/etc/ftpusers - users denied ftp access
/etc/ftpaccess - how access it is controlled/logged, etc
/home/user/.netrc user enviromental parameters
 
Old 06-27-2001, 02:16 PM   #6
ivannus
LQ Newbie
 
Registered: Jun 2001
Posts: 8

Original Poster
Rep: Reputation: 0
All the info you gave me was very useful, however i was refering to the hosts file configuration, and not the ftp configuration.
In your first reply, you stated that i needed to add the ip of the computer i was connecting from into the hosts file. I did that, and now I can connect from that computer. I cannot however connect from any other computer which is not in the hosts file.
I wanted to allow all my intranet to access the ftp, and not only my computer.
So, is there any way to insert a range of ips into the hosts file?
And by the way, why would the ftp need the computer which is accessing it to be listed in the hosts file?
Thank you,
Ivan

PS. This message was sent before i read the second part of you response.

Last edited by ivannus; 06-27-2001 at 02:19 PM.
 
Old 06-27-2001, 02:25 PM   #7
ivannus
LQ Newbie
 
Registered: Jun 2001
Posts: 8

Original Poster
Rep: Reputation: 0
Now, after reading your last response, I detected a little difference here.
I don't have any resolve.conf, but a resolv.conf file. Is that correct? Should i rename it?
And is there any way to tell the ftp not to look up for the domain name of the ip that is connecting to it?

Thank you very, very much for your help.
 
Old 06-27-2001, 03:40 PM   #8
LionKing
Member
 
Registered: Jun 2001
Location: Allen, Texas, USA
Distribution: Redhat
Posts: 82

Rep: Reputation: 15
Sorry, my typo, don't rename that file, /etc/resolv.conf is correct name. What content do you have in this file? It must contains the correct DNS servers ip address (not names), otherwise your system will be slow or timeout with name lookup. And also, you must have the correct lookup sequence in order for the system have speedy name lookup. If you don't have internal DNS which delegate for your 10.0.0.0 net, then you should tell your system to look up /etc/hosts before send querey to DNS server.
Secondly, you might want tell your system do NOT perform a reverse lookup anytime it receives ftp connection. This will improve the lagging you see now with your initial ftp login.
 
Old 06-27-2001, 03:58 PM   #9
ivannus
LQ Newbie
 
Registered: Jun 2001
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks a lot.
I commented all the lines in the resolv.conf file, and the delay was gone. Now i can connect almost instantly to the server!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CP command doesn't work properly? itz2000 Linux - Newbie 1 08-02-2005 01:14 PM
mysqladmin doesn't work properly Dark Severance Red Hat 0 04-21-2005 09:55 AM
NVIDIA does not work properly in 10.1 Cornholio Slackware 7 03-28-2005 03:00 PM
startx doesn't work properly Ungluun Debian 9 07-13-2004 07:25 AM
Getting apt-get to work properly pwaring Debian 15 12-12-2003 04:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration