Time for action – accessing the NAT mode in your VM
In this exercise, I'll show you how the NAT mode lets you do some basic networking tasks in your virtual machine as if you were working with a real PC behind a firewall or router. I'll also show you how to set up a web server in one of your virtual machines and test if you can access that web server from your host PC. In this exercise, I used a Windows XP system as the host PC and the UbuntuVB
virtual machine we created in previous chapters.
If you're using a Windows host, open a Command Prompt window and type
ipconfig
, followed by Enter. If you're using a Linux host, open a terminal window and typeifconfig
, followed by Enter. Your IP configuration will show up next, as in the following screenshot (Windows host):There will be an entry for each network adapter physically connected to your host PC and one entry for the VirtualBox Host-Only Network virtual adapter. In the previous screenshot, there are two entries, one for the real network...