Additional IP Address dedicated to one box

chrisaw

New Member
Nov 4, 2014
6
0
1
Hi guys,

I am in the process of trying to setup a Proxmox network config with the following requirements:

- Multiple dev environments with *no* public facing IP address - all sharing a single IP using NAT. This is working perfectly using the configuration below.
- One single VM using a DEDICATED IP which is external facing and is attached only to this VM. I would prefer this to be tied as directly as possible to the interface. The catch is that this server only has one physical NIC so I have two IPs routed over one NIC (hence the efforts below to add this as an alias IP.)

If anyone could point me in the right direction I would greatly appreciate it! :)

I know how to do this with eth0:0 type alias interfaces on Debian but I'm not sure how to tie that in with Proxmox.


Code:
# cat /etc/network/interfaces # network interface settings
auto lo
iface lo inet loopback


auto eth0
iface eth0 inet manual
    broadcast    94.76.xxx.xxx
    network        94.76.xxx.xx
    dns-nameservers    217.112.xx.xxx 217.112.xx.xxx

auto vmbr0
iface vmbr0 inet static
    address    94.76.xxx.xxx
    netmask    255.255.255.192
    gateway    94.76.xxx.xxx
    bridge_ports eth0
    bridge_stp off
    bridge_fd 0
    post-up ip addr add 85.234.xxx.xxx/32 dev vmbr0
    post-down ip addr del 85.234.xxx.xxx/32 dev vmbr0


auto vmbr2
iface vmbr2 inet static
    address 10.0.0.1
    netmask 255.255.255.0
    bridge_ports none
    bridge_stp off
    bridge_fd 0
    post-up iptables -A POSTROUTING -t nat -s '10.0.0.0/24' -o vmbr0 -j MASQUERADE
    post-up iptables -A POSTROUTING -t mangle -p udp --dport bootpc -j CHECKSUM --checksum-fill
    post-down iptables -D POSTROUTING -t nat -s '10.0.0.0/24' -o vmbr0 -j MASQUERADE
    post-down iptables -D POSTROUTING -t mangle -p udp --dport bootpc -j CHECKSUM --checksum-fill
 

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!