We are in the process of migrating this forum. A new space will be available soon. We are sorry for the inconvenience.

Assigning IP to Proxmox KVM VPS


Myatu
08-04-2014, 18:08
For starters, you don't want to use a private IP address range on a public interface (vmbr0). That's what vmbr1 is for. And within Proxmox, you can assign a failover IP address - when using venet, nothing special is needed, when using veth, then you must assign it a "vMAC" that you've created from within your OVH Manager first. Then once you've done that, you need to go inside the guest, and set it up manually - or alternatively use a startup script / management tool like Puppet or Chef. DHCP would not likely work well, due to the netmask being used, but you can try that as well.

kengimel
08-04-2014, 05:18
It has been easy to assign via venet, an OVH failover public IP via the webGUI tool which is very quickly picked up.

But now having read the Network Model wiki..

I use the below to establish connection from the KVM VPS to the host proxmox server.


post-up echo 1 > /proc/sys/net/ipv4/ip_forward # These are important for NAT access to internet for VMs
post-up iptables -t nat -A POSTROUTING -s '10.0.0.0/24 -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.0.0.0/24 -o vmbr0 -j MASQUERADE

My question now is.. how can one allocate a public IP to a KVM based VPs. Can this assign be automated ?