Networking with NAT

6-NAT

“NAT” is the default option in the VirtualBox “Networking” settings. “NAT” stands for “Network Address Translation“, which means that VirtualBox acts as a router between the VirtualBox guest and the network outside.

If you choose this option, your FreeDOS guest will get an internal IP address like “10.0.2.15” – which means nothing to all the networking programs on your PC or in your network.

This will not limit the ability for FreeDOS software to connect to the internet and ping other machines in your network. But the FreeDOS guest can not be reached from the outside, unless you allow it.

To do that, you need to configure “Port Forwarding“.

network-nat-1

  • Click on “Advanced
  • Choose “Port Forwarding

network-nat-2

  • And define the following Port Forwarding rule:

network-nat-3

All traffic to your host’s port 2121 will now be forwarded to port 21 (FTP) of your VirtualBox guest.

  • Now use a FTP software like FileZilla to connect – to yourself :-).

network-ftp-filezilla1

  • Your own computer is called “localhost“. So enter this name into the field “Host:” in FileZilla.
  • Enter the port number “2121“.
  • Enter username and password (per default, please change (!): “user” and “password”.)
  • Open “Transfer Settings” and set the “Transfer mode” to “Active“.

network-ftp-filezilla2

You can now exchange files between your host and the FreeDOS guest, even without a network.

network-ftp-filezilla3

This also worked with the FTP client “ForkLift”:

network-ftp-forklift

The Mac OS X “Finder” (in Yosemite) did not connect successfully – it doesn’t offer a way to configure “active” connections.

But even the Terminal was able to make such a connection to the FreeDOS guest:

network-ftp-terminal

Have fun!

Ulrich Hansen