I have several windows VMs on a remote linux server. I need to know, if it possible to share a single public IP address to those virtual machines? and also how?
Can you please help me on this?
Thank you !
Can you give us a bit more information about how you intend to use the public IP. Will it be hosting externally reachable services or will it just be used for outbound NAT?
I need the public ip be the only ip declared in the VM and it will be used for externally reachable service
You cant use the same public IP inside multiple VMs. You could perhaps use NAT rules on the host combined with statically allocated private bridge IPs to forward certain ports from the host’s public IP to the VM (although the VM would see its private IP as its address).
Alternatively if you have multiple public IPs, then you could use a NIC type like
macvlan to connect the VM directly to the external network and setup the public IP inside the VM.