From Wikipedia, the free encyclopedia
Jump to: navigation, search
Dnsmasq logo
Developer(s) Simon Kelley
Initial release 2001; 17 years ago (2001)
Stable release
2.78[1] / 2 October 2017; 4 months ago (2017-10-02)
Preview release
Repository Edit this at Wikidata
Development status Active
Written in C[2]
Operating system Unix-like
Type DNS server
License GNU General Public License Version 2 or 3[3]
Website www.thekelleys.org.uk/dnsmasq/doc.html

Dnsmasq provides Domain Name System (DNS) forwarder, Dynamic Host Configuration Protocol (DHCP) server, router advertisement and network boot features for small computer networks, created as free software.[4][5]

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


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 " 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 such as mvps.org[8]. If done on your router, you 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[edit]


  2. ^ "Dnsmasq". Open Hub. Black Duck Software. Retrieved 19 November 2014. 
  3. ^ "Dnsmasq". Official Website. Retrieved 19 November 2014. 
  4. ^ a b "Dnsmasq and the seven flaws: Patch these nasty remote-control holes". The Register. 2 October 2017. Retrieved 5 October 2017. 
  5. ^ a b "Code-execution flaws threaten users of routers, Linux, and other OSes". Ars Technica. 3 October 2017. Retrieved 5 October 2017. 
  6. ^ "HowTo dnsmasq". Debian Wiki. Retrieved 19 November 2014. 
  7. ^ "dnsmasq". Arch Linux Wiki. Retrieved 19 November 2014. 
  8. ^ mvps.org

External links[edit]