I am running Ubuntu 12.04 as the host and installed Ubuntu 14.04 in the Virtualbox as Guest OS. I have installed and configured VSFTPD on Ubuntu 14.04 and forwarded the virtualbox port's as follows: enter image description here Now i am using FileZilla in my host OS in order to access into the guest OS.
Here is the FileZilla login detail:
Username: hasan
Password: -----
Port: 8181
Now i press the Quickconnect button to access into the guest os.
Login was success but filezilla was unable to access into the guest os!.
Here is the messages:

Status: Connecting to
Status: Connection established, waiting for welcome message...
Response:   220 (vsFTPd 3.0.2)
Command:    USER hasan
Response:   331 Please specify the password.
Command:    PASS ******
Response:   230 Login successful.
Command:    OPTS UTF8 ON
Response:   200 Always in UTF8 mode.
Status: Connected
Status: Retrieving directory listing...
Command:    PWD
Response:   257 "/home/hasan"
Command:    TYPE I
Response:   200 Switching to Binary mode.
Command:    PASV
Response:   227 Entering Passive Mode (10,0,2,15,224,245).
Command:    LIST
Error:  Connection timed out
Error:  Failed to retrieve directory listing

I was unable to fix this. Any idea?

  • Did you check if firewall on host blocks incoming connection? I guess first phase use different port/protocol. – Lety Sep 10 '14 at 11:18

Simple port forwarding is not enough for FTP. FTP has a control connection on usually port 21, which you successfully mapped to port 8181. But to transfer files or directory listings FTP opens another connection. There are two ways to open this connection:

  • Passive mode: This is what you use. In this case the FTP server allocates a random port on the server and tells the client IP and port using the response to the passive command. In you case this is "227 Entering Passive Mode (10,0,2,15,224,245)", which means the server waits at IP port 57589. Since the client does not now that is the server and since port 57589 on the server is not accessible from outside the connection will fail.
  • Active mode: Here the client opens a listener on a random port and informs the server about this port. The server will then try to connect from port 20 to this port. This might work if the Ubuntu 14.04 system inside the VirtualBox can access the host system (12.04). If this is possible depends on your setup.

Anyway, FTP is an ugly protocol if port forwardings or firewalls are involved. I would recommend to use sftp instead, which is support by FileZilla too and which only needs a SSH server on the other side (which you probably already have because you forward to port 22).

  • Great explanation, i have installed SSH Server but while i try to connect using the port 8282 then it shows this error "Cannot establish FTP connection to an SFTP server. Please select proper protocol." :/ – rakibtg Sep 10 '14 at 16:32
  • You have to use FileZilla with SFTP and not FTP or FTPS when connecting to port 8182. – Steffen Ullrich Sep 10 '14 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.