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.

Situation

My host operating system, Windows 8, is running VirtualBox with a guest operating system Linux Mint. The guest operating system runs a web server used for development purposes.

I regularly transport my computer between work, home, and school and therefore connect it to different networks. At work, I plug the computer into an Ethernet connection. At home and school, I connect to the University's wireless network which is a WPA2 Enterprise network.

Goal

I'd like to be able to access the web server from the host operating system no matter where I am connected. It would be great if the address remained constant, and personally I would prefer IPv6.

Everything is fine when I'm at work, I can access the guest OS with its IPv4 or link-local IPv6 address over a bridged connection with my Ethernet adapter on my physical machine.

At home/school, I can sometimes access the guest OS with its IPv6 address. I go into the virtual machine settings, change the bridged connection on adapter 2 to my wireless adapter on my physical machine, and reset the adapter on the virtual machine by using ifconfig eth1 down and ifconfig eth1 up. The guest OS does not even receive an IPv4 address when I do this, but the link-local IPv6 address sometimes still works.

Also, eth0 on the virtual machine is a NAT connected adapter to enable Internet access in the virtual machine (to do updates, etc.)

Other attempts

  • Ensured that my wireless connection to the University network is connected prior to switching the network adapters. This behaviour seems to be independent of that.
  • Restarting both the host and guest operating systems
  • Resetting both eth0 and eth1 on the virtual machine
  • Disabling IPv4

I've also looked into creating a Host-only network, however that seems to fail even though I gave the guest machine a static IPv4 address.

Alternative

I can VPN into the work network from anywhere and bridge my connection to the VPN adapter, but that is unfeasible as the connection is not very stable and can be quite slow at times. Also, being connected through VPN on the host operating system means that my Modern UI apps will be disconnected from the Internet.

Questions

  1. Why does the link-local IPv6 address sometimes work when I'm on the wireless network?
  2. Can I make this work all the time? If yes, how?
  3. Out of curiosity, why can my host OS access a link-local IPv6 address for the guest OS?
share|improve this question

1 Answer 1

up vote 1 down vote accepted

Simplest solution to question n.2 is the Host-only network. Go to Files -> Preferences -> Network, add a host-only network, then hit the screwdriver, -> DHCP server, leave that enabled and narrow down the range of internal IP addresses to be given to local machines to just one address. Also, make sure that the guest is endowed with a proper ethernet IF, and that network manager and ssh daemon and whatever else you require is started at boot.

In this way you will have a permanent solution.

share|improve this answer
    
Thanks, the DHCP thing was what I needed. –  rink.attendant.6 Sep 26 '13 at 23:34

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.