DNSMasq

DNSMasq is a lightweight DNS, TFTP and DHCP server. It is intended to provide coupled DNS and DHCP service to a LAN.
 * For DNSMasq INIT see: [[Media:DNSMasq.gz|DNSMasq INIT]]
 * See: DHCP and BOOTP Parameters

Documentation

 * DNSMasq FAQ
 * DNSMasq Setup Documentation
 * DNSMasq Manual
 * DNSMasq Configuration Example

Installing DNSMasq using Yum
With Fedora you can just install DNSMasq using yum. Since DNSMasq is designed to be able to run on a smaller router or the like, there are no dependencies needed to install. yum install dnsmasq

Installing DNSMasq from Source
The below is for version 2.46. You can check for the lates version at DNSMasq Download Site. wget http://www.thekelleys.org.uk/dnsmasq/dnsmasq-2.59.tar.gz tar -xzf dnsmasq-2.59.tar.gz cd dnsmasq-2.59 Now to compile the downloaded source: make && make install

DNSMasq INIT Script
# # . /etc/rc.d/init.d/functions . /etc/sysconfig/network [ ${NETWORKING} = "no" ] && exit 0 dnsmasq=/usr/local/sbin/dnsmasq [ -f $dnsmasq ] || exit 0 #fi RETVAL=0 case "$1" in start)        echo -n "Starting dnsmasq: "        daemon $dnsmasq $OPTIONS 	RETVAL=$?        echo        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dnsmasq        ;;  stop) if test "x`pidof dnsmasq`" != x; then echo -n "Shutting down dnsmasq: " killproc dnsmasq fi RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dnsmasq /var/run/dnsmasq.pid ;; status) 	status dnsmasq 	RETVAL=$? 	;;  reload) echo -n "Reloading dnsmasq: " killproc dnsmasq -HUP RETVAL=$? echo ;; restart) 	$0 stop 	$0 start 	RETVAL=$? 	;;  condrestart) if test "x`/sbin/pidof dnsmasq`" != x; then $0 stop $0 start RETVAL=$? fi 	   ;; *)        echo "Usage: $0 {start|stop|restart|reload|condrestart|status}"         exit 1 esac exit $RETVAL
 * 1) !/bin/sh
 * 1) Startup script for the DNS caching server
 * 1) chkconfig: - 99 01
 * 2) description: This script starts your DNS caching server
 * 3) processname: dnsmasq
 * 4) pidfile: /var/run/dnsmasq.pid
 * 1) Source function library.
 * 1) Source networking configuration.
 * 1) Check that networking is up.
 * 1) DOMAIN_SUFFIX=`dnsdomainname`
 * 2) if [ ! -z "${DOMAIN_SUFFIX}" ]; then
 * 3)  OPTIONS="-s $DOMAIN_SUFFIX"
 * 1) See how we were called.

Configuring DNSMasq
Configuring DNSMasq is pretty strait forward. The main config file (located at /etc/dnsmasq.conf)

domain-needed bogus-priv filterwin2k except-interface=eth0 cache-size=5000 domain=example.com dhcp-range=192.168.1.10,192.168.1.30,60m resolv-file=/etc/dnsmasq-resolv.conf dhcp-host=00:99:00:99:00:99,System1,192.168.1.3 dhcp-host=00:99:00:99:00:98,System2 dhcp-option=option:ntp-server,192.168.1.1 dhcp-option=vendor:MSFT,2,1i address=/system3.example.com/192.168.1.1 # (see SPF for more info) txt-record=example.com,"v=spf1 a ptr:mail.example.com -all"