dynamically generating /etc/hosts

Bmarsh bmarsh at bmarsh.com
Sun Jun 3 17:30:56 PDT 2018


I run a namesever...  which also operates as a caching  nameserver.   Very low maintenance over the years.


 



From: Lonni J Friedman via Linux-users <linux-users at linux-sxs.org>
 Subject: dynamically generating /etc/hosts
 Date: 6/3/18 7:49 PM
 To: Linux tips and tricks <linux-users at linux-sxs.org>
 CC: Lonni J Friedman <netllama at gmail.com>
 


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/20180603/86df0bf5/attachment.html>


More information about the Linux-users mailing list