-1

I bought dedicated server with Windows Server 2016 in datacenter (like OVH, Hetzner, you know). I'm newbie at this, so please don't be mad if my questions are dumb.

Main purpose of it's server is to run accountant&sales software, but I also want to have two VM. First for telephony PBX, second to host corporate sites, all on different Public IPs.

Provider also gave me multiple public IPs (5 on subnet, if be precise). I ask him how to route this IP's to VMs, and he said "You should route it by yoursel with you main server".

So here my question: how at all I should do that? Where I should put this IP's, what changes should I make on my server, how should I configure VMs to be accessible from external IP?

My server have 2 network cards, first have static IP (first from subnet, like 188.54.26.12), another have some strange IP from very differen subnet (like 164.25..)

I can use Hyper-V or VMware Workstartion, no matter.

1 Answer 1

0

So if you want to provide access from your VMs to the outside (internet) and vice versa you have options: One can be to use a external vSwitch (in Hyper-v) and your VMs connect to it so they can share the same host subnet but in this case you waste your public IP space assigned and there are some security concerns. Another (and more suitable) option is to create a NAT switch on the host (Windows Server) and connect your VMs to it so they have access to the internet. You can take a look at this link on how to configure a NAT switch. If you have further questions let me know.

Edit: In case you want to set up the external switch (in Hyper-V manager console) look for the virtual switch manager and create one that links to your physical network adapter. Once you create this just configure the VMs network adapter(s) to use the vSwitch you created before. Finally, inside the VMs set the IP addresses accordingly with public IP space you've been assigned.

3
  • In case you decide to use a NAT vSwitch and want to provide access to some services in the VMs from outside you can use the following powershell cmdlet Add-NetNatStaticMapping. You can see the reference here docs.microsoft.com/en-us/powershell/module/netnat/… Nov 8, 2018 at 17:50
  • Could you tell me more about first path (external switch), cause I think it's what I need. My VMs need static IPs too.
    – Capybarro
    Nov 9, 2018 at 3:07
  • I've edited my answer to include the explanation of the first method. Let me know if you need me to elaborate on this. Nov 9, 2018 at 3:19

You must log in to answer this question.

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