[Dnsmasq-discuss] deleting entries from dhcp-hostsfile in dnsmasq

Simon Kelley simon at thekelleys.org.uk
Fri Apr 10 21:34:24 BST 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256



On 10/04/15 16:00, jsb wrote:
> Thanks! I tried dhcp_release. It deletes the dhcp lease from 
> /var/lib/misc/dnsmasq.leases file. However, the mac address entry 
> does not get deleted from dhcp-hostsfile. I want to make sure that 
> particular  machine gets unregistered from my dnsmasq server. In 
> order to delete this particular mac address from dhcp-hostsfile, 
> should this file be parsed? Thanks,Jay
> 
> 

The dhcp-hostfile is just an input to dnsmasq, it doesn't control the
contents of that file at all. I guess you need to find whatever is
generating that file on your system, and alter that. Note that once
the mac address has gone from  the dhcp-hostsfile, you need to send
dnsmasq SIGHUP to make it re-read the new state of the file.


Cheers


Simon.

> 
> On 09/04/15 21:34, jsb wrote:
>> Hello,I am using dhcp-hostsfile=/home/clients file to dynamically
>>  add a new system/host (mac address). Is there a way to delete a
>>  system/host mac address from this file using a command? or
>> should this file be parsed and deleted for a mac
>> address?Thanks,Jay
> 
> 
> There's a small command-line utility called dhcp_release which is
> in the directory contrib/wrt in the dnsmasq source distribution.
> It's included in Debian/Ubuntu packages, I'm not sure about other 
> distros.
> 
> That will allow you to delete an arbitrary DHCP lease.
> 
> 
> Cheers,
> 
> Simon.
> 
> 
> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJVKDPQAAoJEBXN2mrhkTWi9dIQAJCSdlUJuMN0GtK0VdHjWWuK
WtI/tplrfytYmtb+J99shFx0mQU8tmHAzNwbxDDOTTk2cK30fUugpm9ZFPy5mUY6
cJbH3iHGF1E834CukBCC5j/gZV5cIfpGgZNYXH4MjDh4PAaKDdbRvf+uTxfRGsVr
1cG9TDOGKLNHgJT5OPnaUpFcJNjDiO3jsuJbZiLT0yF086IAhJJR4OWcpDZApb6q
pipWPqwAQ8JzkiyJR8Jvs26ZcU+eja1ujBnSzKG8/y+sH7XnmjdtW7owvgBg0sA8
cFwXWLbZSssP4s+6N3s593qvQJLNkf53/f+ANBNzfX6NczBajmAcgXyzQ4Q3Zrhr
PLztdzhP2oTquJi+CXccjcL7kjRENsA4E/XWvZDbukF1/20xi2hLZYTEjWkuL0Gm
PdqFKigdLVU7ZjTUiBOnJ2EhDWXj0EGpiINUUEMci9S4q9wzweEwhxBMPGjKmzrV
O5rAjhdDcjnA679WwrohSGMP3hhGnD/fEcnvhNoIACmVy79QDU1Z+fV6o6IIjlu7
E/wGUa8UDTw1aVKex1+bt/SyEZwMznqL7+hmLx4ZoeU780tLhz+KUMb5Jth+EG6i
mUcTc5jFoZbJ7XVosB6ifKisMqv7j3bI1vJN2k0+WEBovEk4JRgcDLEhQUWJK78N
yBB1/6Yq04ftFwVoCuUu
=wYTT
-----END PGP SIGNATURE-----



More information about the Dnsmasq-discuss mailing list