dynamically generating /etc/hosts

The Small Box Admin smallboxadmin at gmail.com
Mon Jun 4 21:14:44 PDT 2018


Can you use dnsmasq to provide both DHCP and /etc/hosts (single file for
local stuff), and forwarding DNS queries?

I don't think I've seen /etc/hosts being populated the way you want.

Ken

On Sun, Jun 3, 2018 at 4:44 PM, Lonni J Friedman via Linux-users <
linux-users at linux-sxs.org> wrote:

> My home network has an assortment of Linux systems, which get their IP
> assignment via an ISC dhcpd server (also running on Linux).  The dhcp
> leases are handed out based on the MAC address of the client, such
> that they always get the same IP address assignment.
>
> However, I'd like to be able to generate an /etc/hosts file on all of
> the clients that has the IP & hostname associations based on the dhcp
> leases.  This is where I'm not finding any solutions which don't
> require running a namserver of some sort too.
>
> Anyone have any experience with this sort of thing (generating
> /etc/hosts on clients)?
>
> thanks!
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> L. Friedman                                    netllama at gmail.com
> LlamaLand                       http://netllama.linux-sxs.org
> _______________________________________________
> Linux-users mailing list
> Linux-users at linux-sxs.org
> http://mailman.celestial.com/mailman/listinfo/linux-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.celestial.com/pipermail/linux-users/attachments/20180604/6ea0e634/attachment.html>


More information about the Linux-users mailing list