0

I'm setting up an environment where I have a VM host running behind a NAT firewall and plan to install VMs with public IPs so that they can be directly accessed over the internet like in the following diagram.

https://i.stack.imgur.com/XwNEa.jpg

How would you go about connecting these two VMs to the net and how would you configure the VM host? (bridging, etc)

1 Answer 1

1

You have the right idea in setting up a bridged NIC for each of your VM guests so that your guests get assigned IP address within you subnet directly behind your firewall (there's other ways, but this is probably the easiest/most-efficient).

The real problem you face is the firewall. It really depends on your firewall's capabilities whether you can set up a DMZ or not. If you can setup a DMZ, the best option you have is to setup port forwarding setup for what ever application your guests are going to serv. With that said, it would be easier to set you servs with a satic IP.

For example: Assuming that

 #Public IP is 123.123.123.123
 VMHost 192.168.1.2
 VM1 192.168.1.3
 VM2 192.168.1.4

You might set up your firewall port forwarding as follows:

123.123.123.123:22 -> 192.168.1.2:22 #(VMHost SSH)
123.123.123.123:80 -> 192.168.1.4:80 #(VM2 Apache/HTTP)
123.123.123.123:23 -> 192.168.1.4:22 #(VM2 SSH)
2
  • Thanks for that, very helpful. There are actually two new public IPs that will be used (one for each VM) and the gateway itself has its own existing public IP too. How would the router handle having multiple public IPs behind it?
    – webo
    Aug 15, 2013 at 14:44
  • If i'm not mistaken, you would have to have a publicly facing NIC on the VMHost, bridge that NIC with the guest you desire to have public, and then set the guest to the public IP you want it to have. Somebody else may be able to better comment on this scenario though... This is without adding any additional hardware. But this forces your VMHost to be the acting firewall. Aug 15, 2013 at 21:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .