DHCP for second interface

Proxmox (VM)
Debian 11.7

My Proxmox server has two network cards in two separate subnets (192.168.1.0/24 and 192.168.2.0/24). One subnet (192.168.2.0/24) is an isolated network without a gateway.
But I would like to use the PiHole as a DHCP server for both subnets. Unfortunately, you cannot set up a second DHCP for a different interface under the DHCP settings. As soon as a device requests via this interface, the message "no address range available for DHCP via ens19" is logged in "Pi-hole diagnostics". Of course, if I adjust that, the same message comes up for the ens18 interface.
Is it planned that a second DHCP can be configured via the PiHole web interface? Or do I have to manually install a second instance of DNSMASQ in the system?

Thank you in advance for your support!

Pi-hole configures DHCP like so:

pi@ph5b:~ $ cat /etc/dnsmasq.d/02-pihole-dhcp.conf
###############################################################################
#  DHCP SERVER CONFIG FILE AUTOMATICALLY POPULATED BY PI-HOLE WEB INTERFACE.  #
#            ANY CHANGES MADE TO THIS FILE WILL BE LOST ON CHANGE             #
###############################################################################
dhcp-authoritative
dhcp-range=10.0.0.11,10.0.0.254,24h
dhcp-option=option:router,10.0.0.1
dhcp-leasefile=/etc/pihole/dhcp.leases
#quiet-dhcp

domain=home.dehakkelaar.nl
local=/home.dehakkelaar.nl/

If configure DHCP for the 192.168.1.0/24 network via the webGUI, you could try if creating below new config file can coexist:

/etc/dnsmasq.d/99-my-dhcp.conf

Containing below (notice I use the second network interface eth1 for tagging):

# Network2
dhcp-range=eth1,192.168.2.50,192.168.2.250,24h
domain=network2.dehakkelaar.nl,192.168.2.0/24,local

Check syntax:

pihole-FTL --test

And below to activate:

pihole restartdns

Can check whats advertised with below:

pihole-FTL dhcp-discover

If want to read up on other features that come with dnsmasq which is embedded into the pihole-FTL binary/daemon:

3 Likes

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.