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?
Best Answer
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