<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://k2.ixota.com/index.php?action=history&amp;feed=atom&amp;title=Dnsmasq</id>
	<title>Dnsmasq - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://k2.ixota.com/index.php?action=history&amp;feed=atom&amp;title=Dnsmasq"/>
	<link rel="alternate" type="text/html" href="https://k2.ixota.com/index.php?title=Dnsmasq&amp;action=history"/>
	<updated>2026-06-26T12:57:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.1</generator>
	<entry>
		<id>https://k2.ixota.com/index.php?title=Dnsmasq&amp;diff=5003&amp;oldid=prev</id>
		<title>Kenneth: /* Clear Lease */</title>
		<link rel="alternate" type="text/html" href="https://k2.ixota.com/index.php?title=Dnsmasq&amp;diff=5003&amp;oldid=prev"/>
		<updated>2018-12-04T03:18:19Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Clear Lease&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Dnsmasq ==&lt;br /&gt;
&lt;br /&gt;
Dnsmasq - http://www.thekelleys.org.uk/dnsmasq/doc.html&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Dnsmasq is a lightweight, easy to configure DNS forwarder and DHCP server. It is designed to provide DNS and, optionally, DHCP, to a small network. It can serve the names of local machines which are not in the global DNS. The DHCP server integrates with the DNS server and allows machines with DHCP-allocated addresses to appear in the DNS with names configured either in each host or in a central configuration file. Dnsmasq supports static and dynamic DHCP leases and BOOTP/TFTP/PXE for network booting of diskless machines.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
&lt;br /&gt;
=== Manual Installation ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p ~/.src ; cd ~/.src&lt;br /&gt;
git clone git://thekelleys.org.uk/dnsmasq.git&lt;br /&gt;
cd dnsmasq&lt;br /&gt;
git checkout v2.63&lt;br /&gt;
make clean&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# installs only two files: &amp;#039;dnsmasq&amp;#039; and the man page&lt;br /&gt;
# sudo make install  # installs to /usr/local/sbin/&lt;br /&gt;
sudo make install PREFIX=/opt/dnsmasq&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# configuration files directory&lt;br /&gt;
# sudo cp dnsmasq.conf.example /etc/dnsmasq.conf&lt;br /&gt;
TFILE=`mktemp`&lt;br /&gt;
cat &amp;gt; $TFILE &amp;lt;&amp;lt;EOF&lt;br /&gt;
&lt;br /&gt;
#local-ttl=300&lt;br /&gt;
expand-hosts&lt;br /&gt;
domain=qa.onpar.net&lt;br /&gt;
#log-queries&lt;br /&gt;
conf-dir=/etc/dnsmasq.d&lt;br /&gt;
#resolv-file=/etc/resolv.conf&lt;br /&gt;
&lt;br /&gt;
EOF&lt;br /&gt;
sudo cp $TFILE /etc/dnsmasq.conf&lt;br /&gt;
rm -f $TFILE&lt;br /&gt;
sudo mkdir -p /etc/dnsmasq.d&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# startup, or use the init.d script following&lt;br /&gt;
./dnsmasq -s `dnsdomainname`&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Set the localhost or loop device on the server as a nameserver so it can use the&lt;br /&gt;
DNS service that it is running. Add the nameserver line below to the top of the list in /etc/resolv.conf.&lt;br /&gt;
 # /etc/resolv.conf:&lt;br /&gt;
 nameserver  127.0.0.1&lt;br /&gt;
&lt;br /&gt;
Add the IP address of the DNS host to the /etc/hosts for reverse DNS lookup.&lt;br /&gt;
 # /etc/hosts&lt;br /&gt;
 10.10.10.1    fw&lt;br /&gt;
&lt;br /&gt;
See [[dnsmasq-init.d]]&lt;br /&gt;
&lt;br /&gt;
=== RPM Forge ===&lt;br /&gt;
&lt;br /&gt;
 yum install dnsmasq --enablerepo=rpmforge&lt;br /&gt;
 service dnsmasq start&lt;br /&gt;
&lt;br /&gt;
=== Configuration ===&lt;br /&gt;
&lt;br /&gt;
Easy: just put what you want in /etc/hosts, and restart dnsmasq&lt;br /&gt;
&lt;br /&gt;
config files go in /etc/dnsmasq.d/&lt;br /&gt;
&lt;br /&gt;
Sample /etc/dnsmasq.conf:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# Log the results of DNS queries handled by dnsmasq&lt;br /&gt;
# NOTE: logs are logged to daemon.debug, make sure syslog captures that level.&lt;br /&gt;
log-queries&lt;br /&gt;
&lt;br /&gt;
# Local domain TTL&lt;br /&gt;
local-ttl=60&lt;br /&gt;
&lt;br /&gt;
# Never pass short names to the upstream DNS servers. &lt;br /&gt;
# If the name is not in the local /etc/hosts file then &amp;quot;not found&amp;quot; will be returned.&lt;br /&gt;
domain-needed&lt;br /&gt;
&lt;br /&gt;
# All reverse IP (192.168.x.x) lookups that are not found in /etc/hosts will be&lt;br /&gt;
# returned as &amp;quot;no such domain&amp;quot; and not forwarded to the upstream servers.&lt;br /&gt;
bogus-priv&lt;br /&gt;
&lt;br /&gt;
# We can see our local hosts via our home domain without having to&lt;br /&gt;
# repeatedly specify the domain in our /etc/hosts file.&lt;br /&gt;
expand-hosts&lt;br /&gt;
&lt;br /&gt;
# Your local domain name. It will tell the DHCP server which host to give out IP addresses for.&lt;br /&gt;
domain=example.com&lt;br /&gt;
&lt;br /&gt;
# The range of IPs that DHCP will serve: 192.168.0.20 to 192.168.0.50, with a lease time&lt;br /&gt;
# of 24 hours. The lease time is how long that IP will be linked to a host.&lt;br /&gt;
dhcp-range=192.168.0.20,192.168.0.50,24h&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
* HOWTO Use dnsmasq - http://blogging.dragon.org.uk/index.php/howtos/howto-use-dnsmasq-localhost-nameserver&lt;br /&gt;
&lt;br /&gt;
== dhcp ==&lt;br /&gt;
&lt;br /&gt;
/etc/dnsmasq.d/dhcpd.conf&lt;br /&gt;
 dhcp-range = eth0, 10.10.10.150, 10.10.10.199, 12h&lt;br /&gt;
 dhcp-host = 00:10:99:31:b7:09, 10.10.10.7, voip, 24h&lt;br /&gt;
&lt;br /&gt;
 #dhcp-host=00:10:99:31:b7:09,10.10.10.7,24h  # voip&lt;br /&gt;
 dhcp-host=00:0C:29:64:3D:2A,10.10.10.30,24h  # plex&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
* HowTo/dnsmasq - Debian Wiki - https://wiki.debian.org/HowTo/dnsmasq&lt;br /&gt;
* DNSMasq as DHCP server - DD-WRT Wiki - http://www.dd-wrt.com/wiki/index.php/DNSMasq_as_DHCP_server&lt;br /&gt;
&lt;br /&gt;
=== Clear Lease ===&lt;br /&gt;
&lt;br /&gt;
Edit the lease file and restart dnsmasq:&lt;br /&gt;
 # centos&lt;br /&gt;
 /var/lib/dnsmasq/dnsmasq.leases&lt;br /&gt;
 # ubuntu&lt;br /&gt;
 /var/lib/misc/dnsmasq.leases&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic DNS ===&lt;br /&gt;
&lt;br /&gt;
Dynamic DNS is not supported externally. [http://www.clearfoundation.com/component/option,com_kunena/Itemid,232/catid,28/func,view/id,4216/]&lt;br /&gt;
&lt;br /&gt;
== keywords ==&lt;br /&gt;
&lt;br /&gt;
[[Category:DNS]]&lt;br /&gt;
[[Category:Linux]]&lt;/div&gt;</summary>
		<author><name>Kenneth</name></author>
		
	</entry>
</feed>