Dnsmasq Explained

dnsmasq
Logo Size:125px
Logo Alt:dnsmasq logo
Developer:Simon Kelley
Programming Language:C[1]
Operating System:Unix-like
Genre:DNS server
License:GNU General Public License Version 2 or 3[2]

dnsmasq is free software providing Domain Name System (DNS) caching, a Dynamic Host Configuration Protocol (DHCP) server, router advertisement and network boot features, intended for small computer networks.[3] [4]

dnsmasq has low requirements for system resources,[5] [6] can run on Linux, BSDs, Android and macOS, and is included in most Linux distributions. Consequently, it "is present in a lot of home routers and certain Internet of Things gadgets" and is included in Android.

Details

dnsmasq is a lightweight, easy to configure DNS forwarder, designed to provide DNS (and optionally DHCP and TFTP) services to a small-scale network. It can serve the names of local machines which are not in the global DNS.

dnsmasq's DHCP server supports static and dynamic DHCP leases, multiple networks and IP address ranges. The DHCP server integrates with the DNS server and allows local machines with DHCP-allocated addresses to appear in the DNS. dnsmasq caches DNS records, reducing the load on upstream nameservers and improving performance, and can be configured to automatically pick up the addresses of its upstream servers.

dnsmasq accepts DNS queries and either answers them from a small, local cache or forwards them to a real, recursive DNS server. It loads the contents of /etc/hosts, so that local host names which do not appear in the global DNS can be resolved. This also means that records added to your local /etc/hosts file with the format "0.0.0.0 annoyingsite.com" can be used to prevent references to "annoyingsite.com" from being resolved by your browser. This can quickly evolve to a local ad blocker when combined with adblocking site list providers. If done on a router, one can efficiently remove advertising content for an entire household or company.

dnsmasq supports modern Internet standards such as IPv6 and DNSSEC, network booting with support for BOOTP, PXE and TFTP and also Lua scripting.

Some Internet service-providers rewrite the NXDOMAIN (domain does not exist) responses from DNS servers, which forces web browsers to a search page whenever a user attempts to browse to a domain that does not exist. dnsmasq can filter out these "bogus" NXDOMAIN records, preventing this potentially unwanted behavior.

See also

External links

Notes and References

  1. Web site: Dnsmasq . live . https://web.archive.org/web/20141129025038/https://www.openhub.net/p/dnsmasq . 29 November 2014 . 19 November 2014 . Open Hub . Black Duck Software.
  2. Web site: Dnsmasq - network services for small networks . live . https://web.archive.org/web/20110504224910/http://www.thekelleys.org.uk/dnsmasq/doc.html . 4 May 2011 . 19 November 2014.
  3. Web site: Thomson . Iain . 2 October 2017 . Dnsmasq and the seven flaws: Patch these nasty remote-control holes . live . https://web.archive.org/web/20171004185034/http://www.theregister.co.uk/2017/10/02/dnsmasq_flaws/ . 4 October 2017 . 5 October 2017 . The Register.
  4. Web site: Goodin . Dan . 3 October 2017 . Code-execution flaws threaten users of routers, Linux, and other OSes . live . https://web.archive.org/web/20171005004155/https://arstechnica.com/information-technology/2017/10/code-execution-flaws-threaten-users-of-routers-linux-and-other-oses/ . 5 October 2017 . 5 October 2017 . Ars Technica.
  5. Web site: dnsmasq . live . https://web.archive.org/web/20141129031542/https://wiki.debian.org/HowTo/dnsmasq . 29 November 2014 . 19 November 2014 . Debian Wiki.
  6. Web site: dnsmasq . live . https://web.archive.org/web/20140924132858/https://wiki.archlinux.org/index.php/Dnsmasq . 24 September 2014 . 19 November 2014 . Arch Linux Wiki.