A few quick steps to setting up a NATed VirtualBox FTP and Webserver for development. I’m going to assume you’re using some variant of linux.
- Install ProFTPD – for debian this would be apt-get install proftpd
- Add a user using the useradd command. Ex: useradd username -p password -d /apps -s /bin/false
- Edit the following lines in /etc/proftpd/proftpd.conf
PassivePorts 65532 65534 #Change the range as necessary, but keep it small
RequireValidShell off #If you disabled their shell using the command above make sure this is set to off, this is important for PASV
MasqueradeAddress 127.0.0.1 #Or whatever address you have set for your guest IP, this is important for PASV - Restart your ProFTPD server /etc/init.d/proftpd restart
- In VirtualBox go to Devices->Network Adapters and click on port forwarding and create the following rules:
Name,Protocol,HostIP,Host Port,Guest IP,Guest Port
ftp,,21,,21
ftpdata1,,65532,,65532
ftpdata2,,65533,,65534
ftpdata3,,65534,,65534
web,,80,,80
That’s it! You should be able to connect to the guest webserver and ftp server. Make sure you check PASV for your FTP client.
THANK YOU! You saved my life!
Thanks….. you had the missing piece to my puzzle
If I were a Teenage Mutant Ninja Turtle, now I’d say “Koawubnga, dude!”
This helped me. Thanks a lot!
Thank you!!