1
I have created a virtual machine with 2 network adapters, one connected to the host using NAT and the second connected through a host-only adapter.
This set-up works for what I want to do,
- Give the guest OS access to the internet (NAT interface eth0)
- Expose a web interface, hosted on the guest, to the host OS. (Host-only adapter eth1)
The problem is that the guest interface which is connected to the internet (eth0), has been assigned the same IP address, through DHCP, as the host OS.
Does anybody know how to configure virtualbox or the guest os so it gets a unique IP address?
Thanks!
My /etc/config/network
file in the guest OS:
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'lan'
option ifname 'eth0'
option ipaddr '10.0.2.20'
option netmask '255.255.255.0'
option proto 'dhcp'
config interface 'lan2'
option ifname 'eth1'
option proto 'static'
option ipaddr '10.88.12.1'
option netmask '255.0.0.0'
config interface 'wan6'
option ifname '@wan'
option proto 'dhcpv6'
config globals 'globals'
option ula_prefix 'fd62:86eb:0d01::/48'
If I set proto
to static
for the lan
interface, the IP address is set to 10.0.2.20
but I can not connect to the internet.
You can set a static ip for the guest. What os does it run? – Jake – 2013-12-12T11:01:28.527
Hey, I have updated my question with more details if that helps. – TomSelleck – 2013-12-12T11:39:43.053