Different external IP addresses to guest machines

Discussions related to using VirtualBox on Windows hosts.
Post Reply
omega1
Posts: 46
Joined: 7. Nov 2013, 12:53

Different external IP addresses to guest machines

Post by omega1 »

Hello all,

I was wondering how I could achieve this:

I have 3 external (public) IP addresses which I would like to point to my host machine and 2 guest machines (Windows XP) running on a Windows 7 host machine.

I will assume this is possible, but what would be the correct way of configuring both the host and the guest machines?

So, for example:

85.1.1.1 (example) -> Host Machine
85.1.1.2 (example) -> Guest Machine 1
85.1.1.3 (example) -> Guest Machine 2


Thank you in advance.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Different external IP addresses to guest machines

Post by socratis »

Do you have three physical network adapters? Otherwise, AFAIK, this is not possible to begin with.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
omega1
Posts: 46
Joined: 7. Nov 2013, 12:53

Re: Different external IP addresses to guest machines

Post by omega1 »

Hi, No, I do not, I only have one physical network adaptor on the host machine.

I thought that there would be some way of doing this, maybe I had assumed wrongly!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Different external IP addresses to guest machines

Post by Perryg »

Actually it is possible. You would need to be using bridged mode but the tricky part comes from where and how you get your public addresses. Something needs to route these and most providers I have noticed don't want to help a lot. They just charge you for addresses and let you figure it all out.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Different external IP addresses to guest machines

Post by socratis »

Perryg wrote:You would need to be using bridged mode
That's what I was thinking as well when I asked my question. But how can you have 3 public addresses ending up in a single network adapter? Let's say that he didn't have the guest VMs at all. Can you configure a NIC to have and to respond to 3 IPs?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Different external IP addresses to guest machines

Post by Perryg »

Sure. You can bind multiple addresses to a single NIC. But in the case of the OP look at it like this.
You have a wired/wireless router and you have a single NIC on the host. You can can get the guests on the same network (bridged) and assign addresses or let dhcp do it. The hard part is getting the provider to provide the routing unless they have a router on the client side.
omega1
Posts: 46
Joined: 7. Nov 2013, 12:53

Re: Different external IP addresses to guest machines

Post by omega1 »

Well the datacenter are offering 5 IP addresses and I only get one network port so at this stage I had assumed that all 5 IP addresses will be presented on the one .network port provided. I just don't know how to then 'separate' then at the host machine and direct then to the correct guest machine...
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Different external IP addresses to guest machines

Post by Perryg »

Here again this all depends on the provider. If they are not assigning to a specific Mac address then all you should need to do is configure the guest with bridged and configure the addresses manually on the guest/s. If that does not work then you will need to get the providers help, which like I said is hard most of the time. It is also possible to do your own routing but that gets complicated and requires a lot of knowledge. I don't do Windows anymore so I will let someone that does carry on if that is the way you need to go. Linux it would be as simple as using iptables but that doesn't do you any good.
omega1
Posts: 46
Joined: 7. Nov 2013, 12:53

Re: Different external IP addresses to guest machines

Post by omega1 »

OK, when the server is fully configured and goes to the datacentre I will ask for their help on this, but if there is anything that I should mention beforehand, I'd appreciate any further comments suggestions, thanks for all the replies and comments so far, much appreciated!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Different external IP addresses to guest machines

Post by Perryg »

It all depends on the data center and how they do things. vlan, Mac binding, Etc. All of which is doable but it will require the center to help. Hopefully you chose one that is willing to provide assistance. As far as VBox is concerned you just use Bridged. The rest is up to what ever is before the NIC.

I have seen both here. Some they don't get any upstream help and flounder and then there as those that do and are successful.

Good luck.
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Different external IP addresses to guest machines

Post by BillG »

If you have a decent router you should be able to bind all of the addresses to the router and have it map the IPs to whatever machine you like, physical or virtual.
Bill
Post Reply