Configuring DHCP/DNS with dnsmasq

Single Network DHCP server using dnsmasq

The reader is expected to know what DHCP is, here are simply sample configuration files for basic usage reference.

# Start,Stop,Mask,Lease
dhcp-range=10.0.0.32,10.0.0.248,255.255.255.0,2h
# Gateway
dhcp-option=3,10.0.0.1
# DNS
dhcp-option=6,10.0.0.1
# Domain Name
dhcp-option=15,dhcp.edoceo.com
# IP Forward (no)
dhcp-option=19,0
# Source Routing
dhcp-option=20,0
# TTL
# dhcp-option=23,64
# Broadcast Address
# dhcp-option=28,10.0.0.255
# 0.0.0.0 Means to reference self for this option

# NTP Server
dhcp-option=42,0.0.0.0

# 44-47 NetBIOS
dhcp-option=44,0.0.0.0
dhcp-option=45,0.0.0.0
dhcp-option=46,8
dhcp-option=47

dhcp-authoritative

See Also

ChangeLog

The reader is expected to know what DNS is, here are simply sample configuration files for basic usage reference.

dnsmasq DNS

The example below is only part of the /etc/dnsmasq.conf file, there may be some DHCP Options present.

bogus-priv
# maybe make larger
cache-size=512
# block silly requests
domain-needed
filterwin2k
# enable to see queries in syslog
# log-queries
# disable polling resolve
# no-poll
# disable resolv.con
# no-resolv
# Use OpenDNS
# Can make specific servers here and not use resolv.conf
server=208.67.222.222
server=208.67.220.220
# include another configuration
conf-file=/etc/dnsmasq-adblock.conf