Basic public IP config for guests?

I have a default install of Proxmox 3.3. I have told my ISP that intend to virtualize my hardware, and asked them if they are OK with having multiple MAC addresses on the same NIC. They say they are OK with that. I am currently using 5 public IPV4 addresses on a phyiscal machine which I intend to replace with new hardware running Proxmox.

I intend to do a P2V of the Ubuntu Server install on the old box into a VM on the new one. I'll then need to replicate the networking on that guest, which currently looks like this:


Code:
auto lo
iface lo inet loopback


auto eth0
iface eth0 inet static
        address xx.xx.40.154
        netmask 255.255.255.0
        network xx.xx.40.0
        broadcast xx.xx.40.255
        gateway xx.xx.40.1


auto eth0:0
iface eth0:0 inet static
        address xx.xx.40.155
        netmask 255.255.255.0


auto eth0:1
iface eth0:1 inet static
        address xx.xx.40.156
        netmask 255.255.255.0


In this case, what do I put in /etc/networking/interfaces if I want to run KVM guests? Right now it has the default of:

Code:
auto lo
iface lo inet loopback
iface eth0 inet manual
 
auto vmbr0
iface vmbr0 inet static
        address 192.168.10.2
        netmask 255.255.255.0
        gateway 192.168.10.1
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

So I assume I replace the vmbr0 address with that of the host (which is one of the public addresses I have), and the netmask and gateway provided by my ISP.

Can I keep the networking config the same on the guest after the P2V is complete? Will that work? I ask because I’m only going to get one chance to set this up in the data centre.

Thanks for any help. For some reason I can't find any info on this that doesn't involved more complicated things like firewalls and stuff, which I don't have.
 
Last edited:
Hello JBB,

So I assume I replace the vmbr0 address with that of the host (which is one of the public addresses I have), and the netmask and gateway provided by my ISP.

Can I keep the networking config the same on the guest after the P2V is complete? Will that work?

As far as I understood, probably yes. Here is my understanding of your configuration:


lan1.png


The host configuration will look like:



Code:
auto lo
iface lo inet loopback
iface eth0 inet manual
 
auto vmbr0
iface vmbr0 inet static
        address xx.xx.40.157
        netmask 255.255.255.0
        gateway xx.xx.40.1
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0


Kind regards

Mr.Holmes
 
Thanks, that's exactly my configuration - fingers crossed it will all come up and be OK.

take care that your pve host and all vm will be directly on the internet

Indeed - I'd like to work out a safer way of doing this, but I'm not entirely sure how to go about it in the limited time I have to install the machine. Do you know of any HOWTOs on this? For example, putting the host on a private IP and the guests behind a firewall VM?
 
Thanks, that's exactly my configuration - fingers crossed it will all come up and be OK.



Indeed - I'd like to work out a safer way of doing this, but I'm not entirely sure how to go about it in the limited time I have to install the machine. Do you know of any HOWTOs on this? For example, putting the host on a private IP and the guests behind a firewall VM?

Setup 2 bridges, one as above for your external connection, and another one attached to no physical nic.

Install a router distro, like PFSense or soemthing. Use the bridge with external as it's external connection, and use the no physical nic bridge as internal.

Setup the IP's on your VM's using a private network, and point their gateway to PFSense. Boom, nat'd.

Setup port forwards and other listening IP's as needed.

Think of it just like you would a normal network. Just becuase the boxes are virts doesn't change much.
 

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!