Noob: Virtualbox networking question
Posted: 16. Oct 2011, 13:05
Hi,
Sorry if this is one of those stupid noob questions but I am having trouble understanding how the networking is handled in Virtualbox.
The scenario: I'm runnning VB 4.1.4 on a windows 7 host with a CentOS 5.5 guest. I want to set up a dev. web server on the guest which I can access from the browser of the windows host where I have my development environment, however, the networking side of things is confusing me. My host is on a 10.0.0.x private network receiving it's IP from a dhcp server on the router (typical home network setup). I have "host only" selected in virtualbox for the virtual NIC. IPCONFIG on the host shows the virtual NC as having a 192.168.x.x private range IP. When I run IFCONFIG on the guest, the IP displayed is in the 10.0.2.x network. If I enter the 192.168.x.x IP of the virtual NIC in the host browser I receive the "It works!" html page - I have no idea where this comes from. But I cannot access any of the apache virtualhosts on the guest machine, even if I add the apache virtualhost domain name and the 192.168.x.x address to the windows hosts file.
Does VB run a kind of virtual router or something - I have no idea how the virtual networking aspect works in VB - where are the IP's coming from and how are packets getting from one network to another?
Any help with this specific problem or a link to a simple introduction to VB networking would be really appreciated.
Many thanks.
Tony
Sorry if this is one of those stupid noob questions but I am having trouble understanding how the networking is handled in Virtualbox.
The scenario: I'm runnning VB 4.1.4 on a windows 7 host with a CentOS 5.5 guest. I want to set up a dev. web server on the guest which I can access from the browser of the windows host where I have my development environment, however, the networking side of things is confusing me. My host is on a 10.0.0.x private network receiving it's IP from a dhcp server on the router (typical home network setup). I have "host only" selected in virtualbox for the virtual NIC. IPCONFIG on the host shows the virtual NC as having a 192.168.x.x private range IP. When I run IFCONFIG on the guest, the IP displayed is in the 10.0.2.x network. If I enter the 192.168.x.x IP of the virtual NIC in the host browser I receive the "It works!" html page - I have no idea where this comes from. But I cannot access any of the apache virtualhosts on the guest machine, even if I add the apache virtualhost domain name and the 192.168.x.x address to the windows hosts file.
Does VB run a kind of virtual router or something - I have no idea how the virtual networking aspect works in VB - where are the IP's coming from and how are packets getting from one network to another?
Any help with this specific problem or a link to a simple introduction to VB networking would be really appreciated.
Many thanks.
Tony