Skip to content

dnsmasq: The Swiss Army Knife of DNS and DHCP Servers

Explore the versatility of dnsmasq with this comprehensive guide. Learn how to install dnsmasq on Gentoo, launch a temporary TFTP server, and harness its wide range of features for DNS and DHCP services.


Install net-dns/dnsmasq
echo "net-dns/dnsmasq auth-dns conntrack dbus dhcp-tools dnssec script tftp" \ 
  > /etc/portage/package/use/dnsmasq
emerge --ask net-dns/dnsmasq

Launch a temporary tftp server

ifconfig eno1 192.168.1.3 netmask 255.255.255.0
echo "nameserver 192.168.1.1" > /etc/resolv.conf
dnsmasq \
  --user=root \
  --no-daemon \
  --listen-address 192.168.1.3 \
  --bind-interfaces \
  -p0 \
  --dhcp-authoritative \
  --dhcp-range=192.168.1.4,192.168.1.100 \
  --bootp-dynamic \
  --dhcp-boot=15516436r1361008closed.rbi \
  --log-dhcp \
  --enable-tftp \
  --tftp-root=/mnt/usb/firmware/technicolor/VANT-R_Telia/old/