Dhcp client and dns resolv

Hello everyone, in addition to the release of the ip by booking I wanted to know how to vary the dns with other dns on a client that is on the booking list. E.g. booking on a client dns ( (nethserver ) ) with dns ( ) . thanks

You can set the clients DNS servers in advanced DHCP options when enabling DHCP on an interface:

See also DHCP and PXE server — NethServer 7 Final

1 Like

Hi Markuz !! I expressed myself badly. To me server only for some clients and not for all . In short, if you connect a certain host, an IP and a dns are booked for him, which I decide only for him.

That’s not supported in the UI.
Of course it could work with a custom template, see domain name system - Per-client DNS servers with DNSMasq - Server Fault for more info.

Thanks, but unfortunately I’m not able to create a custom template, to date I haven’t figured out how to create them!

I never tested it but it should work like this:

Create custom template dir:

mkdir -p /etc/e-smith/templates-custom/etc/dnsmasq.conf

Create /etc/e-smith/templates-custom/etc/dnsmasq.conf/91hosts with following (example) content.
Just create dhcp-host entries (check MAC addresses) as you like and set the wanted DNS servers with the last option.

# host A
# host B
# set dns servers for specialhosts to Neth and google.

Apply config:

signal-event nethserver-dnsmasq-update

See also Allow users to add extra dnsmasq options


Thank you Markuz, kind as always. I know I should learn template management , in order to be able to customize nethserver even better . I will try what you indicated to me as soon as possible. At the moment thank you!