If you’re hosting Proxmox VE on a server with only one public IP, you can still create a private virtual network with NAT and DHCP for your VMs using a Linux bridge.
This guide shows how to set up a Proxmox bridge (vmbr0
) and run a DHCP server for VMs using a private subnet like 192.168.1.0/24
.
🌐 1. Configure Proxmox Bridge (vmbr0
)
Edit your host’s network config (Debian-style /etc/network/interfaces
) and add the setup for vmbr0
at the end, along with iptables for routing.
auto vmbr0
iface vmbr0 inet static
address 192.168.1.1/24
bridge_ports none
bridge_stp off
bridge_fd 0
post-up iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o enp0s31f6 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s 192.168.1.0/24 -o enp0s31f6 -j MASQUERADE
Enable IP forwarding:
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
sysctl -p
And then restart networking:
systemctl restart networking
🧭 2. Install DHCP Server
Install ISC DHCP server:
Install ISC DHCP server using the package isc-dhcp-server
with your distribution of choice.
In Debian case we can use:
apt install isc-dhcp-server -y
Edit /etc/default/isc-dhcp-server
to bind to vmbr0
:
INTERFACESv4="vmbr0"
Configure DHCP settings in /etc/dhcp/dhcpd.conf
:
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.100 192.168.1.200;
option routers 192.168.1.1;
option domain-name-servers 1.1.1.1, 8.8.8.8;
default-lease-time 600;
max-lease-time 7200;
}
Start the DHCP service:
systemctl enable --now isc-dhcp-server