Skip to main content

Setup DHCP for guests on proxmox host

apt install dnsmasq

/etc/dnsmasq.d/vmbr0.conf

interface=vmbr0
dhcp-range=10.10.10.50,10.10.10.200,12h
dhcp-option=3,10.10.10.1
dhcp-option=6,9.9.9.9,149.112.112.112


/etc/network/interfaces

auto vmbr0
iface vmbr0 inet static
   address 10.10.10.1/24
   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 '10.10.10.0/24' -o $enp0s31f6 -j MASQUERADE
   post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o $enp0s31f6 -j MASQUERADE


$enp0s31f6 = ethernet interface