dnsmasq – Lightweight DNS and DHCP Server

dnsmasq is a lightweight DNS forwarder and DHCP server designed for small networks. It provides...

Networking Tools Linux Open Source

dnsmasq is a lightweight DNS forwarder and DHCP server designed for small networks. It provides DNS caching, DHCP services, and network booting capabilities in a single, easy-to-configure package, making it perfect for home networks, small offices, and development environments.

Key Features

  • DNS Caching – Speeds up DNS lookups
  • DHCP Server – Automatic IP assignment
  • TFTP Server – Network booting support
  • Simple Configuration – Single config file

Installation

sudo apt install dnsmasq    # Debian/Ubuntu
sudo dnf install dnsmasq    # Fedora/RHEL

Basic Configuration

# /etc/dnsmasq.conf
listen-address=127.0.0.1,192.168.1.1
interface=eth0
dhcp-range=192.168.1.100,192.168.1.200,24h
server=8.8.8.8
server=8.8.4.4
cache-size=1000

# Start service
sudo systemctl enable --now dnsmasq

Download dnsmasq

Was this article helpful?