0

I started the vsftpd on Ubuntu 10.04, but can't connect to it.

The error says(FTP Client):

Status: Connecting to 124.205.xx.xx:21...
Error:  Connection timed out
Error:  Could not connect to server

I've checked the server status, and vsftpd is running:

$ ps ax | grep vsftpd
23646 ?        Ss     0:00 /usr/sbin/vsftpd
23650 pts/1    S+     0:00 grep --color=auto vsftpd

port 21 is under listening as well:

$ netstat -tlnp | grep 21
(No info could be read for "-p": geteuid()=1000 but you should be root.)
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      - 

I can connect to localhost:

$ ftp localhost
Connected to localhost.
220 (vsFTPd 2.2.2)
Name (localhost:jlee): 
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> 

Here is iptables output

$ sudo iptables -vL
Chain INPUT (policy ACCEPT 191 packets, 144K bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 124 packets, 28502 bytes)
 pkts bytes target     prot opt in     out     source               destination         

What's the problem here?

Johnny
  • 101
  • 4

4 Answers4

1

Check if your ftp client is on activ or passiv mode. If it's on passiv mode, you have to add some parameters. Something like this :

pasv_enable=YES pasv_promiscuous=NO pasv_min_port=40000 as you want pasv_max_port=41000 pasv_address=xxx.xxx.xxx.xxx (your ip) port_promiscuous=NO

Jérémy Munoz
  • 344
  • 2
  • 8
0

I just installed vsftpd with apt-get install vsftpd on my Ubuntu 10.04 laptop, and the daemon worked out of the box.

Have you modified the vsftpd configuration files?

Does ftp localhost work for you if you try to do that on your server?

Do you have iptables enabled? Does iptables -vL list some rules?

Janne Pikkarainen
  • 31,852
  • 4
  • 58
  • 81
  • Thanks for the answer. I've updated the output of `ftp localhost` and `iptables -vL`, please take a look at it. I used apt-get install vsftpd too, and it worked. But after a server sudden down, it doesn't work now – Johnny Aug 27 '10 at 03:00
0

It's not your server firewall, it's not your vsftp configuration, it's something between you and your server =P

Can you connect from your pc to any other ftp server? Can you connect to your ftp from another host?

Giovanni Toraldo
  • 2,587
  • 19
  • 27
0

I am not sure but it might be apparmor daemon which might be denying you to connect it to your FTP server , disable apparmor and see if it helps

 service apparmor stop