1
I have opened a vm with hostonly network as networking option on my desktop. I have assigned an appropriate static ip to the vm. I can establish an ssh connection to it from my desktop and I can also ping my desktop from the vm. However, I can not reach to outside network inside the vm.
command ifconfig vboxnet0
returns on the desktop:
vboxnet0 Link encap:Ethernet HWaddr 0a:00:27:00:00:00
inet addr:10.20.0.1 Bcast:10.20.0.255 Mask:255.255.255.0
inet6 addr: fe80::800:27ff:fe00:0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6132 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:328130 (328.1 KB)
on the vm, ifconfig eth0
command returns:
eth0 Link encap:Ethernet HWaddr 08:00:27:a1:65:a1
inet addr:10.20.0.10 Bcast:10.20.0.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fea1:65a1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:161 errors:0 dropped:0 overruns:0 frame:0
TX packets:122 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15459 (15.4 KB) TX bytes:15973 (15.9 KB)
The ip of the vm is static. vboxnet0
is assigned as virtual NIC of this vm. Wht further configuration should I do to provide internet connection with vboxnet0? Any help is appreciated.
My desktop os: ubuntu 12.04
The vm os: ubuntu server 12.04
Virtualization tool : virtualbox 4.3.6 r91406
You don't have to choose. You can set up two adapters for the VM, and set one to be NAT while the other is host-only. – Kenster – 2014-01-16T18:47:57.907