1ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Configuration file for dnsmasq.
2ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#
3ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Format is one option per line, legal options are the same
4ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# as the long options legal on the command line. See
5ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details.
6ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
7ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# The following two options make you a better netizen, since they
8ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# tell dnsmasq to filter out queries which the public DNS cannot
9ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# answer, and which load the servers (especially the root servers)
10ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# uneccessarily. If you have a dial-on-demand link they also stop
11ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# these requests from bringing up the link uneccessarily.
12ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
13ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Never forward plain names (without a dot or domain part)
14ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#domain-needed
15ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Never forward addresses in the non-routed address spaces.
16ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#bogus-priv
17ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
18ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
19ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Uncomment this to filter useless windows-originated DNS requests
20ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# which can trigger dial-on-demand links needlessly.
21ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Note that (amongst other things) this blocks all SRV requests,
22ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# so don't use it if you use eg Kerberos, SIP, XMMP or Google-talk.
23ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# This option only affects forwarding, SRV records originating for
24ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# dnsmasq (via srv-host= lines) are not suppressed by it.
25ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#filterwin2k
26ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
27ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Change this line if you want dns to get its upstream servers from
28ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# somewhere other that /etc/resolv.conf
29ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#resolv-file=
30ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
31ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# By  default,  dnsmasq  will  send queries to any of the upstream
32ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# servers it knows about and tries to favour servers to are  known
33ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# to  be  up.  Uncommenting this forces dnsmasq to try each query
34ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# with  each  server  strictly  in  the  order  they   appear   in
35ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# /etc/resolv.conf
36ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#strict-order
37ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
38ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# If you don't want dnsmasq to read /etc/resolv.conf or any other
39ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# file, getting its servers from this file instead (see below), then
40ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# uncomment this.
41ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#no-resolv
42ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
43ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv
44ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# files for changes and re-read them then uncomment this.
45ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#no-poll
46ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
47ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Add other name servers here, with domain specs if they are for
48ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# non-public domains.
49ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#server=/localnet/192.168.0.1
50ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
51ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Example of routing PTR queries to nameservers: this will send all 
52ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# address->name queries for 192.168.3/24 to nameserver 10.1.2.3
53ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#server=/3.168.192.in-addr.arpa/10.1.2.3
54ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
55ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Add local-only domains here, queries in these domains are answered
56ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# from /etc/hosts or DHCP only.
57ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#local=/localnet/
58ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
59ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Add domains which you want to force to an IP address here.
60ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# The example below send any host in doubleclick.net to a local
61ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# webserver.
62ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#address=/doubleclick.net/127.0.0.1
63ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
64ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# --address (and --server) work with IPv6 addresses too.
65ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#address=/www.thekelleys.org.uk/fe80::20d:60ff:fe36:f83
66ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
67ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# You can control how dnsmasq talks to a server: this forces 
68ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# queries to 10.1.2.3 to be routed via eth1
69ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# --server=10.1.2.3@eth1
70ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
71ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# and this sets the source (ie local) address used to talk to
72ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# 10.1.2.3 to 192.168.1.1 port 55 (there must be a interface with that
73ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# IP on the machine, obviously).
74ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# --server=10.1.2.3@192.168.1.1#55
75ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
76ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# If you want dnsmasq to change uid and gid to something other
77ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# than the default, edit the following lines.
78ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#user=
79ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#group=
80ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
81ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# If you want dnsmasq to listen for DHCP and DNS requests only on
82ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# specified interfaces (and the loopback) give the name of the
83ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# interface (eg eth0) here.
84ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Repeat the line for more than one interface.
85ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#interface=
86ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Or you can specify which interface _not_ to listen on
87ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#except-interface=
88ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Or which to listen on by address (remember to include 127.0.0.1 if
89ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# you use this.)
90ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#listen-address=
91ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# If you want dnsmasq to provide only DNS service on an interface,
92ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# configure it as shown above, and then use the following line to
93ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# disable DHCP on it.
94ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#no-dhcp-interface=
95ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
96ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# On systems which support it, dnsmasq binds the wildcard address,
97ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# even when it is listening on only some interfaces. It then discards
98ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# requests that it shouldn't reply to. This has the advantage of
99ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# working even when interfaces come and go and change address. If you
100ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# want dnsmasq to really bind only the interfaces it is listening on,
101ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# uncomment this option. About the only time you may need this is when
102ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# running another nameserver on the same machine.
103ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#bind-interfaces
104ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
105ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# If you don't want dnsmasq to read /etc/hosts, uncomment the
106ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# following line.
107ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#no-hosts
108ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# or if you want it to read another file, as well as /etc/hosts, use
109ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# this.
110ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#addn-hosts=/etc/banner_add_hosts
111ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
112ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Set this (and domain: see below) if you want to have a domain
113ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# automatically added to simple names in a hosts-file.
114ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#expand-hosts
115ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
116ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Set the domain for dnsmasq. this is optional, but if it is set, it
117ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# does the following things.
118ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# 1) Allows DHCP hosts to have fully qualified domain names, as long
119ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#     as the domain part matches this setting.
120ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# 2) Sets the "domain" DHCP option thereby potentially setting the
121ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#    domain of all systems configured by DHCP
122ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# 3) Provides the domain part for "expand-hosts"
123ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#domain=thekelleys.org.uk
124ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
125ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Set a different domain for a particular subnet
126ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#domain=wireless.thekelleys.org.uk,192.168.2.0/24
127ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
128ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Same idea, but range rather then subnet
129ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#domain=reserved.thekelleys.org.uk,192.68.3.100,192.168.3.200
130ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
131ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Uncomment this to enable the integrated DHCP server, you need
132ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# to supply the range of addresses available for lease and optionally
133ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# a lease time. If you have more than one network, you will need to
134ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# repeat this for each network on which you want to supply DHCP
135ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# service.
136ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-range=192.168.0.50,192.168.0.150,12h
137ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
138ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# This is an example of a DHCP range where the netmask is given. This
139ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# is needed for networks we reach the dnsmasq DHCP server via a relay
140ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# agent. If you don't know what a DHCP relay agent is, you probably
141ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# don't need to worry about this.
142ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h
143ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
144ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# This is an example of a DHCP range with a network-id, so that
145ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# some DHCP options may be set only for this network.
146ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-range=red,192.168.0.50,192.168.0.150
147ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
148ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Supply parameters for specified hosts using DHCP. There are lots
149ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# of valid alternatives, so we will give examples of each. Note that
150ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# IP addresses DO NOT have to be in the range given above, they just
151ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# need to be on the same network. The order of the parameters in these
152ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# do not matter, it's permissble to give name,adddress and MAC in any order
153ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
154ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Always allocate the host with ethernet address 11:22:33:44:55:66
155ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# The IP address 192.168.0.60
156ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-host=11:22:33:44:55:66,192.168.0.60
157ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
158ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Always set the name of the host with hardware address
159ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# 11:22:33:44:55:66 to be "fred"
160ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-host=11:22:33:44:55:66,fred
161ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
162ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Always give the host with ethernet address 11:22:33:44:55:66
163ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# the name fred and IP address 192.168.0.60 and lease time 45 minutes
164ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m
165ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
166ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Give a host with ethernet address 11:22:33:44:55:66 or
167ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# 12:34:56:78:90:12 the IP address 192.168.0.60. Dnsmasq will assume
168ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# that these two ethernet interfaces will never be in use at the same
169ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# time, and give the IP address to the second, even if it is already
170ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# in use by the first. Useful for laptops with wired and wireless
171ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# addresses.
172ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.60
173ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
174ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Give the machine which says its name is "bert" IP address
175ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# 192.168.0.70 and an infinite lease
176ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-host=bert,192.168.0.70,infinite
177ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
178ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Always give the host with client identifier 01:02:02:04
179ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# the IP address 192.168.0.60
180ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-host=id:01:02:02:04,192.168.0.60
181ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
182ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Always give the host with client identifier "marjorie"
183ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# the IP address 192.168.0.60
184ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-host=id:marjorie,192.168.0.60
185ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
186ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Enable the address given for "judge" in /etc/hosts
187ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# to be given to a machine presenting the name "judge" when
188ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# it asks for a DHCP lease.
189ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-host=judge
190ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
191ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Never offer DHCP service to a machine whose ethernet
192ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# address is 11:22:33:44:55:66
193ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-host=11:22:33:44:55:66,ignore
194ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
195ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Ignore any client-id presented by the machine with ethernet
196ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# address 11:22:33:44:55:66. This is useful to prevent a machine
197ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# being treated differently when running under different OS's or
198ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# between PXE boot and OS boot.
199ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-host=11:22:33:44:55:66,id:*
200ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
201ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Send extra options which are tagged as "red" to
202ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# the machine with ethernet address 11:22:33:44:55:66
203ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-host=11:22:33:44:55:66,net:red
204ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
205ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Send extra options which are tagged as "red" to
206ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# any machine with ethernet address starting 11:22:33:
207ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-host=11:22:33:*:*:*,net:red
208ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
209ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Ignore any clients which are specified in dhcp-host lines
210ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# or /etc/ethers. Equivalent to ISC "deny unkown-clients".
211ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# This relies on the special "known" tag which is set when 
212ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# a host is matched.
213ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-ignore=#known
214ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
215ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Send extra options which are tagged as "red" to any machine whose
216ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# DHCP vendorclass string includes the substring "Linux"
217ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-vendorclass=red,Linux
218ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
219ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Send extra options which are tagged as "red" to any machine one
220ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# of whose DHCP userclass strings includes the substring "accounts"
221ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-userclass=red,accounts
222ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
223ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Send extra options which are tagged as "red" to any machine whose
224ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# MAC address matches the pattern.
225ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-mac=red,00:60:8C:*:*:*
226ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
227ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# If this line is uncommented, dnsmasq will read /etc/ethers and act
228ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# on the ethernet-address/IP pairs found there just as if they had
229ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# been given as --dhcp-host options. Useful if you keep
230ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# MAC-address/host mappings there for other purposes.
231ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#read-ethers
232ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
233ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Send options to hosts which ask for a DHCP lease.
234ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# See RFC 2132 for details of available options.
235ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Common options can be given to dnsmasq by name: 
236ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# run "dnsmasq --help dhcp" to get a list.
237ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Note that all the common settings, such as netmask and
238ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# broadcast address, DNS server and default route, are given
239ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# sane defaults by dnsmasq. You very likely will not need 
240ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# any dhcp-options. If you use Windows clients and Samba, there
241ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# are some options which are recommended, they are detailed at the
242ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# end of this section.
243ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
244ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Override the default route supplied by dnsmasq, which assumes the
245ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# router is the same machine as the one running dnsmasq.
246ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=3,1.2.3.4
247ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
248ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Do the same thing, but using the option name
249ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=option:router,1.2.3.4
250ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
251ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Override the default route supplied by dnsmasq and send no default
252ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# route at all. Note that this only works for the options sent by
253ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# default (1, 3, 6, 12, 28) the same line will send a zero-length option 
254ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# for all other option numbers.
255ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=3
256ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
257ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5
258ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5
259ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
260ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Set the NTP time server address to be the same machine as
261ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# is running dnsmasq
262ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=42,0.0.0.0
263ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
264ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Set the NIS domain name to "welly"
265ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=40,welly
266ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
267ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Set the default time-to-live to 50
268ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=23,50
269ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
270ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Set the "all subnets are local" flag
271ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=27,1
272ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
273ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Send the etherboot magic flag and then etherboot options (a string).
274ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=128,e4:45:74:68:00:00
275ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=129,NIC=eepro100
276ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
277ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Specify an option which will only be sent to the "red" network
278ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# (see dhcp-range for the declaration of the "red" network)
279ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Note that the net: part must precede the option: part.
280ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option = net:red, option:ntp-server, 192.168.1.1
281ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
282ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# The following DHCP options set up dnsmasq in the same way as is specified
283ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# for the ISC dhcpcd in
284ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt
285ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# adapted for a typical dnsmasq installation where the host running
286ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# dnsmasq is also the host running samba.
287ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# you may want to uncomment some or all of them if you use 
288ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Windows clients and Samba.
289ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=19,0           # option ip-forwarding off
290ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=44,0.0.0.0     # set netbios-over-TCP/IP nameserver(s) aka WINS server(s)
291ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=45,0.0.0.0     # netbios datagram distribution server
292ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=46,8           # netbios node type
293ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
294ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client
295ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# probably doesn't support this......
296ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com
297ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
298ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Send RFC-3442 classless static routes (note the netmask encoding)
299ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8
300ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
301ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Send vendor-class specific options encapsulated in DHCP option 43. 
302ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# The meaning of the options is defined by the vendor-class so
303ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# options are sent only when the client supplied vendor class
304ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# matches the class given here. (A substring match is OK, so "MSFT" 
305ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# matches "MSFT" and "MSFT 5.0"). This example sets the
306ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# mtftp address to 0.0.0.0 for PXEClients.
307ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=vendor:PXEClient,1,0.0.0.0
308ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
309ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Send microsoft-specific option to tell windows to release the DHCP lease
310ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# when it shuts down. Note the "i" flag, to tell dnsmasq to send the
311ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# value as a four-byte integer - that's what microsoft wants. See
312ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true
313ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=vendor:MSFT,2,1i
314ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
315ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Send the Encapsulated-vendor-class ID needed by some configurations of
316ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Etherboot to allow is to recognise the DHCP server.
317ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=vendor:Etherboot,60,"Etherboot"
318ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
319ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Send options to PXELinux. Note that we need to send the options even
320ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# though they don't appear in the parameter request list, so we need
321ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# to use dhcp-option-force here. 
322ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# See http://syslinux.zytor.com/pxe.php#special for details.
323ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Magic number - needed before anything else is recognised
324ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option-force=208,f1:00:74:7e
325ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Configuration file name
326ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option-force=209,configs/common
327ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Path prefix
328ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option-force=210,/tftpboot/pxelinux/files/
329ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Reboot time. (Note 'i' to send 32-bit value)
330ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option-force=211,30i
331ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
332ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Set the boot filename for netboot/PXE. You will only need 
333ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# this is you want to boot machines over the network and you will need
334ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# a TFTP server; either dnsmasq's built in TFTP server or an
335ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# external one. (See below for how to enable the TFTP server.)
336ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-boot=pxelinux.0
337ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
338ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Boot for Etherboot gPXE. The idea is to send two different
339ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# filenames, the first loads gPXE, and the second tells gPXE what to
340ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# load. The dhcp-match sets the gpxe tag for requests from gPXE.
341ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-match=gpxe,175 # gPXE sends a 175 option.
342ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-boot=net:#gpxe,undionly.kpxe
343ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-boot=mybootimage
344ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat 
345ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Encapsulated options for Etherboot gPXE. All the options are
346ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# encapsulated within option 175
347ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=encap:175, 1, 5b         # priority code
348ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=encap:175, 176, 1b       # no-proxydhcp 
349ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=encap:175, 177, string   # bus-id 
350ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=encap:175, 189, 1b       # BIOS drive code
351ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=encap:175, 190, user     # iSCSI username
352ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-option=encap:175, 191, pass     # iSCSI password
353ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
354ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Test for the architecture of a netboot client. PXE clients are
355ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# supposed to send their architecture as option 93. (See RFC 4578)
356ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-match=peecees, option:client-arch, 0 #x86-32
357ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-match=itanics, option:client-arch, 2 #IA64
358ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-match=hammers, option:client-arch, 6 #x86-64
359ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-match=mactels, option:client-arch, 7 #EFI x86-64 
360ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
361ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Do real PXE, rather than just booting a single file, this is an
362ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# alternative to dhcp-boot.
363ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#pxe-prompt="What system shall I netboot?"
364ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# or with timeout before first available action is taken:
365ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#pxe-prompt="Press F8 for menu.", 60
366ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
367ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Available boot services. for PXE.
368ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#pxe-service=x86PC, "Boot from local disk", 0
369ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
370ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Loads <tftp-root>/pxelinux.0 from dnsmasq TFTP server.
371ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#pxe-service=x86PC, "Install Linux", pxelinux 
372ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
373ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Loads <tftp-root>/pxelinux.0 from TFTP server at 1.2.3.4.
374ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Beware this fails on old PXE ROMS.
375ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#pxe-service=x86PC, "Install Linux", pxelinux, 1.2.3.4 
376ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
377ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Use bootserver on network, found my multicast or broadcast.
378ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#pxe-service=x86PC, "Install windows from RIS server", 1
379ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
380ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Use bootserver at a known IP address.
381ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#pxe-service=x86PC, "Install windows from RIS server", 1, 1.2.3.4
382ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
383ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# If you have multicast-FTP available,
384ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# information for that can be passed in a similar way using options 1
385ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# to 5. See page 19 of
386ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# http://download.intel.com/design/archives/wfm/downloads/pxespec.pdf  
387ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
388ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat  
389ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Enable dnsmasq's built-in TFTP server
390ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#enable-tftp
391ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
392ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Set the root directory for files availble via FTP.
393ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#tftp-root=/var/ftpd
394ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
395ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Make the TFTP server more secure: with this set, only files owned by
396ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# the user dnsmasq is running as will be send over the net.
397ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#tftp-secure
398ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
399ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# This option stops dnsmasq from negotiating a larger blocksize for TFTP 
400ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# transfers. It will slow things down, but may rescue some broken TFTP
401ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# clients.
402ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#tftp-no-blocksize
403ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
404ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Set the boot file name only when the "red" tag is set.
405ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-boot=net:red,pxelinux.red-net
406ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
407ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# An example of dhcp-boot with an external TFTP server: the name and IP
408ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# address of the server are given after the filename.
409ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Can fail with old PXE ROMS. Overridden by --pxe-service.
410ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3
411ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
412ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Set the limit on DHCP leases, the default is 150
413ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-lease-max=150
414ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
415ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# The DHCP server needs somewhere on disk to keep its lease database.
416ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# This defaults to a sane location, but if you want to change it, use
417ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# the line below.
418ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-leasefile=/var/lib/misc/dnsmasq.leases
419ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
420ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Set the DHCP server to authoritative mode. In this mode it will barge in
421ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# and take over the lease for any client which broadcasts on the network,
422ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# whether it has a record of the lease or not. This avoids long timeouts
423ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# when a machine wakes up on a new network. DO NOT enable this if there's
424ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# the slighest chance that you might end up accidentally configuring a DHCP
425ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# server for your campus/company accidentally. The ISC server uses
426ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# the same option, and this URL provides more information:
427ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# http://www.isc.org/index.pl?/sw/dhcp/authoritative.php
428ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-authoritative
429ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
430ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Run an executable when a DHCP lease is created or destroyed.
431ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# The arguments sent to the script are "add" or "del", 
432ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# then the MAC address, the IP address and finally the hostname
433ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# if there is one. 
434ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#dhcp-script=/bin/echo
435ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
436ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Set the cachesize here.
437ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#cache-size=150
438ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
439ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# If you want to disable negative caching, uncomment this.
440ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#no-negcache
441ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
442ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Normally responses which come form /etc/hosts and the DHCP lease
443ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# file have Time-To-Live set as zero, which conventionally means
444ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# do not cache further. If you are happy to trade lower load on the
445ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# server for potentially stale date, you can set a time-to-live (in
446ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# seconds) here.
447ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#local-ttl=
448ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
449ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# If you want dnsmasq to detect attempts by Verisign to send queries
450ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# to unregistered .com and .net hosts to its sitefinder service and
451ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# have dnsmasq instead return the correct NXDOMAIN response, uncomment
452ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# this line. You can add similar lines to do the same for other
453ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# registries which have implemented wildcard A records.
454ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#bogus-nxdomain=64.94.110.11
455ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
456ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# If you want to fix up DNS results from upstream servers, use the
457ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# alias option. This only works for IPv4.
458ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# This alias makes a result of 1.2.3.4 appear as 5.6.7.8
459ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#alias=1.2.3.4,5.6.7.8
460ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# and this maps 1.2.3.x to 5.6.7.x
461ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#alias=1.2.3.0,5.6.7.0,255.255.255.0
462ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# and this maps 192.168.0.10->192.168.0.40 to 10.0.0.10->10.0.0.40
463ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#alias=192.168.0.10-192.168.0.40,10.0.0.0,255.255.255.0
464ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
465ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Change these lines if you want dnsmasq to serve MX records.
466ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
467ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Return an MX record named "maildomain.com" with target
468ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# servermachine.com and preference 50
469ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#mx-host=maildomain.com,servermachine.com,50
470ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
471ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Set the default target for MX records created using the localmx option.
472ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#mx-target=servermachine.com
473ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
474ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Return an MX record pointing to the mx-target for all local
475ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# machines.
476ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#localmx
477ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
478ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Return an MX record pointing to itself for all local machines.
479ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#selfmx
480ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
481ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Change the following lines if you want dnsmasq to serve SRV
482ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# records.  These are useful if you want to serve ldap requests for
483ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Active Directory and other windows-originated DNS requests.
484ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# See RFC 2782.
485ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# You may add multiple srv-host lines.
486ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# The fields are <name>,<target>,<port>,<priority>,<weight>
487ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# If the domain part if missing from the name (so that is just has the
488ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# service and protocol sections) then the domain given by the domain=
489ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# config option is used. (Note that expand-hosts does not need to be
490ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# set for this to work.)
491ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
492ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# A SRV record sending LDAP for the example.com domain to
493ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# ldapserver.example.com port 289
494ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389
495ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
496ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# A SRV record sending LDAP for the example.com domain to
497ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# ldapserver.example.com port 289 (using domain=)
498ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#domain=example.com
499ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#srv-host=_ldap._tcp,ldapserver.example.com,389
500ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
501ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Two SRV records for LDAP, each with different priorities
502ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1
503ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2
504ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
505ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# A SRV record indicating that there is no LDAP server for the domain
506ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# example.com
507ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#srv-host=_ldap._tcp.example.com
508ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
509ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# The following line shows how to make dnsmasq serve an arbitrary PTR
510ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# record. This is useful for DNS-SD. (Note that the
511ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# domain-name expansion done for SRV records _does_not
512ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# occur for PTR records.)
513ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services"
514ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
515ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Change the following lines to enable dnsmasq to serve TXT records.
516ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# These are used for things like SPF and zeroconf. (Note that the
517ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# domain-name expansion done for SRV records _does_not
518ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# occur for TXT records.)
519ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
520ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#Example SPF.
521ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#txt-record=example.com,"v=spf1 a -all"
522ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
523ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#Example zeroconf
524ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#txt-record=_http._tcp.example.com,name=value,paper=A4
525ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
526ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Provide an alias for a "local" DNS name. Note that this _only_ works
527ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# for targets which are names from DHCP or /etc/hosts. Give host
528ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# "bert" another name, bertrand
529ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#cname=bertand,bert
530ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
531ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# For debugging purposes, log each DNS query as it passes through
532ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# dnsmasq.
533ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#log-queries
534ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
535ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Log lots of extra information about DHCP transactions.
536ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#log-dhcp
537ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat
538ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat# Include a another lot of configuration options.
539ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#conf-file=/etc/dnsmasq.more.conf
540ffd68729961f7383f2e35494a03ccdef20f86c98San Mehat#conf-dir=/etc/dnsmasq.d
541