dnsmasq

From RaySoft

dnsmasq provides network infrastructure for small networks: DNS, DHCP, router advertisement and network boot. It is designed to be lightweight and have a small footprint, suitable for resource constrained routers and firewalls. It has also been widely used for tethering on smartphones and portable hotspots, and to support virtual networking in virtualisation frameworks. Supported platforms include Linux, Android, *BSD, and Mac OS X. dnsmasq provides full IPv6 support.[1]

Documentation

Installation & Configuration

Syntax

dnsmasq [PARAMETER ...]

Parameters

--log-dhcp
Extra logging for DHCP: log all the options sent to DHCP clients and the tags used to determine them.
-q, --log-queries
Log the results of DNS queries handled by dnsmasq. Enable a full cache dump on receipt of SIGUSR1. If the argument extra is supplied, i.e. --log-queries='extra' then the log has extra information at the start of each line. This consists of a serial number which ties together the log lines associated with an individual query, and the IP address of the requestor.
-d, --no-daemon
Debug mode: don't fork to the background, don't write a pid file, don't change user id, generate a complete cache dump on receipt on SIGUSR1, log to stderr as well as syslog, don't fork new processes to handle TCP queries.
NOTE:
This option is for use in debugging only, to stop dnsmasq daemonising in production, use --keep-in-foreground.
--test
Read and syntax check configuration file(s). Exit with code 0 if all is OK, or a non-zero code otherwise. Do not start up dnsmasq.

Examples

Validate the configuration
dnsmasq --test
Debug
dnsmasq --log-dhcp --log-queries='extra' --no-daemon

killall -USR1 'dnsmasq'

References