I'm using Win2k3 Standard as the Host OS and Ubuntu as the guest OS.
Currently running the newest 2.1.2 VBox, but if a downgrade to previous is necessary then that's fine. I can also change to a different Linux distro, if required. Host OS is not changeable though.
My host OS has two IP addresses, both external/internet IP's. I want Windows (host) to use the first one and Linux (Guest) to use ONLY the second one for in+out communication.
How do I do this?
Edit: If all I can do is get NAT access, thats fine. As long as Guest OS only uses the 2nd IP I don't care how it's done.
Host OS has 2 IP's, how to make VBox use 2nd one?
-
Sasquatch
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
With NAT, the Guest won't be accessible from the outside unless you forward ports. It won't take your second IP.
Now if you want to use the second IP your Host has, you have to remove it from your config first, else there will be an IP conflict. Set the VM to use the HIF system and select the proper interface. Now configure the Guest with the IP address you want, and the rest of the config like Netmask, Gateway and DNS server.
Now if you want to use the second IP your Host has, you have to remove it from your config first, else there will be an IP conflict. Set the VM to use the HIF system and select the proper interface. Now configure the Guest with the IP address you want, and the rest of the config like Netmask, Gateway and DNS server.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
I'm not sure how many physical interfaces you have on your host system but this raises an interesting idea for a new feature.
VirtualBox should allow a guest OS to overtake a host interface if desired. This can be accomplished in a round about way currently. But it would be much nicer to just specify for it to take over that interface.
Anyways, as for your solution, all you need to do is select Host Interface when configuring your guest in VirtualBox. Then once your guest is booted, configure it to use the second IP address.
As previously mentioned. If you want to provide services to the outside world you will likely have to setup some kind of port forwarding depending on your network configuration.
VirtualBox should allow a guest OS to overtake a host interface if desired. This can be accomplished in a round about way currently. But it would be much nicer to just specify for it to take over that interface.
Anyways, as for your solution, all you need to do is select Host Interface when configuring your guest in VirtualBox. Then once your guest is booted, configure it to use the second IP address.
As previously mentioned. If you want to provide services to the outside world you will likely have to setup some kind of port forwarding depending on your network configuration.
(One physical IF. Other one is a fake MS loopback if.)
What I tried now is:
Ubuntu was in NAT mode using the first IP. So I set it to use the 2nd IP (it's a whole different IP series though, what gateway should I put?) and let it finish its updating thingy, then shut it down to change network settings in VBox.
I disabled the loopback interface to make sure there were no IP conflicts.
Then I set VBox to use host interface networking.
Booted VBox/Ubuntu again.
But!
As soon as Ubuntu has booted past the loading screen into where it shows the desktop, my server loses all connectivity for a bout 5 minutes at a time.
Edit: It came to life for 2 minutes again, but now it's compeltely dead.
Edit2: It came back to life again. GuestOS has no connectivity if I set it to use the 2nd IP. If I set it to DHCP/Automatic it gets the same IP as the windows interface and it works..
What I tried now is:
Ubuntu was in NAT mode using the first IP. So I set it to use the 2nd IP (it's a whole different IP series though, what gateway should I put?) and let it finish its updating thingy, then shut it down to change network settings in VBox.
I disabled the loopback interface to make sure there were no IP conflicts.
Then I set VBox to use host interface networking.
Booted VBox/Ubuntu again.
But!
As soon as Ubuntu has booted past the loading screen into where it shows the desktop, my server loses all connectivity for a bout 5 minutes at a time.
Edit: It came to life for 2 minutes again, but now it's compeltely dead.
Edit2: It came back to life again. GuestOS has no connectivity if I set it to use the 2nd IP. If I set it to DHCP/Automatic it gets the same IP as the windows interface and it works..