Single IP with multiple vms

Joe_F

Member
Jun 26, 2019
21
0
6
20
I have 3 windows vms with one single shared IP address how do I setup the networking to share this address?
At the moment the virtual nic is showing but I don't know how to configure any of the rest of it.
 
I have 3 windows vms with one single shared IP address how do I setup the networking to share this address?
At the moment the virtual nic is showing but I don't know how to configure any of the rest of it.
AFAIU you mean you have one public IP an3 3 VMs which should have access to internet via that public IP.

Assign the public IP you have to host's physical NIC and create a bridge without physical NIC for being attached from the Windows VMs. After configuring this via GUI add into /etc/network/interfaces NAT (MASQUERADE) and routing enabled, see example at https://pve.proxmox.com/wiki/Networ...ith_tt_span_class_monospaced_iptables_span_tt
 
I have set it up in iptables, linked the vm to use it and entered the network config into the vm but it still has no network?
 
I have set it up in iptables, linked the vm to use it and entered the network config into the vm but it still has no network?

You must not forget to set the proper IP address default gateway in the VMs, in the above mentioned example it would be 10.10.10.2,3 etc. and 10.10.10.1

If these settings are correct follow the IP packets then by tcpdump respectively wireshark in Windows. If you make e.g. a ping from a VM to 8.8.8.8 it should start with ARP request for 10.10.10.1 an then send the ICMP message from VM to gateway which should forward it - after an ARP request to 198.51.100.1- to the internet router.
 
I also cannot get it to work either with a dedicated IP or sharing the hosts.
 
The interfaces file.
 

Attachments

  • Screenshot_20190627-121456_JuiceSSH.jpg
    Screenshot_20190627-121456_JuiceSSH.jpg
    607.3 KB · Views: 120
or if you are on kimsufi hosting try this. I used this video to create vms on a local network and then forwarded only selected ports to each vm like one was a webserver to it got 80 and 443 another was a game server so it got 27015 etc very cool way to use only one public static ip and forward ports to local internet network via iptables thanks guys! https://www.youtube.com/watch?v=GBMbo4u8K1Q
 
or if you are on kimsufi hosting try this. I used this video to create vms on a local network and then forwarded only selected ports to each vm like one was a webserver to it got 80 and 443 another was a game server so it got 27015 etc very cool way to use only one public static ip and forward ports to local internet network via iptables thanks guys! https://www.youtube.com/watch?v=GBMbo4u8K1Q
No longer available.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!