Trying to set up ftp... and failing
Hey all,
I'm trying to set up proftpd on my slack 10.2 box, but everytime I type "ftp localhost" as root I get this error: Connected to localhost. 421 Service not available, remote server has closed connection ftp> I followed the instructions on this page: http://shilo.is-a-geek.com/slack/ftp17.html and then just copied and pasted the proftpd.conf from http://www.linuxquestions.org/linux/...to_end_ProFTPD and haven't changed a thing...any help? |
Open Port 21
A "connection refused" is different than not being able to connect. You're "connecting" just fine, the box is just refusing to let the connection go through.
|
So how would I go about fixing that? My router is set up to forward the correct ports...
|
Try This
Try running:
Code:
netstat -an |grep LISTEN I'm assuming, since you tried to connect to localhost that you're running on the machine that is the ftp server. If that's the case, the router isn't involved. |
This is the result:
tcp 0 0 0.0.0.0:37 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:587 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:113 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN unix 2 [ ACC ] STREAM LISTENING 1161 /dev/gpmctl What does that mean? |
No IP Address
That's exceedingly odd. Post the contents of your /etc/hosts file. You should at least have a loopback address defined. On the plus side, it looks like it is listening on port 21.
Can you ping anything from that machine? What happens if you type ifup? |
/etc/hosts:
Code:
# |
Now That's What I Call A Dead Parrott
Have you considered giving this machine a static IP address? It should probably grab the same one every time, but not always. Besides, giving it a static address makes your port forwarding rule in your router a one-time change. Then you could mod hosts to say:
Code:
# For loopbacking. What address does it have now? ifconfig |
It's ip is 192.168.2.140, I changed it in /etc/hosts, but how do I set a static ip in linux?
|
Come to think of it, I'd rather stick with a dynamic ip (the server is the only thing plugged into the router anyway). I also fooled with changing between standalone and inetd servertypes, but they same thing happens. Is there something in post #5 that is screwing this up and if so, how do I fix it?
|
Ran a debug commmand for proftpd and got the following, is something wrong here?
Code:
root@Middle-Earth:/shares/joe# proftpd -n -d 9 Code:
# This is a basic ProFTPD configuration file (rename it to |
Alright, so the problem was that I had the proftpd line uncommented in my inetd.conf and was trying to run the server as standalone.
I have a new problem though...I can access the ftp server fine on the machine itself (through ssh) but when I try to connect through smartftp or any other ftp client, it connects, logs in but then times out when trying to list the folders in the share! What would be causing this? |
All times are GMT -5. The time now is 05:26 AM. |