Suggestions Dns server for lan and multi lan dhcp

Would like to see a DNS server ability to add DNS records for things within my LAN.

Would also like to be able to do dhcp for multiple vlans, examples being my primary home LAN and my guest network,

Built in DNS over HTTP rather than spinning up or installing additional components.

That's up to your network configuration. vLAN is a router function so you'll have to configure your router to forward the required packets to the right interfaces.

Very likely not going to happen. We don't have the time or resources to maintain another codebase.

Thanks Dan,

i had 2 interfaces on different subnets and pihole only offered 1 dhcp range to configure.

should i see dhcp options for both interfaces?

No, after all, Pi-hole is a simple ad blocking DNS server that tries to provide an easily accessible interface also for those who are fresh to network configuration. While our interface is already very extensive, Pi-hole's interface is not and cannot be intended for all possible network configurations. After all, it is not a router software whose main focus is network configuration. I added the DHCP server a few years ago to allow Pi-hole for being used with routers with limited config options, not supporting the configuration of the local DNS server. I never thought about adding multi-interface configuration.

You can still do what you want as Pi-hole and its embedded dnsmasq daemon offers a great bunch of customization possibilities via direct config file interactions. See /etc/dnsmasq.d/
You'll find a DHCP config file herein showing you to which config lines your web frontend settings are converted. Create your own file with a different name in there (to prevent the file from being overwritten when you apply changes on the dashboard).

You can find more information about the config line syntax here: Man page of DNSMASQ

This is the relevant part for you:

-F, --dhcp-range=[tag:<tag>[,tag:<tag>],][set:<tag>,]<start-addr>[,<end-addr>|<mode>][,<netmask>[,<broadcast>]][,<lease time>]
-F, --dhcp-range=[tag:<tag>[,tag:<tag>],][set:<tag>,]<start-IPv6addr>[,<end-IPv6addr>|constructor:<interface>][,<mode>][,<prefix-len>][,<lease time>]

[...]

This option may be repeated, with different addresses, to enable DHCP service to more than one network.

That is great thanks DL6ER that is really useful to know.

just for future reference (likely for me) i now have the following dns topology which works for me

Pi Hole as primary DNS -> clear server acting as local dns server -> cloudflared as DoH proxy on udp 53

i'd like to replace the clear server with Pi Hole but don't want to loose the local dns functionality.

You may get lucky searching the forums for additional help on configuring DHCP for mutliple VLANs with Pi-hole's embedded dnsmasq.

slowlearner's approach in Extra DHCP Server Options - #5 by slowlearner seems quite detailed and helpful, if a bit verbose at the beginning. If in a hurry, just skip the verbose account of his ordeals to arrive at a solution and start reading at "WHAT YOU’LL NEED TO DO:".

I haven't tested or reenacted any of this, but it seems carefully compiled and overall conclusive to me. :wink:

1 Like

i posted a snippet of how i handle multi-vlan multi-dhcp in the above link. ymmv