Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to run the virtual box (Linux) off my Windows host, and currently trying to access the URL "local.corn.org". I edited the hosts file, adding

10.0.2.2    local.corn.org

and also tried

127.0.1.1   local.corn.org

Neither one works. The 10.0.2.2 seems to load then brings me to an "oops" page. What else needs to be done to run it off the virtual box?

Three adapters on the virtual box:

  • first one is NAT,
  • second is Host-Only,
  • third is Bridge.

EDIT: More info: I am using vagrant alongside virtual box, and I was told not to touch the actual settings for the virtual box, is there anything else that can be done on my host or do I actually have to touch the settings somehow? I am not getting any errors on vagrant either.

Also, noticed there are two new unidentified neworks on my host - being the virtual box "VirtualBox Host-Only Network" and "VirtualBox Host-Only Network #2" - and access type is No Internet Access

share|improve this question
    
Which adapter is assigned the IP 10.0.2.2? Better yet, what are the IPs of all 3 adapters? Do you have a firewall running on your Linux VM? –  heavyd Jan 28 at 0:11
    
I edited your question. Check to see whether I understood what you meant, and fix it if I didn’t. –  Scott Jan 28 at 0:15
    
Two quick things. Bridging the adapter on VMware is a common way to get to put the adapter on the same network as the host computer. Also check for a firewall on the Virtual host like previously suggested –  PsychoData Jan 28 at 0:26
    
… and please provide more information about your configuration, what you’ve tried so far, what works and what doesn’t. For example, can you get any network connectivity (e.g., ping or telnet) between the host and the client? Can you view the web page with a browser on the host? Can you view the web page from the client with a URL that contains the appropriate IP address (e.g., “httρ://10.0.2.2/…”?) Are you using “127.0.1.1” for any particular reason? –  Scott Jan 28 at 0:28
    
I updated the info –  Lion789 Jan 28 at 8:52

1 Answer 1

You may want to read "6.3. Network Address Translation (NAT)" chapter in VirtualBox networking documentation

For example, to setup SSH access on localhost:2222 to local.corn.org:22 :

VBoxManage modifyvm "VM name (local.corn.org ?)" --natpf1 "guestssh,tcp,,2222,,22"

Or for a HTTP access to a server on the virtual box host:

VBoxManage modifyvm "VM name (local.corn.org ?)" --natpf1 "guesthttpd,tcp,,80,,80"
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.