Create NAT Bridge in Proxmox

Tested on Proxmox on Debian 8.

  1. Modify /etc/network/interfaces to add NAT iptables
    /etc/network/interfaces
    auto vmbr1
    iface vmbr1 inet static
            address  100.64.43.1
            netmask  255.255.255.0
            bridge_ports none
            bridge_stp off
            bridge_fd 0
            post-up echo 1 > /proc/sys/net/ipv4/ip_forward
            post-up   iptables -t nat -A POSTROUTING -s '100.64.43.0/24' -o eth0 -j MASQUERADE
            post-down iptables -t nat -D POSTROUTING -s '100.64.43.0/24' -o eth0 -j MASQUERADE
  2. Install dnsmasq
    apt install -y dnsmasq
  3. Modify /etc/dnsmasq.d/config
    /etc/dnsmasq.d/config
    domain-needed
    bogus-priv
    local=/cloud/
    domain=cloud
    dhcp-fqdn
    interface=vmbr1
    bind-interfaces
    dhcp-range=100.64.43.200,100.64.43.250,72h
    dhcp-option=option:router,100.64.43.1
    dhcp-option=option:dns-server,100.64.43.1
  4. If IPv6 is available, append this snippets
    /etc/dnsmasq.d/config
    enable-ra
    dhcp-range=2001:xxxx:xxxx:xxxx::1000,2001:xxxx:xxxx:xxxx::1fff
    dhcp-option=option6:dns-server,[2001:xxxx:xxxx:xxxx::]
  5. Enable and start dnsmasq
    systemctl enable dnsmasq
    systemctl restart dnsmasq