Results 1 to 5 of 5

Thread: Sharing Network in VirtualBox

  1. #1
    Join Date
    Sep 2011
    Beans
    117
    Distro
    Ubuntu 12.04 Precise Pangolin

    Question Sharing Network in VirtualBox

    Hi, I have Windows 7 guest and Ubuntu Host, the Windows 7 has Internet connection, how do I share it with Ubuntu host? or how to make Ubuntu see guest's sharing network?
    Thanks.

  2. #2
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    10,084
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Sharing Network in VirtualBox

    Life would be easier if the Ubuntu host were connected to the Internet. Then, using the default NAT mode in VB, the Windows guest would see the Net as well. Is this not possible?
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  3. #3
    Join Date
    Sep 2011
    Beans
    117
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Sharing Network in VirtualBox

    Yes life would be easier if my USB modem was detected on Ubuntu and save the whole trouble, but in my case I need to use VirtualBox to access the Internet.
    I believe it's about to set some IP and netmask to vboxnet0 and create a share connection on Windows, but I need some details, especially how to let Ubuntu see Windows Guest sharing network.

  4. #4
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    10,084
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Sharing Network in VirtualBox

    In the default NAT mode, the Windows guest will be assigned an IP in 10.8/16 with a corresponding IP assigned to vboxnet0. You can communicate with the guest simply by IP. However you'll need to a bit of fancy footwork to reach the Internet, since you'll need to use the Windows host's IP as your Ubuntu default gateway, then use Windows Connection Sharing to masquerade the Ubuntu machine out to the Internet. If the Windows guest has 10.8.0.2 as its IP, you'd add a default route in Ubuntu like this:

    Code:
    sudo ip route del default             # just in case there is one already
    sudo ip route add default gw 10.8.0.2
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  5. #5
    Join Date
    Sep 2011
    Beans
    117
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Sharing Network in VirtualBox

    I have assigned all the IPs and other settings to let Ubuntu communicate with Windows:
    Adapter 1 Host-only
    IP address 192.168.56.1 netmask 255.255.255 gateway 192.168.56.2
    I added those to vboxnet0 and to Windows shared network while DHCP is disabled.
    I tried out the ping command [ping 192.168.56.1] and it works, ubuntu can see it.
    But there's only a one thing that drives me crazy, how to make Ubuntu connect to the guest? Do I create a Wired Connection or what? because there's no network detection at all.
    Also, I checked Network Servers and I found Windows Network but when I double click it it asks me for a password, the root password not working and Windows doesn't have a password.
    Any idea?

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •