Thursday, May 11, 2017

How to solve internet problem for ubuntu in virtual box?

You can access internet on virtual box by two way one is bridge network or host only. today i show you the host only option.


  1. First you need to create a Host only network in virtual box
    1. virtual box -> file -> preferences -> network -> Host-only network 
    2. Click add button
    3. Click DHCP, click Enable Server

    4. Select virtual OS, go to setting -> network

  2. Now login to your ubuntu os and do the following 
          sudoedit /etc/network/interfaces
  1. 
    # The loopback network interface
    auto lo
    iface lo inet loopback
    # NAT
    auto eth0
    iface eth0 inet dhcp
    # Host only
    auto eth1
    iface eth1 inet dhcp
After VM reboot hope everything worked fine.