Using VBox as a server: what IP address to pick?

This is for discussing general topics about how to use VirtualBox.
Post Reply
Asbestos
Posts: 2
Joined: 15. Oct 2010, 19:49
Primary OS: Mac OS X Leopard
VBox Version: OSE other
Guest OSses: Ubuntu

Using VBox as a server: what IP address to pick?

Post by Asbestos »

Hi all,

I'm setting up my first local server by creating a virtual Debian machine in VBox, to which I want to connect from my main computer. The idea is to have a LAMP server running that I can access for testing.

I have never set up a server before, and this may be a silly question, but how do I know what IP address to choose? Can I just make one up?

All the instructions for setting up LAMP servers include some variation of the line
Now we will change that to a static IP address for this you need to edit Edit /etc/network/interfaces and enter your ip address details (in this example setup I will use the IP address 172.19.0.10):
When I use the IP 172.19.0.10 and restart the network services, I seem to lose any connection to the internet, so I feel like I must be doing something wrong...

And once I pick an IP address, am I right in thinking that I can just set the Network options on the virtual machine to be "Internal Networking," and then just point my browser on my main computer to the IP address?

Any help greatly appreciated!
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Using VBox as a server: what IP address to pick?

Post by Sasquatch »

Read the User Manual, chapter 6, first to know what networking options you have to use. Internal networking won't work, as you lock the VM from the outside world. It can only communicate to other VMs set to Internal.

For the IP address, read http://en.wikipedia.org/wiki/Private_network. That will tell you what ranges you can use. Basically, if you have a router, pick one outside the DHCP scope of it but still in it's range so your computer can access it.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply