What is Dnsmasq?
DNSmasq is a small and convenient tool for configuring DNS and DHCP for small networks. It provides DNS functionality and optional DHCP functionality. It serves domain names that are only locally applicable and will not appear in DNS servers around the world. The DHCP server is combined with the DNS server and allows DHCP-assigned addresses to be properly resolved in the DNS. These DHCP-assigned addresses and related commands can be configured to each host or to a core device (such as a router). Dnsmasq supports both static and dynamic DHCP configuration.
Dnsmasq’s DHCP server supports BOOTP (Bootstrapping Protocol)/TFTP (Trivial File Transfer Protocol)/PXE (Pre-boot Execution Environment) to start diskless network devices.
DNSmasq is mainly used in home networks for NAT. It is connected to the Internet with modems, cable modems, and ADSL devices. It is a good choice for small networks (up to 1000 hosts ) that require low resource consumption and are easy to configure.
Currently supported systems include Linux (with glibc and uclibc ), BSD, Solaris, Android and Mac OS X.
Linux platforms currently supporting DNSmasq include Gentoo, Debian, Slackware, Suse, Fedora, Smoothwall, IP-Cop, floppyfw, Firebox, LEAF, Freesco, fli4l, CoyoteLinux, Endian Firewall and Clarkconnect. Also supports FreeBSD, OpenBSD and NetBSD. Also used in Cisco’s Linksys Wireless Router (dd-wrt, openwrt and the stock firmware) there is also the m0n0wall project.
1. For devices that use a firewall , DNS configuration is relatively simple and does not depend on the ISP’s DNS server.
2. When doing a DNS lookup on the client, if the modem connected to the Internet is closed, the lookup action will be suspended immediately.
3. In the device that uses the firewall, the /etc/hosts file stores the names of some hosts , and DNSmasq will provide services for these hosts. If the names of the local machines are in this file, then all the hosts are in this file. Can be served without having to maintain the /etc/hosts directory on every host.
4. The integrated DHCP server supports static and dynamic DHCP lease services, polymorphic networks and diverse IP ranges. It works through BOOTP relays and supports some DHCP options, including RFC3397, a list of DNS options. Machines configured with DHCP can automatically obtain their domain name information, which is included in the DNS. At the same time, these names can also be specified by the machine itself, or a domain name and a MAC address can be bound and stored in the DNSmasq configuration file.
5. DNSmasq puts the Internet address and address-domain mapping relationship into the cache, reducing the load on the server and improving performance (especially in modem connections).
6. DNSmasq can be configured to automatically obtain address information from the upstream domain name resolution server using PPP or DHCP configuration requests. If the information changes, it will automatically reload the information. Since it allows automatic DNS configuration, Linux firewall maintainers are interested in this software.
7. In IPv6-capable devices, DNSmasq can interact with the upstream server through Ipv6 and DNS services through IPV6 . It can also interact with two protocols in devices that support dual-stack stacks (IPV4 and IPv6). It can even complete the mutual conversion forwarding between ipv4 and IPv6.
8. DNSmasq can be configured to send specific domain name resolution requests to specific upstream servers, which can be easily combined with private DNS servers.
To download it here is the link.