|
# /usr/local/etc/dnsmasq.conf |
|
|
|
# -------------------------------------------------------------------- |
|
# DNSMASQ General Configuration |
|
# -------------------------------------------------------------------- |
|
|
|
except-interface=eth0 # Ignore requests on WAN if |
|
|
|
|
|
# -------------------------------------------------------------------- |
|
# DHCP Configuration |
|
# -------------------------------------------------------------------- |
|
|
|
# Declare address range used DHCP |
|
dhcp-range=172.17.0.30,172.17.0.196,255.255.255.0,24h |
|
|
|
# DHCP Options |
|
# - Default Gateway, this way out! |
|
# - DNS Server, use this machine |
|
# - NTP Server, use this machine |
|
dhcp-option=3,172.17.0.1 |
|
dhcp-option=6,0.0.0.0 |
|
dhcp-option=option:ntp-server,0.0.0.0 |
|
|
|
# OPTIONAL: To advertise DHCP on a VLAN (eg. 10), use this: |
|
dhcp-range=VLAN10,172.17.81.30,172.17.81.196,255.255.255.0,24h |
|
dhcp-option=VLAN10,3,172.17.81.1 |
|
dhcp-option=VLAN10,6,0.0.0.0 |
|
dhcp-option=VLAN10,option:ntp-server,0.0.0.0 |
|
|
|
# OPTIONAL: To advertise DHCP on an interface, use this: |
|
dhcp-range=interface:eth0,192.168.1.128,192.168.1.254,24h |
|
dhcp-range=interface:eth1,192.168.2.128,192.168.2.254,24h |
|
|
|
# OPTIONAL: track lease changes |
|
# dhcp-script=/usr/bin/logger # Sends to local logger |
|
# dhcp-script=/usr/local/bin/dhcp2log # Executable script (see file) |
|
|
|
|
|
# -------------------------------------------------------------------- |
|
# DNS Configuration within |
|
# -------------------------------------------------------------------- |
|
|
|
# Daemon resolv: don't use it |
|
# Can use resolv if getting DNS from WAN DHCP (or use your own settings, see next) |
|
no-resolv |
|
|
|
# Nameservers |
|
# - This goes through name servers in strict order |
|
server=1.1.1.1 |
|
server=8.8.8.8 |
|
strict-order |
|
|
|
# Name Request Management |
|
# - Never forward plain names without a dot or domain part |
|
# - Never forward addresses in the non-routed address spaces |
|
# - Automatically append domain to simple hosts |
|
domain-needed |
|
bogus-priv |
|
expand-hosts |
|
|
|
# FQDN & Set DHCP Option Domain & Default for expand-hosts |
|
# Converts myhost to myhost.lan |
|
domain=lan |
|
|
|
|
|
# -------------------------------------------------------------------- |
|
# Static DHCP and Hostname assignments |
|
# -------------------------------------------------------------------- |
|
|
|
# Examples: |
|
# dhcp-host=BC:24:11:DF:A3:5E,172.17.0.25,scanner,24h |
|
# dhcp-host=BC:24:11:7B:0F:D8,mail-server,24h |
|
|
|
# These can be moved to /etc/hosts and/or /etc/ethers |
|
# Add items here, if required, and consider using /etc/ |
|
# as DB if other kernal programs use them, too. |
|
|
|
|
|
# -------------------------------------------------------------------- |
|
# Prevent WPAD CERT Vulnerability |
|
# -------------------------------------------------------------------- |
|
|
|
# If a DHCP client claims that its name is "wpad", ignore that. |
|
# This fixes a security hole. see CERT Vulnerability VU#598349 |
|
dhcp-name-match=set:wpad-ignore,wpad |
|
dhcp-ignore-names=tag:wpad-ignore |