I have installed pure-ftpd in the Guest machine. I tried to connect to FTP server of Guest Machine from Guest Machine with the port number 21 and I could connect to it successfully.
In the host machine I have added following command in order to redirect host's port 2121 into guest's port 21 and connect to FTP Server of Guest Machine.
VBoxManage setextradata Ubuntu "VBoxInternal/Devices/e1000/0/LUN#0/Config/FTP/HostPort" 2121 VBoxManage setextradata Ubuntu "VBoxInternal/Devices/e1000/0/LUN#0/Config/FTP/GuestPort" 21 VBoxManage setextradata Ubuntu "VBoxInternal/Devices/e1000/0/LUN#0/Config/FTP/Protocol" TCP
But once I tried to access this guest ftp server from Host Machine it asked me a password for the user I have in Guest machine and authentication passed successfully. But when it tried to list directories it showed me an error message saying following:
If you translate it into Enlgish, it will be following:
The folder contents could not be displayed.
Could not display the entire contents of "/ in localhost:2121": Can not open data connection. Maybe your firewall is blocking it?
How to solve the problem?