VirtualBox

7
Dec

Accessing a VirtualBox Machine with NAT


The default way a VirtualBox machine connects to the network is using NAT. Since it’s connected to a private network, you can connect to the outside world but other machines cannot contact you (this holds true even for the host machine). NAT is the easiest and most lightweight way of connecting your virtual machine to the network. VirtualBox also supports others ways of connecting to the network such as a bridge adaptor.

My current setup: I have one virtual machine running Ubuntu 9.04 where I have all my development tools and languages installed (ruby, php, python etc). I run VirtualBox 3.0.8 on my MacOS laptop. This way I can be as close to the server environment as possible while building my applications. I run Apache, Passenger, PHP, MySQL on the guest machine and just forward 22 (ssh), 80 (http) and 3306 (mysql) to MacOS this way I can use apps like MySQL workbench to play with my database or Textmate to code.

Syndicate content