I have a single server that is running some VMs. I want each of these VMs to be accessed through public IP addresses correspondingly. I'm looking into hosting the server on my own and get a block of IPs from my ISP, or by putting it in a colocation center.

My questions are:

  1. If I'm hosting this on my own, I would need a router to plug in to the WAN and plug the server to the router. What do I do next? Do I need to manually specify the public IPs in the router, and how then the VMs pick up from those addresses? Do I need to manually assign each public IP to the VMs LAN IP or it can happen somehow automatically?
  2. If I'm putting the server in colocation center, I presume I don't need a router, because the server will be plugged to the colocation center's router, or am I wrong? And then the same question from 1) comes up, how do my VMs pick up from the public IPs I bought.

1 Answer 1


Yes you will have to assign the public IP's yourself.


Server A: gateway:

Server B: gateway:


You could just bridge the virtual switch of the hypervisor with the ISP switch. This does depend on how your ISP brings in the network segment. It is quite common that you get a switch on which they route the addresses.

It is also quite common that you will receive a modem/router that has to be set in bridge mode so that it will passthrough all its traffic to a machine behind it. Placing the virtual switch of the HV behind that might or might not work depending on the modem/router. Otherwise a single device will have to be placed behind it.

The latter would require you to place a (virtual) firewall behind the bridged modem/router and bind the public IP's to that machine. There you could use NAT to expose the required services via the public IP's Personally I would use Pfsense for that but any will do.

Without knowing what your ISP will provide this is a lot of guess work and assumption on my end. What I can say for sure is that none of this is an automatic process and that it will require setup on your end.

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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