[Dnsmasq-discuss] Have DNSMasq only assign addresses if there is a corresponding entry in /etc/hosts?
Maurice Walker
mail at maurice-walker.com
Tue Jul 18 18:47:33 BST 2017
On 18.07.2017 16:00, James Lacy wrote:
> Is there a way to have DNSMasq assign an address only if a client has a
> hostname that corresponds to an entry in /etc/hosts?
Disable dynamic allocation and specify the hostnames which are allowed to be
allocated an IP address:
--dhcp-range=<start-addr>,static
--dhcp-host=<hostname1>
--dhcp-host=<hostname2>
You could also list the hostnames in a file (or let a script do that) and let
dnsmasq read it:
--dhcp-hostsfile=<path>
Either way the associated IP addresses will be read from /etc/hosts.
More information about the Dnsmasq-discuss
mailing list