Results 1 to 6 of 6

Thread: Virtualbox server not accessable from host

  1. #1
    Join Date
    Feb 2012
    Beans
    33

    Question Virtualbox server not accessable from host

    I've installed Ubuntu lamp server on a Virtualbox. The host is Ubuntu 12.04. The virtualbox server has access to internet and can ping router and host IP while getting a DHCP IP, although subnet mask is weird.
    host:
    10.0.0.21 255.255.0.0 gateway 10.0.0.2

    virtualbox server from dhcp:
    10.0.2.15 255.255.255.0 10.0.0.2

    As I said, although the subnet mask is not the same, access and pinging is fine. Network settings are set on NAT.

    BUT, when I try to access the lamp server from the host (http://10.0.2.15), I do not get access (it works from within the virtualbox, so setup and config is working).

    I tried to change virtualbox server's IP to static (10.0.0.1 255.255.0.0 gateway 10.0.0.2) with NO access to and from nowhere. No router, no host, or the other way round.

    Can someone tell me what I should do to get the virtualbox server (10.0.2.15) web accessable from host (10.0.0.21)? I need to configure a web app on the virtualbox server from the host.

  2. #2
    Join Date
    Nov 2009
    Location
    Madrid, Spain
    Beans
    1,403
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Virtualbox server not accessable from host

    I recommend to switch network settings to Bridged Adapter.

  3. #3
    Join Date
    Feb 2011
    Location
    Minnesota, United States
    Beans
    58
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Virtualbox server not accessable from host

    I agree with lmarmisa - I was going to say your NAT might be to blame with this.

  4. #4
    Join Date
    Feb 2012
    Beans
    33

    Re: Virtualbox server not accessable from host

    Thanks, but still no ping rely. Can ping the virtual box server's own IP but not the host.

  5. #5
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    8,819
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Virtualbox server not accessable from host

    If you run ifconfig on the guest, is its IP address in the same subnet as the host, which it should be if you are using bridging. If the guest still has a 10.x IP address, chances are good it is still running in NAT mode.

    You did shut down the guest before changing modes, right? You cannot change from NAT to bridged on a running guest VM.
    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

  6. #6
    Join Date
    Feb 2012
    Beans
    33

    Re: Virtualbox server not accessable from host

    thanks, I did not shutdwon and restart.

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
  •