blob: 7ffccad98b903ced185bcbf1f1f9715f99c97c24 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001.TH DNSMASQ 8 2021-08-16
2.SH NAME
3dnsmasq \- A lightweight DHCP and caching DNS server.
4.SH SYNOPSIS
5.B dnsmasq
6.I [OPTION]...
7.SH "DESCRIPTION"
8.BR dnsmasq
9is a lightweight DNS, TFTP, PXE, router advertisement and DHCP server. It is intended to provide
10coupled DNS and DHCP service to a LAN.
11.PP
12Dnsmasq accepts DNS queries and either answers them from a small, local,
13cache or forwards them to a real, recursive, DNS server. It loads the
14contents of /etc/hosts so that local hostnames
15which do not appear in the global DNS can be resolved and also answers
16DNS queries for DHCP configured hosts. It can also act as the
17authoritative DNS server for one or more domains, allowing local names
18to appear in the global DNS. It can be configured to do DNSSEC
19validation.
20.PP
21The dnsmasq DHCP server supports static address assignments and multiple
22networks. It automatically
23sends a sensible default set of DHCP options, and can be configured to
24send any desired set of DHCP options, including vendor-encapsulated
25options. It includes a secure, read-only,
26TFTP server to allow net/PXE boot of DHCP hosts and also supports BOOTP. The PXE support is full featured, and includes a proxy mode which supplies PXE information to clients whilst DHCP address allocation is done by another server.
27.PP
28The dnsmasq DHCPv6 server provides the same set of features as the
29DHCPv4 server, and in addition, it includes router advertisements and
30a neat feature which allows naming for clients which use DHCPv4 and
31stateless autoconfiguration only for IPv6 configuration. There is support for doing address allocation (both DHCPv6 and RA) from subnets which are dynamically delegated via DHCPv6 prefix delegation.
32.PP
33Dnsmasq is coded with small embedded systems in mind. It aims for the smallest possible memory footprint compatible with the supported functions, and allows unneeded functions to be omitted from the compiled binary.
34.SH OPTIONS
35Note that in general missing parameters are allowed and switch off
36functions, for instance "--pid-file" disables writing a PID file. On
37BSD, unless the GNU getopt library is linked, the long form of the
38options does not work on the command line; it is still recognised in
39the configuration file.
40.TP
41.B --test
42Read and syntax check configuration file(s). Exit with code 0 if all
43is OK, or a non-zero code otherwise. Do not start up dnsmasq.
44.TP
45.B \-w, --help
46Display all command-line options.
47.B --help dhcp
48will display known DHCPv4 configuration options, and
49.B --help dhcp6
50will display DHCPv6 options.
51.TP
52.B \-h, --no-hosts
53Don't read the hostnames in /etc/hosts.
54.TP
55.B \-H, --addn-hosts=<file>
56Additional hosts file. Read the specified file as well as /etc/hosts. If \fB--no-hosts\fP is given, read
57only the specified file. This option may be repeated for more than one
58additional hosts file. If a directory is given, then read all the files contained in that directory
59in alphabetical order.
60.TP
61.B --hostsdir=<path>
62Read all the hosts files contained in the directory. New or changed files
63are read automatically. See \fB--dhcp-hostsdir\fP for details.
64.TP
65.B \-E, --expand-hosts
66Add the domain to simple names (without a period) in /etc/hosts
67in the same way as for DHCP-derived names. Note that this does not
68apply to domain names in cnames, PTR records, TXT records etc.
69.TP
70.B \-T, --local-ttl=<time>
71When replying with information from /etc/hosts or configuration or the DHCP leases
72file dnsmasq by default sets the time-to-live field to zero, meaning
73that the requester should not itself cache the information. This is
74the correct thing to do in almost all situations. This option allows a
75time-to-live (in seconds) to be given for these replies. This will
76reduce the load on the server at the expense of clients using stale
77data under some circumstances.
78.TP
79.B --dhcp-ttl=<time>
80As for \fB--local-ttl\fP, but affects only replies with information from DHCP leases. If both are given, \fB--dhcp-ttl\fP applies for DHCP information, and \fB--local-ttl\fP for others. Setting this to zero eliminates the effect of \fB--local-ttl\fP for DHCP.
81.TP
82.B --neg-ttl=<time>
83Negative replies from upstream servers normally contain time-to-live
84information in SOA records which dnsmasq uses for caching. If the
85replies from upstream servers omit this information, dnsmasq does not
86cache the reply. This option gives a default value for time-to-live
87(in seconds) which dnsmasq uses to cache negative replies even in
88the absence of an SOA record.
89.TP
90.B --max-ttl=<time>
91Set a maximum TTL value that will be handed out to clients. The specified
92maximum TTL will be given to clients instead of the true TTL value if it is
93lower. The true TTL value is however kept in the cache to avoid flooding
94the upstream DNS servers.
95.TP
96.B --max-cache-ttl=<time>
97Set a maximum TTL value for entries in the cache.
98.TP
99.B --min-cache-ttl=<time>
100Extend short TTL values to the time given when caching them. Note that
101artificially extending TTL values is in general a bad idea, do not do it
102unless you have a good reason, and understand what you are doing.
103Dnsmasq limits the value of this option to one hour, unless recompiled.
104.TP
105.B --auth-ttl=<time>
106Set the TTL value returned in answers from the authoritative server.
107.TP
108.B \-k, --keep-in-foreground
109Do not go into the background at startup but otherwise run as
110normal. This is intended for use when dnsmasq is run under daemontools
111or launchd.
112.TP
113.B \-d, --no-daemon
114Debug mode: don't fork to the background, don't write a pid file,
115don't change user id, generate a complete cache dump on receipt on
116SIGUSR1, log to stderr as well as syslog, don't fork new processes
117to handle TCP queries. Note that this option is for use in debugging
118only, to stop dnsmasq daemonising in production, use
119.B --keep-in-foreground.
120.TP
121.B \-q, --log-queries
122Log the results of DNS queries handled by dnsmasq. Enable a full cache dump on receipt of SIGUSR1. If the argument "extra" is supplied, ie
123.B --log-queries=extra
124then the log has extra information at the start of each line.
125This consists of a serial number which ties together the log lines associated with an individual query, and the IP address of the requestor.
126.TP
127.B \-8, --log-facility=<facility>
128Set the facility to which dnsmasq will send syslog entries, this
129defaults to DAEMON, and to LOCAL0 when debug mode is in operation. If
130the facility given contains at least one '/' character, it is taken to
131be a filename, and dnsmasq logs to the given file, instead of
132syslog. If the facility is '-' then dnsmasq logs to stderr.
133(Errors whilst reading configuration will still go to syslog,
134but all output from a successful startup, and all output whilst
135running, will go exclusively to the file.) When logging to a file,
136dnsmasq will close and reopen the file when it receives SIGUSR2. This
137allows the log file to be rotated without stopping dnsmasq.
138.TP
139.B --log-debug
140Enable extra logging intended for debugging rather than information.
141.TP
142.B --log-async[=<lines>]
143Enable asynchronous logging and optionally set the limit on the
144number of lines
145which will be queued by dnsmasq when writing to the syslog is slow.
146Dnsmasq can log asynchronously: this
147allows it to continue functioning without being blocked by syslog, and
148allows syslog to use dnsmasq for DNS queries without risking deadlock.
149If the queue of log-lines becomes full, dnsmasq will log the
150overflow, and the number of messages lost. The default queue length is
1515, a sane value would be 5-25, and a maximum limit of 100 is imposed.
152.TP
153.B \-x, --pid-file=<path>
154Specify an alternate path for dnsmasq to record its process-id in. Normally /var/run/dnsmasq.pid.
155.TP
156.B \-u, --user=<username>
157Specify the userid to which dnsmasq will change after startup. Dnsmasq must normally be started as root, but it will drop root
158privileges after startup by changing id to another user. Normally this user is "nobody" but that
159can be over-ridden with this switch.
160.TP
161.B \-g, --group=<groupname>
162Specify the group which dnsmasq will run
163as. The default is "dip", if available, to facilitate access to
164/etc/ppp/resolv.conf which is not normally world readable.
165.TP
166.B \-v, --version
167Print the version number.
168.TP
169.B \-p, --port=<port>
170Listen on <port> instead of the standard DNS port (53). Setting this
171to zero completely disables DNS function, leaving only DHCP and/or TFTP.
172.TP
173.B \-P, --edns-packet-max=<size>
174Specify the largest EDNS.0 UDP packet which is supported by the DNS
175forwarder. Defaults to 4096, which is the RFC5625-recommended size.
176.TP
177.B \-Q, --query-port=<query_port>
178Send outbound DNS queries from, and listen for their replies on, the
179specific UDP port <query_port> instead of using random ports. NOTE
180that using this option will make dnsmasq less secure against DNS
181spoofing attacks but it may be faster and use less resources. Setting this option
182to zero makes dnsmasq use a single port allocated to it by the
183OS: this was the default behaviour in versions prior to 2.43.
184.TP
185.B --min-port=<port>
186Do not use ports less than that given as source for outbound DNS
187queries. Dnsmasq picks random ports as source for outbound queries:
188when this option is given, the ports used will always be larger
189than that specified. Useful for systems behind firewalls. If not specified,
190defaults to 1024.
191.TP
192.B --max-port=<port>
193Use ports lower than that given as source for outbound DNS queries.
194Dnsmasq picks random ports as source for outbound queries:
195when this option is given, the ports used will always be lower
196than that specified. Useful for systems behind firewalls.
197.TP
198.B \-i, --interface=<interface name>
199Listen only on the specified interface(s). Dnsmasq automatically adds
200the loopback (local) interface to the list of interfaces to use when
201the
202.B \--interface
203option is used. If no
204.B \--interface
205or
206.B \--listen-address
207options are given dnsmasq listens on all available interfaces except any
208given in
209.B \--except-interface
210options. On Linux, when
211.B \--bind-interfaces
212or
213.B \--bind-dynamic
214are in effect, IP alias interface labels (eg "eth1:0") are checked, rather than
215interface names. In the degenerate case when an interface has one address, this amounts to the same thing but when an interface has multiple addresses it
216allows control over which of those addresses are accepted.
217The same effect is achievable in default mode by using
218.B \--listen-address.
219A simple wildcard, consisting of a trailing '*',
220can be used in
221.B \--interface
222and
223.B \--except-interface
224options.
225.TP
226.B \-I, --except-interface=<interface name>
227Do not listen on the specified interface. Note that the order of
228.B \--listen-address
229.B --interface
230and
231.B --except-interface
232options does not matter and that
233.B --except-interface
234options always override the others. The comments about interface labels for
235.B --listen-address
236apply here.
237.TP
238.B --auth-server=<domain>,[<interface>|<ip-address>...]
239Enable DNS authoritative mode for queries arriving at an interface or address. Note that the interface or address
240need not be mentioned in
241.B --interface
242or
243.B --listen-address
244configuration, indeed
245.B --auth-server
246will override these and provide a different DNS service on the
247specified interface. The <domain> is the "glue record". It should
248resolve in the global DNS to an A and/or AAAA record which points to
249the address dnsmasq is listening on. When an interface is specified,
250it may be qualified with "/4" or "/6" to specify only the IPv4 or IPv6
251addresses associated with the interface. Since any defined authoritative zones are also available as part of the normal recusive DNS service supplied by dnsmasq, it can make sense to have an --auth-server declaration with no interfaces or address, but simply specifying the primary external nameserver.
252.TP
253.B --local-service
254Accept DNS queries only from hosts whose address is on a local subnet,
255ie a subnet for which an interface exists on the server. This option
256only has effect if there are no \fB--interface\fP, \fB--except-interface\fP,
257\fB--listen-address\fP or \fB--auth-server\fP options. It is intended to be set as
258a default on installation, to allow unconfigured installations to be
259useful but also safe from being used for DNS amplification attacks.
260.TP
261.B \-2, --no-dhcp-interface=<interface name>
262Do not provide DHCP or TFTP on the specified interface, but do provide DNS service.
263.TP
264.B \-a, --listen-address=<ipaddr>
265Listen on the given IP address(es). Both
266.B \--interface
267and
268.B \--listen-address
269options may be given, in which case the set of both interfaces and
270addresses is used. Note that if no
271.B \--interface
272option is given, but
273.B \--listen-address
274is, dnsmasq will not automatically listen on the loopback
275interface. To achieve this, its IP address, 127.0.0.1, must be
276explicitly given as a
277.B \--listen-address
278option.
279.TP
280.B \-z, --bind-interfaces
281On systems which support it, dnsmasq binds the wildcard address,
282even when it is listening on only some interfaces. It then discards
283requests that it shouldn't reply to. This has the advantage of
284working even when interfaces come and go and change address. This
285option forces dnsmasq to really bind only the interfaces it is
286listening on. About the only time when this is useful is when
287running another nameserver (or another instance of dnsmasq) on the
288same machine. Setting this option also enables multiple instances of
289dnsmasq which provide DHCP service to run in the same machine.
290.TP
291.B --bind-dynamic
292Enable a network mode which is a hybrid between
293.B --bind-interfaces
294and the default. Dnsmasq binds the address of individual interfaces,
295allowing multiple dnsmasq instances, but if new interfaces or
296addresses appear, it automatically listens on those (subject to any
297access-control configuration). This makes dynamically created
298interfaces work in the same way as the default. Implementing this
299option requires non-standard networking APIs and it is only available
300under Linux. On other platforms it falls-back to \fB--bind-interfaces\fP mode.
301.TP
302.B \-y, --localise-queries
303Return answers to DNS queries from /etc/hosts and \fB--interface-name\fP and \fB--dynamic-host\fP which depend on the interface over which the query was
304received. If a name has more than one address associated with
305it, and at least one of those addresses is on the same subnet as the
306interface to which the query was sent, then return only the
307address(es) on that subnet. This allows for a server to have multiple
308addresses in /etc/hosts corresponding to each of its interfaces, and
309hosts will get the correct address based on which network they are
310attached to. Currently this facility is limited to IPv4.
311.TP
312.B \-b, --bogus-priv
313Bogus private reverse lookups. All reverse lookups for private IP ranges (ie 192.168.x.x, etc)
314which are not found in /etc/hosts or the DHCP leases file are answered
315with "no such domain" rather than being forwarded upstream. The
316set of prefixes affected is the list given in RFC6303, for IPv4 and IPv6.
317.TP
318.B \-V, --alias=[<old-ip>]|[<start-ip>-<end-ip>],<new-ip>[,<mask>]
319Modify IPv4 addresses returned from upstream nameservers; old-ip is
320replaced by new-ip. If the optional mask is given then any address
321which matches the masked old-ip will be re-written. So, for instance
322.B --alias=1.2.3.0,6.7.8.0,255.255.255.0
323will map 1.2.3.56 to 6.7.8.56 and 1.2.3.67 to 6.7.8.67. This is what
324Cisco PIX routers call "DNS doctoring". If the old IP is given as
325range, then only addresses in the range, rather than a whole subnet,
326are re-written. So
327.B --alias=192.168.0.10-192.168.0.40,10.0.0.0,255.255.255.0
328maps 192.168.0.10->192.168.0.40 to 10.0.0.10->10.0.0.40
329.TP
330.B \-B, --bogus-nxdomain=<ipaddr>[/prefix]
331Transform replies which contain the specified address or subnet into "No such
332domain" replies. IPv4 and IPv6 are supported. This is intended to counteract a devious move made by
333Verisign in September 2003 when they started returning the address of
334an advertising web page in response to queries for unregistered names,
335instead of the correct NXDOMAIN response. This option tells dnsmasq to
336fake the correct response when it sees this behaviour. As at Sept 2003
337the IP address being returned by Verisign is 64.94.110.11
338.TP
339.B --ignore-address=<ipaddr>[/prefix]
340Ignore replies to A or AAAA queries which include the specified address or subnet.
341No error is generated, dnsmasq simply continues to listen for another reply.
342This is useful to defeat blocking strategies which rely on quickly supplying a
343forged answer to a DNS request for certain domain, before the correct answer can arrive.
344.TP
345.B \-f, --filterwin2k
346Later versions of windows make periodic DNS requests which don't get sensible answers from
347the public DNS and can cause problems by triggering dial-on-demand links. This flag turns on an option
348to filter such requests. The requests blocked are for records of types SOA and SRV, and type ANY where the
349requested name has underscores, to catch LDAP requests.
350.TP
351.B \-r, --resolv-file=<file>
352Read the IP addresses of the upstream nameservers from <file>, instead of
353/etc/resolv.conf. For the format of this file see
354.BR resolv.conf (5).
355The only lines relevant to dnsmasq are nameserver ones. Dnsmasq can
356be told to poll more than one resolv.conf file, the first file name specified
357overrides the default, subsequent ones add to the list. This is only
358allowed when polling; the file with the currently latest modification
359time is the one used.
360.TP
361.B \-R, --no-resolv
362Don't read /etc/resolv.conf. Get upstream servers only from the command
363line or the dnsmasq configuration file.
364.TP
365.B \-1, --enable-dbus[=<service-name>]
366Allow dnsmasq configuration to be updated via DBus method calls. The
367configuration which can be changed is upstream DNS servers (and
368corresponding domains) and cache clear. Requires that dnsmasq has
369been built with DBus support. If the service name is given, dnsmasq
370provides service at that name, rather than the default which is
371.B uk.org.thekelleys.dnsmasq
372.TP
373.B --enable-ubus[=<service-name>]
374Enable dnsmasq UBus interface. It sends notifications via UBus on
375DHCPACK and DHCPRELEASE events. Furthermore it offers metrics
376and allows configuration of Linux connection track mark based filtering.
377When DNS query filtering based on Linux connection track marks is enabled
378UBus notifications are generated for each resolved or filtered DNS query.
379Requires that dnsmasq has been built with UBus support. If the service
380name is given, dnsmasq provides service at that namespace, rather than
381the default which is
382.B dnsmasq
383.TP
384.B \-o, --strict-order
385By default, dnsmasq will send queries to any of the upstream servers
386it knows about and tries to favour servers that are known to
387be up. Setting this flag forces dnsmasq to try each query with each
388server strictly in the order they appear in /etc/resolv.conf
389.TP
390.B --all-servers
391By default, when dnsmasq has more than one upstream server available,
392it will send queries to just one server. Setting this flag forces
393dnsmasq to send all queries to all available servers. The reply from
394the server which answers first will be returned to the original requester.
395.TP
396.B --dns-loop-detect
397Enable code to detect DNS forwarding loops; ie the situation where a query sent to one
398of the upstream server eventually returns as a new query to the dnsmasq instance. The
399process works by generating TXT queries of the form <hex>.test and sending them to
400each upstream server. The hex is a UID which encodes the instance of dnsmasq sending the query
401and the upstream server to which it was sent. If the query returns to the server which sent it, then
402the upstream server through which it was sent is disabled and this event is logged. Each time the
403set of upstream servers changes, the test is re-run on all of them, including ones which
404were previously disabled.
405.TP
406.B --stop-dns-rebind
407Reject (and log) addresses from upstream nameservers which are in the
408private ranges. This blocks an attack where a browser behind a
409firewall is used to probe machines on the local network. For IPv6, the
410private range covers the IPv4-mapped addresses in private space plus
411all link-local (LL) and site-local (ULA) addresses.
412.TP
413.B --rebind-localhost-ok
414Exempt 127.0.0.0/8 and ::1 from rebinding checks. This address range is
415returned by realtime black hole servers, so blocking it may disable
416these services.
417.TP
418.B --rebind-domain-ok=[<domain>]|[[/<domain>/[<domain>/]
419Do not detect and block dns-rebind on queries to these domains. The
420argument may be either a single domain, or multiple domains surrounded
421by '/', like the \fB--server\fP syntax, eg.
422.B --rebind-domain-ok=/domain1/domain2/domain3/
423.TP
424.B \-n, --no-poll
425Don't poll /etc/resolv.conf for changes.
426.TP
427.B --clear-on-reload
428Whenever /etc/resolv.conf is re-read or the upstream servers are set
429via DBus, clear the DNS cache.
430This is useful when new nameservers may have different
431data than that held in cache.
432.TP
433.B \-D, --domain-needed
434Tells dnsmasq to never forward A or AAAA queries for plain names, without dots
435or domain parts, to upstream nameservers. If the name is not known
436from /etc/hosts or DHCP then a "not found" answer is returned.
437.TP
438.B \-S, --local, --server=[/[<domain>]/[domain/]][<ipaddr>[#<port>]][@<interface>][@<source-ip>[#<port>]]
439Specify IP address of upstream servers directly. Setting this flag does
440not suppress reading of /etc/resolv.conf, use \fB--no-resolv\fP to do that. If one or more
441optional domains are given, that server is used only for those domains
442and they are queried only using the specified server. This is
443intended for private nameservers: if you have a nameserver on your
444network which deals with names of the form
445xxx.internal.thekelleys.org.uk at 192.168.1.1 then giving the flag
446.B --server=/internal.thekelleys.org.uk/192.168.1.1
447will send all queries for
448internal machines to that nameserver, everything else will go to the
449servers in /etc/resolv.conf. DNSSEC validation is turned off for such
450private nameservers, UNLESS a
451.B --trust-anchor
452is specified for the domain in question. An empty domain specification,
453.B //
454has the special meaning of "unqualified names only" ie names without any
455dots in them. A non-standard port may be specified as
456part of the IP
457address using a # character.
458More than one \fB--server\fP flag is allowed, with
459repeated domain or ipaddr parts as required.
460
461More specific domains take precedence over less specific domains, so:
462.B --server=/google.com/1.2.3.4
463.B --server=/www.google.com/2.3.4.5
464will send queries for google.com and gmail.google.com to 1.2.3.4, but www.google.com
465will go to 2.3.4.5
466
467Matching of domains is normally done on complete labels, so /google.com/ matches google.com and www.google.com
468but NOT supergoogle.com. This can be overridden with a * at the start of a pattern only: /*google.com/
469will match google.com and www.google.com AND supergoogle.com. The non-wildcard form has priority, so
470if /google.com/ and /*google.com/ are both specified then google.com and www.google.com will match /google.com/
471and /*google.com/ will only match supergoogle.com.
472
473For historical reasons, the pattern /.google.com/ is equivalent to /google.com/ if you wish to match any subdomain
474of google.com but NOT google.com itself, use /*.google.com/
475
476The special server address '#' means, "use the standard servers", so
477.B --server=/google.com/1.2.3.4
478.B --server=/www.google.com/#
479will send queries for google.com and its subdomains to 1.2.3.4, except www.google.com (and its subdomains) which will
480be forwarded as usual.
481
482Also permitted is a -S
483flag which gives a domain but no IP address; this tells dnsmasq that
484a domain is local and it may answer queries from /etc/hosts or DHCP
485but should never forward queries on that domain to any upstream
486servers.
487.B --local
488is a synonym for
489.B --server
490to make configuration files clearer in this case.
491
492IPv6 addresses may include an %interface scope-id, eg
493fe80::202:a412:4512:7bbf%eth0.
494
495The optional string after the @ character tells dnsmasq how to set the source of
496the queries to this nameserver. It can either be an ip-address, an interface
497name or both. The ip-address should belong to the machine on which dnsmasq is
498running, otherwise this server line will be logged and then ignored. If an
499interface name is given, then queries to the server will be forced via that
500interface; if an ip-address is given then the source address of the queries will
501be set to that address; and if both are given then a combination of ip-address
502and interface name will be used to steer requests to the server.
503The query-port flag is ignored for any servers which have a
504source address specified but the port may be specified directly as
505part of the source address. Forcing queries to an interface is not
506implemented on all platforms supported by dnsmasq.
507.TP
508.B --rev-server=<ip-address>/<prefix-len>[,<ipaddr>][#<port>][@<interface>][@<source-ip>[#<port>]]
509This is functionally the same as
510.B --server,
511but provides some syntactic sugar to make specifying address-to-name queries easier. For example
512.B --rev-server=1.2.3.0/24,192.168.0.1
513is exactly equivalent to
514.B --server=/3.2.1.in-addr.arpa/192.168.0.1
515.TP
516.B \-A, --address=/<domain>[/<domain>...]/[<ipaddr>]
517Specify an IP address to return for any host in the given domains.
518Queries in the domains are never forwarded and always replied to
519with the specified IP address which may be IPv4 or IPv6. To give
520both IPv4 and IPv6 addresses for a domain, use repeated \fB--address\fP flags.
521To include multiple IP addresses for a single query, use
522\fB--addn-hosts=<path>\fP instead.
523Note that /etc/hosts and DHCP leases override this for individual
524names. A common use of this is to redirect the entire doubleclick.net
525domain to some friendly local web server to avoid banner ads. The
526domain specification works in the same way as for \fB--server\fP, with
527the additional facility that \fB/#/\fP matches any domain. Thus
528\fB--address=/#/1.2.3.4\fP will always return \fB1.2.3.4\fP for any
529query not answered from \fB/etc/hosts\fP or DHCP and not sent to an
530upstream nameserver by a more specific \fB--server\fP directive. As for
531\fB--server\fP, one or more domains with no address returns a
532no-such-domain answer, so \fB--address=/example.com/\fP is equivalent to
533\fB--server=/example.com/\fP and returns NXDOMAIN for example.com and
534all its subdomains. An address specified as '#' translates to the NULL
535address of 0.0.0.0 and its IPv6 equivalent of :: so
536\fB--address=/example.com/#\fP will return NULL addresses for example.com and
537its subdomains. This is partly syntactic sugar for \fB--address=/example.com/0.0.0.0\fP
538and \fB--address=/example.com/::\fP but is also more efficient than including both
539as separate configuration lines. Note that NULL addresses normally work in the same way as localhost, so beware that clients looking up these names are likely to end up talking to themselves.
540.TP
541.B --ipset=/<domain>[/<domain>...]/<ipset>[,<ipset>...]
542Places the resolved IP addresses of queries for one or more domains in
543the specified Netfilter IP set. If multiple setnames are given, then the
544addresses are placed in each of them, subject to the limitations of an
545IP set (IPv4 addresses cannot be stored in an IPv6 IP set and vice
546versa). Domains and subdomains are matched in the same way as
547\fB--address\fP.
548These IP sets must already exist. See
549.BR ipset (8)
550for more details.
551.TP
552.B --connmark-allowlist-enable[=<mask>]
553Enables filtering of incoming DNS queries with associated Linux connection track marks
554according to individual allowlists configured via a series of \fB--connmark-allowlist\fP
555options. Disallowed queries are not forwarded; they are rejected with a REFUSED error code.
556DNS queries are only allowed if they do not have an associated Linux connection
557track mark, or if the queried domains match the configured DNS patterns for the
558associated Linux connection track mark. If no allowlist is configured for a
559Linux connection track mark, all DNS queries associated with that mark are rejected.
560If a mask is specified, Linux connection track marks are first bitwise ANDed
561with the given mask before being processed.
562.TP
563.B --connmark-allowlist=<connmark>[/<mask>][,<pattern>[/<pattern>...]]
564Configures the DNS patterns that are allowed in DNS queries associated with
565the given Linux connection track mark.
566If a mask is specified, Linux connection track marks are first bitwise ANDed
567with the given mask before they are compared to the given connection track mark.
568Patterns follow the syntax of DNS names, but additionally allow the wildcard
569character "*" to be used up to twice per label to match 0 or more characters
570within that label. Note that the wildcard never matches a dot (e.g., "*.example.com"
571matches "api.example.com" but not "api.us.example.com"). Patterns must be
572fully qualified, i.e., consist of at least two labels. The final label must not be
573fully numeric, and must not be the "local" pseudo-TLD. A pattern must end with at least
574two literal (non-wildcard) labels.
575Instead of a pattern, "*" can be specified to disable allowlist filtering
576for a given Linux connection track mark entirely.
577.TP
578.B \-m, --mx-host=<mx name>[[,<hostname>],<preference>]
579Return an MX record named <mx name> pointing to the given hostname (if
580given), or
581the host specified in the \fB--mx-target\fP switch
582or, if that switch is not given, the host on which dnsmasq
583is running. The default is useful for directing mail from systems on a LAN
584to a central server. The preference value is optional, and defaults to
5851 if not given. More than one MX record may be given for a host.
586.TP
587.B \-t, --mx-target=<hostname>
588Specify the default target for the MX record returned by dnsmasq. See
589\fB--mx-host\fP. If \fB--mx-target\fP is given, but not \fB--mx-host\fP, then dnsmasq
590returns a MX record containing the MX target for MX queries on the
591hostname of the machine on which dnsmasq is running.
592.TP
593.B \-e, --selfmx
594Return an MX record pointing to itself for each local
595machine. Local machines are those in /etc/hosts or with DHCP leases.
596.TP
597.B \-L, --localmx
598Return an MX record pointing to the host given by \fB--mx-target\fP (or the
599machine on which dnsmasq is running) for each
600local machine. Local machines are those in /etc/hosts or with DHCP
601leases.
602.TP
603.B \-W, --srv-host=<_service>.<_prot>.[<domain>],[<target>[,<port>[,<priority>[,<weight>]]]]
604Return a SRV DNS record. See RFC2782 for details. If not supplied, the
605domain defaults to that given by
606.B --domain.
607The default for the target domain is empty, and the default for port
608is one and the defaults for
609weight and priority are zero. Be careful if transposing data from BIND
610zone files: the port, weight and priority numbers are in a different
611order. More than one SRV record for a given service/domain is allowed,
612all that match are returned.
613.TP
614.B --host-record=<name>[,<name>....],[<IPv4-address>],[<IPv6-address>][,<TTL>]
615Add A, AAAA and PTR records to the DNS. This adds one or more names to
616the DNS with associated IPv4 (A) and IPv6 (AAAA) records. A name may
617appear in more than one
618.B --host-record
619and therefore be assigned more than one address. Only the first
620address creates a PTR record linking the address to the name. This is
621the same rule as is used reading hosts-files.
622.B --host-record
623options are considered to be read before host-files, so a name
624appearing there inhibits PTR-record creation if it appears in
625hosts-file also. Unlike hosts-files, names are not expanded, even when
626.B --expand-hosts
627is in effect. Short and long names may appear in the same
628.B --host-record,
629eg.
630.B --host-record=laptop,laptop.thekelleys.org,192.168.0.1,1234::100
631
632If the time-to-live is given, it overrides the default, which is zero
633or the value of \fB--local-ttl\fP. The value is a positive integer and gives
634the time-to-live in seconds.
635.TP
636.B --dynamic-host=<name>,[IPv4-address],[IPv6-address],<interface>
637Add A, AAAA and PTR records to the DNS in the same subnet as the specified interface. The address is derived from the network part of each address associated with the interface, and the host part from the specified address. For example
638.B --dynamic-host=example.com,0.0.0.8,eth0
639will, when eth0 has the address 192.168.78.x and netmask 255.255.255.0 give the
640name example.com an A record for 192.168.78.8. The same principle applies to IPv6 addresses. Note that if an interface has more than one address, more than one A or AAAA record will be created. The TTL of the records is always zero, and any changes to interface addresses will be immediately reflected in them.
641.TP
642.B \-Y, --txt-record=<name>[[,<text>],<text>]
643Return a TXT DNS record. The value of TXT record is a set of strings,
644so any number may be included, delimited by commas; use quotes to put
645commas into a string. Note that the maximum length of a single string
646is 255 characters, longer strings are split into 255 character chunks.
647.TP
648.B --ptr-record=<name>[,<target>]
649Return a PTR DNS record.
650.TP
651.B --naptr-record=<name>,<order>,<preference>,<flags>,<service>,<regexp>[,<replacement>]
652Return an NAPTR DNS record, as specified in RFC3403.
653.TP
654.B --caa-record=<name>,<flags>,<tag>,<value>
655Return a CAA DNS record, as specified in RFC6844.
656.TP
657.B --cname=<cname>,[<cname>,]<target>[,<TTL>]
658Return a CNAME record which indicates that <cname> is really
659<target>. There is a significant limitation on the target; it must be a
660DNS record which is known to dnsmasq and NOT a DNS record which comes from
661an upstream server. The cname must be unique, but it
662is permissible to have more than one cname pointing to the same target. Indeed
663it's possible to declare multiple cnames to a target in a single line, like so:
664.B --cname=cname1,cname2,target
665
666If the time-to-live is given, it overrides the default, which is zero
667or the value of \fB--local-ttl\fP. The value is a positive integer and gives
668the time-to-live in seconds.
669.TP
670.B --dns-rr=<name>,<RR-number>,[<hex data>]
671Return an arbitrary DNS Resource Record. The number is the type of the
672record (which is always in the C_IN class). The value of the record is
673given by the hex data, which may be of the form 01:23:45 or 01 23 45 or
674012345 or any mixture of these.
675.TP
676.B --interface-name=<name>,<interface>[/4|/6]
677Return DNS records associating the name with the address(es) of
678the given interface. This flag specifies an A or AAAA record for the given
679name in the same way as an /etc/hosts line, except that the address is
680not constant, but taken from the given interface. The interface may be
681followed by "/4" or "/6" to specify that only IPv4 or IPv6 addresses
682of the interface should be used. If the interface is
683down, not configured or non-existent, an empty record is returned. The
684matching PTR record is also created, mapping the interface address to
685the name. More than one name may be associated with an interface
686address by repeating the flag; in that case the first instance is used
687for the reverse address-to-name mapping. Note that a name used in
688\fB--interface-name\fP may not appear in /etc/hosts.
689.TP
690.B --synth-domain=<domain>,<address range>[,<prefix>[*]]
691Create artificial A/AAAA and PTR records for an address range. The
692records either seqential numbers or the address, with periods (or colons for IPv6) replaced with dashes.
693
694An examples should make this clearer. First sequential numbers.
695.B --synth-domain=thekelleys.org.uk,192.168.0.50,192.168.0.70,internal-*
696results in the name internal-0.thekelleys.org.uk. returning 192.168.0.50, internal-1.thekelleys.org.uk returning 192.168.0.51 and so on. (note the *) The same principle applies to IPv6 addresses (where the numbers may be very large). Reverse lookups from address to name behave as expected.
697
698Second,
699.B --synth-domain=thekelleys.org.uk,192.168.0.0/24,internal- (no *)
700will result in a query for internal-192-168-0-56.thekelleys.org.uk returning
701192.168.0.56 and a reverse query vice versa. The same applies to IPv6,
702but IPv6 addresses may start with '::'
703but DNS labels may not start with '-' so in this case if no prefix is
704configured a zero is added in front of the label. ::1 becomes 0--1.
705
706V4 mapped IPv6 addresses, which have a representation like ::ffff:1.2.3.4 are handled specially, and become like 0--ffff-1-2-3-4
707
708The address range can be of the form
709<start address>,<end address> or <ip address>/<prefix-length> in both forms of the option. For IPv6 the start and end addresses
710must fall in the same /64 network, or prefix-length must be greater than or equal to 64 except that shorter prefix lengths than 64 are allowed only if non-sequential names are in use.
711.TP
712.B --dumpfile=<path/to/file>
713Specify the location of a pcap-format file which dnsmasq uses to dump copies of network packets for debugging purposes. If the file exists when dnsmasq starts, it is not deleted; new packets are added to the end.
714.TP
715.B --dumpmask=<mask>
716Specify which types of packets should be added to the dumpfile. The argument should be the OR of the bitmasks for each type of packet to be dumped: it can be specified in hex by preceding the number with 0x in the normal way. Each time a packet is written to the dumpfile, dnsmasq logs the packet sequence and the mask
717representing its type. The current types are: 0x0001 - DNS queries from clients 0x0002 DNS replies to clients 0x0004 - DNS queries to upstream 0x0008 - DNS replies from upstream 0x0010 - queries send upstream for DNSSEC validation 0x0020 - replies to queries for DNSSEC validation 0x0040 - replies to client queries which fail DNSSEC validation 0x0080 replies to queries for DNSSEC validation which fail validation.
718.TP
719.B --add-mac[=base64|text]
720Add the MAC address of the requestor to DNS queries which are
721forwarded upstream. This may be used to DNS filtering by the upstream
722server. The MAC address can only be added if the requestor is on the same
723subnet as the dnsmasq server. Note that the mechanism used to achieve this (an EDNS0 option)
724is not yet standardised, so this should be considered
725experimental. Also note that exposing MAC addresses in this way may
726have security and privacy implications. The warning about caching
727given for \fB--add-subnet\fP applies to \fB--add-mac\fP too. An alternative encoding of the
728MAC, as base64, is enabled by adding the "base64" parameter and a human-readable encoding of hex-and-colons is enabled by added the "text" parameter.
729.TP
730.B --add-cpe-id=<string>
731Add an arbitrary identifying string to DNS queries which are
732forwarded upstream.
733.TP
734.B --add-subnet[[=[<IPv4 address>/]<IPv4 prefix length>][,[<IPv6 address>/]<IPv6 prefix length>]]
735Add a subnet address to the DNS queries which are forwarded
736upstream. If an address is specified in the flag, it will be used,
737otherwise, the address of the requestor will be used. The amount of
738the address forwarded depends on the prefix length parameter: 32 (128
739for IPv6) forwards the whole address, zero forwards none of it but
740still marks the request so that no upstream nameserver will add client
741address information either. The default is zero for both IPv4 and
742IPv6. Note that upstream nameservers may be configured to return
743different results based on this information, but the dnsmasq cache
744does not take account. Caching is therefore disabled for such replies,
745unless the subnet address being added is constant.
746
747For example,
748.B --add-subnet=24,96
749will add the /24 and /96 subnets of the requestor for IPv4 and IPv6 requestors, respectively.
750.B --add-subnet=1.2.3.4/24
751will add 1.2.3.0/24 for IPv4 requestors and ::/0 for IPv6 requestors.
752.B --add-subnet=1.2.3.4/24,1.2.3.4/24
753will add 1.2.3.0/24 for both IPv4 and IPv6 requestors.
754.TP
755.B --umbrella[=deviceid:<deviceid>[,orgid:<orgid>]]
756Embeds the requestor's IP address in DNS queries forwarded upstream.
757If device id or organization id are specified, the information is
758included in the forwarded queries and may be able to be used in
759filtering policies and reporting. The order of the deviceid and orgid
760attributes is irrelevant, but must be separated by a comma.
761.TP
762.B \-c, --cache-size=<cachesize>
763Set the size of dnsmasq's cache. The default is 150 names. Setting the cache size to zero disables caching. Note: huge cache size impacts performance.
764.TP
765.B \-N, --no-negcache
766Disable negative caching. Negative caching allows dnsmasq to remember
767"no such domain" answers from upstream nameservers and answer
768identical queries without forwarding them again.
769.TP
770.B \-0, --dns-forward-max=<queries>
771Set the maximum number of concurrent DNS queries. The default value is
772150, which should be fine for most setups. The only known situation
773where this needs to be increased is when using web-server log file
774resolvers, which can generate large numbers of concurrent queries. This
775parameter actually controls the number of concurrent queries per server group, where a server group is the set of server(s) associated with a single domain. So if a domain has it's own server via --server=/example.com/1.2.3.4 and 1.2.3.4 is not responding, but queries for *.example.com cannot go elsewhere, then other queries will not be affected. On configurations with many such server groups and tight resources, this value may need to be reduced.
776.TP
777.B --dnssec
778Validate DNS replies and cache DNSSEC data. When forwarding DNS queries, dnsmasq requests the
779DNSSEC records needed to validate the replies. The replies are validated and the result returned as
780the Authenticated Data bit in the DNS packet. In addition the DNSSEC records are stored in the cache, making
781validation by clients more efficient. Note that validation by clients is the most secure DNSSEC mode, but for
782clients unable to do validation, use of the AD bit set by dnsmasq is useful, provided that the network between
783the dnsmasq server and the client is trusted. Dnsmasq must be compiled with HAVE_DNSSEC enabled, and DNSSEC
784trust anchors provided, see
785.B --trust-anchor.
786Because the DNSSEC validation process uses the cache, it is not
787permitted to reduce the cache size below the default when DNSSEC is
788enabled. The nameservers upstream of dnsmasq must be DNSSEC-capable,
789ie capable of returning DNSSEC records with data. If they are not,
790then dnsmasq will not be able to determine the trusted status of
791answers and this means that DNS service will be entirely broken.
792.TP
793.B --trust-anchor=[<class>],<domain>,<key-tag>,<algorithm>,<digest-type>,<digest>
794Provide DS records to act a trust anchors for DNSSEC
795validation. Typically these will be the DS record(s) for Key Signing
796key(s) (KSK) of the root zone,
797but trust anchors for limited domains are also possible. The current
798root-zone trust anchors may be downloaded from https://data.iana.org/root-anchors/root-anchors.xml
799.TP
800.B --dnssec-check-unsigned[=no]
801As a default, dnsmasq checks that unsigned DNS replies are
802legitimate: this entails possible extra queries even for the majority of DNS
803zones which are not, at the moment, signed. If
804.B --dnssec-check-unsigned=no
805appears in the configuration, then such replies they are assumed to be valid and passed on (without the
806"authentic data" bit set, of course). This does not protect against an
807attacker forging unsigned replies for signed DNS zones, but it is
808fast.
809
810Versions of dnsmasq prior to 2.80 defaulted to not checking unsigned replies, and used
811.B --dnssec-check-unsigned
812to switch this on. Such configurations will continue to work as before, but those which used the default of no checking will need to be altered to explicitly select no checking. The new default is because switching off checking for unsigned replies is inherently dangerous. Not only does it open the possiblity of forged replies, but it allows everything to appear to be working even when the upstream namesevers do not support DNSSEC, and in this case no DNSSEC validation at all is occurring.
813.TP
814.B --dnssec-no-timecheck
815DNSSEC signatures are only valid for specified time windows, and should be rejected outside those windows. This generates an
816interesting chicken-and-egg problem for machines which don't have a hardware real time clock. For these machines to determine the correct
817time typically requires use of NTP and therefore DNS, but validating DNS requires that the correct time is already known. Setting this flag
818removes the time-window checks (but not other DNSSEC validation.) only until the dnsmasq process receives SIGINT. The intention is
819that dnsmasq should be started with this flag when the platform determines that reliable time is not currently available. As soon as
820reliable time is established, a SIGINT should be sent to dnsmasq, which enables time checking, and purges the cache of DNS records
821which have not been thoroughly checked.
822
823Earlier versions of dnsmasq overloaded SIGHUP (which re-reads much configuration) to also enable time validation.
824
825If dnsmasq is run in debug mode (\fB--no-daemon\fP flag) then SIGINT retains its usual meaning of terminating the dnsmasq process.
826.TP
827.B --dnssec-timestamp=<path>
828Enables an alternative way of checking the validity of the system time for DNSSEC (see \fB--dnssec-no-timecheck\fP). In this case, the
829system time is considered to be valid once it becomes later than the timestamp on the specified file. The file is created and
830its timestamp set automatically by dnsmasq. The file must be stored on a persistent filesystem, so that it and its mtime are carried
831over system restarts. The timestamp file is created after dnsmasq has dropped root, so it must be in a location writable by the
832unprivileged user that dnsmasq runs as.
833.TP
834.B --proxy-dnssec
835Copy the DNSSEC Authenticated Data bit from upstream servers to downstream clients. This is an
836alternative to having dnsmasq validate DNSSEC, but it depends on the security of the network between
837dnsmasq and the upstream servers, and the trustworthiness of the upstream servers. Note that caching the
838Authenticated Data bit correctly in all cases is not technically possible. If the AD bit is to be relied upon
839when using this option, then the cache should be disabled using --cache-size=0. In most cases, enabling DNSSEC validation
840within dnsmasq is a better option. See --dnssec for details.
841.TP
842.B --dnssec-debug
843Set debugging mode for the DNSSEC validation, set the Checking Disabled bit on upstream queries,
844and don't convert replies which do not validate to responses with
845a return code of SERVFAIL. Note that
846setting this may affect DNS behaviour in bad ways, it is not an
847extra-logging flag and should not be set in production.
848.TP
849.B --auth-zone=<domain>[,<subnet>[/<prefix length>][,<subnet>[/<prefix length>].....][,exclude:<subnet>[/<prefix length>]].....]
850Define a DNS zone for which dnsmasq acts as authoritative server. Locally defined DNS records which are in the domain
851will be served. If subnet(s) are given, A and AAAA records must be in one of the
852specified subnets.
853
854As alternative to directly specifying the subnets, it's possible to
855give the name of an interface, in which case the subnets implied by
856that interface's configured addresses and netmask/prefix-length are
857used; this is useful when using constructed DHCP ranges as the actual
858address is dynamic and not known when configuring dnsmasq. The
859interface addresses may be confined to only IPv6 addresses using
860<interface>/6 or to only IPv4 using <interface>/4. This is useful when
861an interface has dynamically determined global IPv6 addresses which should
862appear in the zone, but RFC1918 IPv4 addresses which should not.
863Interface-name and address-literal subnet specifications may be used
864freely in the same \fB--auth-zone\fP declaration.
865
866It's possible to exclude certain IP addresses from responses. It can be
867used, to make sure that answers contain only global routeable IP
868addresses (by excluding loopback, RFC1918 and ULA addresses).
869
870The subnet(s) are also used to define in-addr.arpa and
871ip6.arpa domains which are served for reverse-DNS queries. If not
872specified, the prefix length defaults to 24 for IPv4 and 64 for IPv6.
873For IPv4 subnets, the prefix length should be have the value 8, 16 or 24
874unless you are familiar with RFC 2317 and have arranged the
875in-addr.arpa delegation accordingly. Note that if no subnets are
876specified, then no reverse queries are answered.
877.TP
878.B --auth-soa=<serial>[,<hostmaster>[,<refresh>[,<retry>[,<expiry>]]]]
879Specify fields in the SOA record associated with authoritative
880zones. Note that this is optional, all the values are set to sane defaults.
881.TP
882.B --auth-sec-servers=<domain>[,<domain>[,<domain>...]]
883Specify any secondary servers for a zone for which dnsmasq is
884authoritative. These servers must be configured to get zone data from
885dnsmasq by zone transfer, and answer queries for the same
886authoritative zones as dnsmasq.
887.TP
888.B --auth-peer=<ip-address>[,<ip-address>[,<ip-address>...]]
889Specify the addresses of secondary servers which are allowed to
890initiate zone transfer (AXFR) requests for zones for which dnsmasq is
891authoritative. If this option is not given but --auth-sec-servers is,
892then AXFR requests will be
893accepted from any secondary. Specifying
894.B --auth-peer
895without
896.B --auth-sec-servers
897enables zone transfer but does not advertise the secondary in NS records returned by dnsmasq.
898.TP
899.B --conntrack
900Read the Linux connection track mark associated with incoming DNS
901queries and set the same mark value on upstream traffic used to answer
902those queries. This allows traffic generated by dnsmasq to be
903associated with the queries which cause it, useful for bandwidth
904accounting and firewalling. Dnsmasq must have conntrack support
905compiled in and the kernel must have conntrack support
906included and configured. This option cannot be combined with
907.B --query-port.
908.TP
909.B \-F, --dhcp-range=[tag:<tag>[,tag:<tag>],][set:<tag>,]<start-addr>[,<end-addr>|<mode>[,<netmask>[,<broadcast>]]][,<lease time>]
910.TP
911.B \-F, --dhcp-range=[tag:<tag>[,tag:<tag>],][set:<tag>,]<start-IPv6addr>[,<end-IPv6addr>|constructor:<interface>][,<mode>][,<prefix-len>][,<lease time>]
912
913Enable the DHCP server. Addresses will be given out from the range
914<start-addr> to <end-addr> and from statically defined addresses given
915in
916.B --dhcp-host
917options. If the lease time is given, then leases
918will be given for that length of time. The lease time is in seconds,
919or minutes (eg 45m) or hours (eg 1h) or days (2d) or weeks (1w) or "infinite". If not given,
920the default lease time is one hour for IPv4 and one day for IPv6. The
921minimum lease time is two minutes. For IPv6 ranges, the lease time
922maybe "deprecated"; this sets the preferred lifetime sent in a DHCP
923lease or router advertisement to zero, which causes clients to use
924other addresses, if available, for new connections as a prelude to renumbering.
925
926This option may be repeated, with different addresses, to enable DHCP
927service to more than one network. For directly connected networks (ie,
928networks on which the machine running dnsmasq has an interface) the
929netmask is optional: dnsmasq will determine it from the interface
930configuration. For networks which receive DHCP service via a relay
931agent, dnsmasq cannot determine the netmask itself, so it should be
932specified, otherwise dnsmasq will have to guess, based on the class (A, B or
933C) of the network address. The broadcast address is
934always optional. It is always
935allowed to have more than one \fB--dhcp-range\fP in a single subnet.
936
937For IPv6, the parameters are slightly different: instead of netmask
938and broadcast address, there is an optional prefix length which must
939be equal to or larger then the prefix length on the local interface. If not
940given, this defaults to 64. Unlike the IPv4 case, the prefix length is not
941automatically derived from the interface configuration. The minimum
942size of the prefix length is 64.
943
944IPv6 (only) supports another type of range. In this, the start address and optional end address contain only the network part (ie ::1) and they are followed by
945.B constructor:<interface>.
946This forms a template which describes how to create ranges, based on the addresses assigned to the interface. For instance
947
948.B --dhcp-range=::1,::400,constructor:eth0
949
950will look for addresses on
951eth0 and then create a range from <network>::1 to <network>::400. If
952the interface is assigned more than one network, then the
953corresponding ranges will be automatically created, and then
954deprecated and finally removed again as the address is deprecated and
955then deleted. The interface name may have a final "*" wildcard. Note
956that just any address on eth0 will not do: it must not be an
957autoconfigured or privacy address, or be deprecated.
958
959If a \fB--dhcp-range\fP is only being used for stateless DHCP and/or SLAAC,
960then the address can be simply ::
961
962.B --dhcp-range=::,constructor:eth0
963
964
965The optional
966.B set:<tag>
967sets an alphanumeric label which marks this network so that
968DHCP options may be specified on a per-network basis.
969When it is prefixed with 'tag:' instead, then its meaning changes from setting
970a tag to matching it. Only one tag may be set, but more than one tag
971may be matched.
972
973The optional <mode> keyword may be
974.B static
975which tells dnsmasq to enable DHCP for the network specified, but not
976to dynamically allocate IP addresses: only hosts which have static
977addresses given via
978.B --dhcp-host
979or from /etc/ethers will be served. A static-only subnet with address
980all zeros may be used as a "catch-all" address to enable replies to all
981Information-request packets on a subnet which is provided with
982stateless DHCPv6, ie
983.B --dhcp-range=::,static
984
985For IPv4, the <mode> may be
986.B proxy
987in which case dnsmasq will provide proxy-DHCP on the specified
988subnet. (See
989.B --pxe-prompt
990and
991.B --pxe-service
992for details.)
993
994For IPv6, the mode may be some combination of
995.B ra-only, slaac, ra-names, ra-stateless, ra-advrouter, off-link.
996
997.B ra-only
998tells dnsmasq to offer Router Advertisement only on this subnet,
999and not DHCP.
1000
1001.B slaac
1002tells dnsmasq to offer Router Advertisement on this subnet and to set
1003the A bit in the router advertisement, so that the client will use
1004SLAAC addresses. When used with a DHCP range or static DHCP address
1005this results in the client having both a DHCP-assigned and a SLAAC
1006address.
1007
1008.B ra-stateless
1009sends router advertisements with the O and A bits set, and provides a
1010stateless DHCP service. The client will use a SLAAC address, and use
1011DHCP for other configuration information.
1012
1013.B ra-names
1014enables a mode
1015which gives DNS names to dual-stack hosts which do SLAAC for
1016IPv6. Dnsmasq uses the host's IPv4 lease to derive the name, network
1017segment and MAC address and assumes that the host will also have an
1018IPv6 address calculated using the SLAAC algorithm, on the same network
1019segment. The address is pinged, and if a reply is received, an AAAA
1020record is added to the DNS for this IPv6
1021address. Note that this is only happens for directly-connected
1022networks, (not one doing DHCP via a relay) and it will not work
1023if a host is using privacy extensions.
1024.B ra-names
1025can be combined with
1026.B ra-stateless
1027and
1028.B slaac.
1029
1030.B ra-advrouter
1031enables a mode where router address(es) rather than prefix(es) are included in the advertisements.
1032This is described in RFC-3775 section 7.2 and is used in mobile IPv6. In this mode the interval option
1033is also included, as described in RFC-3775 section 7.3.
1034
1035.B off-link
1036tells dnsmasq to advertise the prefix without the on-link (aka L) bit set.
1037
1038.TP
1039.B \-G, --dhcp-host=[<hwaddr>][,id:<client_id>|*][,set:<tag>][tag:<tag>][,<ipaddr>][,<hostname>][,<lease_time>][,ignore]
1040Specify per host parameters for the DHCP server. This allows a machine
1041with a particular hardware address to be always allocated the same
1042hostname, IP address and lease time. A hostname specified like this
1043overrides any supplied by the DHCP client on the machine. It is also
1044allowable to omit the hardware address and include the hostname, in
1045which case the IP address and lease times will apply to any machine
1046claiming that name. For example
1047.B --dhcp-host=00:20:e0:3b:13:af,wap,infinite
1048tells dnsmasq to give
1049the machine with hardware address 00:20:e0:3b:13:af the name wap, and
1050an infinite DHCP lease.
1051.B --dhcp-host=lap,192.168.0.199
1052tells
1053dnsmasq to always allocate the machine lap the IP address
1054192.168.0.199.
1055
1056Addresses allocated like this are not constrained to be
1057in the range given by the \fB--dhcp-range\fP option, but they must be in
1058the same subnet as some valid dhcp-range. For
1059subnets which don't need a pool of dynamically allocated addresses,
1060use the "static" keyword in the \fB--dhcp-range\fP declaration.
1061
1062It is allowed to use client identifiers (called client
1063DUID in IPv6-land) rather than
1064hardware addresses to identify hosts by prefixing with 'id:'. Thus:
1065.B --dhcp-host=id:01:02:03:04,.....
1066refers to the host with client identifier 01:02:03:04. It is also
1067allowed to specify the client ID as text, like this:
1068.B --dhcp-host=id:clientidastext,.....
1069
1070A single
1071.B --dhcp-host
1072may contain an IPv4 address or one or more IPv6 addresses, or both. IPv6 addresses must be bracketed by square brackets thus:
1073.B --dhcp-host=laptop,[1234::56]
1074IPv6 addresses may contain only the host-identifier part:
1075.B --dhcp-host=laptop,[::56]
1076in which case they act as wildcards in constructed DHCP ranges, with
1077the appropriate network part inserted. For IPv6, an address may include a prefix length:
1078.B --dhcp-host=laptop,[1234:50/126]
1079which (in this case) specifies four addresses, 1234::50 to 1234::53. This (an the ability
1080to specify multiple addresses) is useful
1081when a host presents either a consistent name or hardware-ID, but varying DUIDs, since it allows
1082dnsmasq to honour the static address allocation but assign a different adddress for each DUID. This
1083typically occurs when chain netbooting, as each stage of the chain gets in turn allocates an address.
1084
1085Note that in IPv6 DHCP, the hardware address may not be
1086available, though it normally is for direct-connected clients, or
1087clients using DHCP relays which support RFC 6939.
1088
1089
1090For DHCPv4, the special option id:* means "ignore any client-id
1091and use MAC addresses only." This is useful when a client presents a client-id sometimes
1092but not others.
1093
1094If a name appears in /etc/hosts, the associated address can be
1095allocated to a DHCP lease, but only if a
1096.B --dhcp-host
1097option specifying the name also exists. Only one hostname can be
1098given in a
1099.B --dhcp-host
1100option, but aliases are possible by using CNAMEs. (See
1101.B --cname
1102).
1103
1104More than one
1105.B --dhcp-host
1106can be associated (by name, hardware address or UID) with a host. Which one is used
1107(and therefore which address is allocated by DHCP and appears in the DNS) depends
1108on the subnet on which the host last obtained a DHCP lease:
1109the
1110.B --dhcp-host
1111with an address within the subnet is used. If more than one address is within the subnet,
1112the result is undefined. A corollary to this is that the name associated with a host using
1113.B --dhcp-host
1114does not appear in the DNS until the host obtains a DHCP lease.
1115
1116
1117The special keyword "ignore"
1118tells dnsmasq to never offer a DHCP lease to a machine. The machine
1119can be specified by hardware address, client ID or hostname, for
1120instance
1121.B --dhcp-host=00:20:e0:3b:13:af,ignore
1122This is
1123useful when there is another DHCP server on the network which should
1124be used by some machines.
1125
1126The set:<tag> construct sets the tag
1127whenever this \fB--dhcp-host\fP directive is in use. This can be used to
1128selectively send DHCP options just for this host. More than one tag
1129can be set in a \fB--dhcp-host\fP directive (but not in other places where
1130"set:<tag>" is allowed). When a host matches any
1131\fB--dhcp-host\fP directive (or one implied by /etc/ethers) then the special
1132tag "known" is set. This allows dnsmasq to be configured to
1133ignore requests from unknown machines using
1134.B --dhcp-ignore=tag:!known
1135If the host matches only a \fB--dhcp-host\fP directive which cannot
1136be used because it specifies an address on different subnet, the tag "known-othernet" is set.
1137
1138The tag:<tag> construct filters which dhcp-host directives are used. Tagged directives are used in preference to untagged ones.
1139
1140Ethernet addresses (but not client-ids) may have
1141wildcard bytes, so for example
1142.B --dhcp-host=00:20:e0:3b:13:*,ignore
1143will cause dnsmasq to ignore a range of hardware addresses. Note that
1144the "*" will need to be escaped or quoted on a command line, but not
1145in the configuration file.
1146
1147Hardware addresses normally match any
1148network (ARP) type, but it is possible to restrict them to a single
1149ARP type by preceding them with the ARP-type (in HEX) and "-". so
1150.B --dhcp-host=06-00:20:e0:3b:13:af,1.2.3.4
1151will only match a
1152Token-Ring hardware address, since the ARP-address type for token ring
1153is 6.
1154
1155As a special case, in DHCPv4, it is possible to include more than one
1156hardware address. eg:
1157.B --dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.2
1158This allows an IP address to be associated with
1159multiple hardware addresses, and gives dnsmasq permission to abandon a
1160DHCP lease to one of the hardware addresses when another one asks for
1161a lease. Beware that this is a dangerous thing to do, it will only
1162work reliably if only one of the hardware addresses is active at any
1163time and there is no way for dnsmasq to enforce this. It is, for instance,
1164useful to allocate a stable IP address to a laptop which
1165has both wired and wireless interfaces.
1166.TP
1167.B --dhcp-hostsfile=<path>
1168Read DHCP host information from the specified file. If a directory
1169is given, then read all the files contained in that directory in alphabetical order. The file contains
1170information about one host per line. The format of a line is the same
1171as text to the right of '=' in \fB--dhcp-host\fP. The advantage of storing DHCP host information
1172in this file is that it can be changed without re-starting dnsmasq:
1173the file will be re-read when dnsmasq receives SIGHUP.
1174.TP
1175.B --dhcp-optsfile=<path>
1176Read DHCP option information from the specified file. If a directory
1177is given, then read all the files contained in that directory in alphabetical order. The advantage of
1178using this option is the same as for \fB--dhcp-hostsfile\fP: the
1179\fB--dhcp-optsfile\fP will be re-read when dnsmasq receives SIGHUP. Note that
1180it is possible to encode the information in a
1181.B --dhcp-boot
1182flag as DHCP options, using the options names bootfile-name,
1183server-ip-address and tftp-server. This allows these to be included
1184in a \fB--dhcp-optsfile\fP.
1185.TP
1186.B --dhcp-hostsdir=<path>
1187This is equivalent to \fB--dhcp-hostsfile\fP, except for the following. The path MUST be a
1188directory, and not an individual file. Changed or new files within
1189the directory are read automatically, without the need to send SIGHUP.
1190If a file is deleted or changed after it has been read by dnsmasq, then the
1191host record it contained will remain until dnsmasq receives a SIGHUP, or
1192is restarted; ie host records are only added dynamically. The order in which the
1193files in a directory are read is not defined.
1194.TP
1195.B --dhcp-optsdir=<path>
1196This is equivalent to \fB--dhcp-optsfile\fP, with the differences noted for \fB--dhcp-hostsdir\fP.
1197.TP
1198.B \-Z, --read-ethers
1199Read /etc/ethers for information about hosts for the DHCP server. The
1200format of /etc/ethers is a hardware address, followed by either a
1201hostname or dotted-quad IP address. When read by dnsmasq these lines
1202have exactly the same effect as
1203.B --dhcp-host
1204options containing the same information. /etc/ethers is re-read when
1205dnsmasq receives SIGHUP. IPv6 addresses are NOT read from /etc/ethers.
1206.TP
1207.B \-O, --dhcp-option=[tag:<tag>,[tag:<tag>,]][encap:<opt>,][vi-encap:<enterprise>,][vendor:[<vendor-class>],][<opt>|option:<opt-name>|option6:<opt>|option6:<opt-name>],[<value>[,<value>]]
1208Specify different or extra options to DHCP clients. By default,
1209dnsmasq sends some standard options to DHCP clients, the netmask and
1210broadcast address are set to the same as the host running dnsmasq, and
1211the DNS server and default route are set to the address of the machine
1212running dnsmasq. (Equivalent rules apply for IPv6.) If the domain name option has been set, that is sent.
1213This configuration allows these defaults to be overridden,
1214or other options specified. The option, to be sent may be given as a
1215decimal number or as "option:<option-name>" The option numbers are
1216specified in RFC2132 and subsequent RFCs. The set of option-names
1217known by dnsmasq can be discovered by running "dnsmasq --help dhcp".
1218For example, to set the default route option to
1219192.168.4.4, do
1220.B --dhcp-option=3,192.168.4.4
1221or
1222.B --dhcp-option = option:router, 192.168.4.4
1223and to set the time-server address to 192.168.0.4, do
1224.B --dhcp-option = 42,192.168.0.4
1225or
1226.B --dhcp-option = option:ntp-server, 192.168.0.4
1227The special address 0.0.0.0 is taken to mean "the address of the
1228machine running dnsmasq".
1229
1230Data types allowed are comma separated
1231dotted-quad IPv4 addresses, []-wrapped IPv6 addresses, a decimal number, colon-separated hex digits
1232and a text string. If the optional tags are given then
1233this option is only sent when all the tags are matched.
1234
1235Special processing is done on a text argument for option 119, to
1236conform with RFC 3397. Text or dotted-quad IP addresses as arguments
1237to option 120 are handled as per RFC 3361. Dotted-quad IP addresses
1238which are followed by a slash and then a netmask size are encoded as
1239described in RFC 3442.
1240
1241IPv6 options are specified using the
1242.B option6:
1243keyword, followed by the option number or option name. The IPv6 option
1244name space is disjoint from the IPv4 option name space. IPv6 addresses
1245in options must be bracketed with square brackets, eg.
1246.B --dhcp-option=option6:ntp-server,[1234::56]
1247For IPv6, [::] means "the global address of
1248the machine running dnsmasq", whilst [fd00::] is replaced with the
1249ULA, if it exists, and [fe80::] with the link-local address.
1250
1251Be careful: no checking is done that the correct type of data for the
1252option number is sent, it is quite possible to
1253persuade dnsmasq to generate illegal DHCP packets with injudicious use
1254of this flag. When the value is a decimal number, dnsmasq must determine how
1255large the data item is. It does this by examining the option number and/or the
1256value, but can be overridden by appending a single letter flag as follows:
1257b = one byte, s = two bytes, i = four bytes. This is mainly useful with
1258encapsulated vendor class options (see below) where dnsmasq cannot
1259determine data size from the option number. Option data which
1260consists solely of periods and digits will be interpreted by dnsmasq
1261as an IP address, and inserted into an option as such. To force a
1262literal string, use quotes. For instance when using option 66 to send
1263a literal IP address as TFTP server name, it is necessary to do
1264.B --dhcp-option=66,"1.2.3.4"
1265
1266Encapsulated Vendor-class options may also be specified (IPv4 only) using
1267\fB--dhcp-option\fP: for instance
1268.B --dhcp-option=vendor:PXEClient,1,0.0.0.0
1269sends the encapsulated vendor
1270class-specific option "mftp-address=0.0.0.0" to any client whose
1271vendor-class matches "PXEClient". The vendor-class matching is
1272substring based (see \fB--dhcp-vendorclass\fP for details). If a
1273vendor-class option (number 60) is sent by dnsmasq, then that is used
1274for selecting encapsulated options in preference to any sent by the
1275client. It is
1276possible to omit the vendorclass completely;
1277.B --dhcp-option=vendor:,1,0.0.0.0
1278in which case the encapsulated option is always sent.
1279
1280Options may be encapsulated (IPv4 only) within other options: for instance
1281.B --dhcp-option=encap:175, 190, "iscsi-client0"
1282will send option 175, within which is the option 190. If multiple
1283options are given which are encapsulated with the same option number
1284then they will be correctly combined into one encapsulated option.
1285encap: and vendor: are may not both be set in the same \fB--dhcp-option\fP.
1286
1287The final variant on encapsulated options is "Vendor-Identifying
1288Vendor Options" as specified by RFC3925. These are denoted like this:
1289.B --dhcp-option=vi-encap:2, 10, "text"
1290The number in the vi-encap: section is the IANA enterprise number
1291used to identify this option. This form of encapsulation is supported
1292in IPv6.
1293
1294The address 0.0.0.0 is not treated specially in
1295encapsulated options.
1296.TP
1297.B --dhcp-option-force=[tag:<tag>,[tag:<tag>,]][encap:<opt>,][vi-encap:<enterprise>,][vendor:[<vendor-class>],]<opt>,[<value>[,<value>]]
1298This works in exactly the same way as
1299.B --dhcp-option
1300except that the option will always be sent, even if the client does
1301not ask for it in the parameter request list. This is sometimes
1302needed, for example when sending options to PXELinux.
1303.TP
1304.B --dhcp-no-override
1305(IPv4 only) Disable re-use of the DHCP servername and filename fields as extra
1306option space. If it can, dnsmasq moves the boot server and filename
1307information (from \fB--dhcp-boot\fP) out of their dedicated fields into
1308DHCP options. This make extra space available in the DHCP packet for
1309options but can, rarely, confuse old or broken clients. This flag
1310forces "simple and safe" behaviour to avoid problems in such a case.
1311.TP
1312.B --dhcp-relay=<local address>,<server address>[,<interface]
1313Configure dnsmasq to do DHCP relay. The local address is an address
1314allocated to an interface on the host running dnsmasq. All DHCP
1315requests arriving on that interface will we relayed to a remote DHCP
1316server at the server address. It is possible to relay from a single local
1317address to multiple remote servers by using multiple \fB--dhcp-relay\fP
1318configs with the same local address and different server
1319addresses. A server address must be an IP literal address, not a
1320domain name. In the case of DHCPv6, the server address may be the
1321ALL_SERVERS multicast address, ff05::1:3. In this case the interface
1322must be given, not be wildcard, and is used to direct the multicast to the
1323correct interface to reach the DHCP server.
1324
1325Access control for DHCP clients has the same rules as for the DHCP
1326server, see \fB--interface\fP, \fB--except-interface\fP, etc. The optional
1327interface name in the \fB--dhcp-relay\fP config has a different function: it
1328controls on which interface DHCP replies from the server will be
1329accepted. This is intended for configurations which have three
1330interfaces: one being relayed from, a second connecting the DHCP
1331server, and a third untrusted network, typically the wider
1332internet. It avoids the possibility of spoof replies arriving via this
1333third interface.
1334
1335It is allowed to have dnsmasq act as a DHCP server on one set of
1336interfaces and relay from a disjoint set of interfaces. Note that
1337whilst it is quite possible to write configurations which appear to
1338act as a server and a relay on the same interface, this is not
1339supported: the relay function will take precedence.
1340
1341Both DHCPv4 and DHCPv6 relay is supported. It's not possible to relay
1342DHCPv4 to a DHCPv6 server or vice-versa.
1343.TP
1344.B \-U, --dhcp-vendorclass=set:<tag>,[enterprise:<IANA-enterprise number>,]<vendor-class>
1345Map from a vendor-class string to a tag. Most DHCP clients provide a
1346"vendor class" which represents, in some sense, the type of host. This option
1347maps vendor classes to tags, so that DHCP options may be selectively delivered
1348to different classes of hosts. For example
1349.B --dhcp-vendorclass=set:printers,Hewlett-Packard JetDirect
1350will allow options to be set only for HP printers like so:
1351.B --dhcp-option=tag:printers,3,192.168.4.4
1352The vendor-class string is
1353substring matched against the vendor-class supplied by the client, to
1354allow fuzzy matching. The set: prefix is optional but allowed for
1355consistency.
1356
1357Note that in IPv6 only, vendorclasses are namespaced with an
1358IANA-allocated enterprise number. This is given with enterprise:
1359keyword and specifies that only vendorclasses matching the specified
1360number should be searched.
1361.TP
1362.B \-j, --dhcp-userclass=set:<tag>,<user-class>
1363Map from a user-class string to a tag (with substring
1364matching, like vendor classes). Most DHCP clients provide a
1365"user class" which is configurable. This option
1366maps user classes to tags, so that DHCP options may be selectively delivered
1367to different classes of hosts. It is possible, for instance to use
1368this to set a different printer server for hosts in the class
1369"accounts" than for hosts in the class "engineering".
1370.TP
1371.B \-4, --dhcp-mac=set:<tag>,<MAC address>
1372Map from a MAC address to a tag. The MAC address may include
1373wildcards. For example
1374.B --dhcp-mac=set:3com,01:34:23:*:*:*
1375will set the tag "3com" for any host whose MAC address matches the pattern.
1376.TP
1377.B --dhcp-circuitid=set:<tag>,<circuit-id>, --dhcp-remoteid=set:<tag>,<remote-id>
1378Map from RFC3046 relay agent options to tags. This data may
1379be provided by DHCP relay agents. The circuit-id or remote-id is
1380normally given as colon-separated hex, but is also allowed to be a
1381simple string. If an exact match is achieved between the circuit or
1382agent ID and one provided by a relay agent, the tag is set.
1383
1384.B --dhcp-remoteid
1385(but not \fB--dhcp-circuitid\fP) is supported in IPv6.
1386.TP
1387.B --dhcp-subscrid=set:<tag>,<subscriber-id>
1388(IPv4 and IPv6) Map from RFC3993 subscriber-id relay agent options to tags.
1389.TP
1390.B --dhcp-proxy[=<ip addr>]......
1391(IPv4 only) A normal DHCP relay agent is only used to forward the initial parts of
1392a DHCP interaction to the DHCP server. Once a client is configured, it
1393communicates directly with the server. This is undesirable if the
1394relay agent is adding extra information to the DHCP packets, such as
1395that used by
1396.B --dhcp-circuitid
1397and
1398.B --dhcp-remoteid.
1399A full relay implementation can use the RFC 5107 serverid-override
1400option to force the DHCP server to use the relay as a full proxy, with all
1401packets passing through it. This flag provides an alternative method
1402of doing the same thing, for relays which don't support RFC
14035107. Given alone, it manipulates the server-id for all interactions
1404via relays. If a list of IP addresses is given, only interactions via
1405relays at those addresses are affected.
1406.TP
1407.B --dhcp-match=set:<tag>,<option number>|option:<option name>|vi-encap:<enterprise>[,<value>]
1408Without a value, set the tag if the client sends a DHCP
1409option of the given number or name. When a value is given, set the tag only if
1410the option is sent and matches the value. The value may be of the form
1411"01:ff:*:02" in which case the value must match (apart from wildcards)
1412but the option sent may have unmatched data past the end of the
1413value. The value may also be of the same form as in
1414.B --dhcp-option
1415in which case the option sent is treated as an array, and one element
1416must match, so
1417.B --dhcp-match=set:efi-ia32,option:client-arch,6
1418will set the tag "efi-ia32" if the the number 6 appears in the list of
1419architectures sent by the client in option 93. (See RFC 4578 for
1420details.) If the value is a string, substring matching is used.
1421
1422The special form with vi-encap:<enterprise number> matches against
1423vendor-identifying vendor classes for the specified enterprise. Please
1424see RFC 3925 for more details of these rare and interesting beasts.
1425.TP
1426.B --dhcp-name-match=set:<tag>,<name>[*]
1427Set the tag if the given name is supplied by a DHCP client. There may be a single trailing wildcard *, which has the usual meaning. Combined with dhcp-ignore or dhcp-ignore-names this gives the ability to ignore certain clients by name, or disallow certain hostnames from being claimed by a client.
1428.TP
1429.B --tag-if=set:<tag>[,set:<tag>[,tag:<tag>[,tag:<tag>]]]
1430Perform boolean operations on tags. Any tag appearing as set:<tag> is set if
1431all the tags which appear as tag:<tag> are set, (or unset when tag:!<tag> is used)
1432If no tag:<tag> appears set:<tag> tags are set unconditionally.
1433Any number of set: and tag: forms may appear, in any order.
1434\fB--tag-if\fP lines are executed in order, so if the tag in tag:<tag> is a
1435tag set by another
1436.B --tag-if,
1437the line which sets the tag must precede the one which tests it.
1438
1439As an extension, the tag:<tag> clauses support limited wildcard matching,
1440similar to the matching in the \fB--interface\fP directive. This allows, for
1441example, using \fB--tag-if=set:ppp,tag:ppp*\fP to set the tag 'ppp' for all requests
1442received on any matching interface (ppp0, ppp1, etc). This can be used in conjunction
1443with the tag:!<tag> format meaning that no tag matching the wildcard may be set.
1444.TP
1445.B \-J, --dhcp-ignore=tag:<tag>[,tag:<tag>]
1446When all the given tags appear in the tag set ignore the host and do
1447not allocate it a DHCP lease.
1448.TP
1449.B --dhcp-ignore-names[=tag:<tag>[,tag:<tag>]]
1450When all the given tags appear in the tag set, ignore any hostname
1451provided by the host. Note that, unlike \fB--dhcp-ignore\fP, it is permissible
1452to supply no tags, in which case DHCP-client supplied hostnames
1453are always ignored, and DHCP hosts are added to the DNS using only
1454\fB--dhcp-host\fP configuration in dnsmasq and the contents of /etc/hosts and
1455/etc/ethers.
1456.TP
1457.B --dhcp-generate-names=tag:<tag>[,tag:<tag>]
1458(IPv4 only) Generate a name for DHCP clients which do not otherwise have one,
1459using the MAC address expressed in hex, separated by dashes. Note that
1460if a host provides a name, it will be used by preference to this,
1461unless
1462.B --dhcp-ignore-names
1463is set.
1464.TP
1465.B --dhcp-broadcast[=tag:<tag>[,tag:<tag>]]
1466(IPv4 only) When all the given tags appear in the tag set, always use broadcast to
1467communicate with the host when it is unconfigured. It is permissible
1468to supply no tags, in which case this is unconditional. Most DHCP clients which
1469need broadcast replies set a flag in their requests so that this
1470happens automatically, some old BOOTP clients do not.
1471.TP
1472.B \-M, --dhcp-boot=[tag:<tag>,]<filename>,[<servername>[,<server address>|<tftp_servername>]]
1473(IPv4 only) Set BOOTP options to be returned by the DHCP server. Server name and
1474address are optional: if not provided, the name is left empty, and the
1475address set to the address of the machine running dnsmasq. If dnsmasq
1476is providing a TFTP service (see
1477.B --enable-tftp
1478) then only the filename is required here to enable network booting.
1479If the optional tag(s) are given,
1480they must match for this configuration to be sent.
1481Instead of an IP address, the TFTP server address can be given as a domain
1482name which is looked up in /etc/hosts. This name can be associated in
1483/etc/hosts with multiple IP addresses, which are used round-robin.
1484This facility can be used to load balance the tftp load among a set of servers.
1485.TP
1486.B --dhcp-sequential-ip
1487Dnsmasq is designed to choose IP addresses for DHCP clients using a
1488hash of the client's MAC address. This normally allows a client's
1489address to remain stable long-term, even if the client sometimes allows its DHCP
1490lease to expire. In this default mode IP addresses are distributed
1491pseudo-randomly over the entire available address range. There are
1492sometimes circumstances (typically server deployment) where it is more
1493convenient to have IP
1494addresses allocated sequentially, starting from the lowest available
1495address, and setting this flag enables this mode. Note that in the
1496sequential mode, clients which allow a lease to expire are much more
1497likely to move IP address; for this reason it should not be generally used.
1498.TP
1499.B --dhcp-ignore-clid
1500Dnsmasq is reading 'client identifier' (RFC 2131) option sent by clients
1501(if available) to identify clients. This allow to serve same IP address
1502for a host using several interfaces. Use this option to disable 'client identifier'
1503reading, i.e. to always identify a host using the MAC address.
1504.TP
1505.B --pxe-service=[tag:<tag>,]<CSA>,<menu text>[,<basename>|<bootservicetype>][,<server address>|<server_name>]
1506Most uses of PXE boot-ROMS simply allow the PXE
1507system to obtain an IP address and then download the file specified by
1508.B --dhcp-boot
1509and execute it. However the PXE system is capable of more complex
1510functions when supported by a suitable DHCP server.
1511
1512This specifies a boot option which may appear in a PXE boot menu. <CSA> is
1513client system type, only services of the correct type will appear in a
1514menu. The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86,
1515Intel_Lean_Client, IA32_EFI, x86-64_EFI, Xscale_EFI, BC_EFI, ARM32_EFI and ARM64_EFI; an
1516integer may be used for other types. The
1517parameter after the menu text may be a file name, in which case dnsmasq acts as a
1518boot server and directs the PXE client to download the file by TFTP,
1519either from itself (
1520.B --enable-tftp
1521must be set for this to work) or another TFTP server if the final server
1522address/name is given.
1523Note that the "layer"
1524suffix (normally ".0") is supplied by PXE, and need not be added to
1525the basename. Alternatively, the basename may be a filename, complete with suffix, in which case
1526no layer suffix is added. If an integer boot service type, rather than a basename
1527is given, then the PXE client will search for a
1528suitable boot service for that type on the network. This search may be done
1529by broadcast, or direct to a server if its IP address/name is provided.
1530If no boot service type or filename is provided (or a boot service type of 0 is specified)
1531then the menu entry will abort the net boot procedure and
1532continue booting from local media. The server address can be given as a domain
1533name which is looked up in /etc/hosts. This name can be associated in
1534/etc/hosts with multiple IP addresses, which are used round-robin.
1535.TP
1536.B --pxe-prompt=[tag:<tag>,]<prompt>[,<timeout>]
1537Setting this provides a prompt to be displayed after PXE boot. If the
1538timeout is given then after the
1539timeout has elapsed with no keyboard input, the first available menu
1540option will be automatically executed. If the timeout is zero then the first available menu
1541item will be executed immediately. If
1542.B --pxe-prompt
1543is omitted the system will wait for user input if there are multiple
1544items in the menu, but boot immediately if
1545there is only one. See
1546.B --pxe-service
1547for details of menu items.
1548
1549Dnsmasq supports PXE "proxy-DHCP", in this case another DHCP server on
1550the network is responsible for allocating IP addresses, and dnsmasq
1551simply provides the information given in
1552.B --pxe-prompt
1553and
1554.B --pxe-service
1555to allow netbooting. This mode is enabled using the
1556.B proxy
1557keyword in
1558.B --dhcp-range.
1559.TP
1560.B --dhcp-pxe-vendor=<vendor>[,...]
1561According to UEFI and PXE specifications, DHCP packets between PXE clients and
1562proxy PXE servers should have
1563.I PXEClient
1564in their vendor-class field. However, the firmware of computers from a few
1565vendors is customized to carry a different identifier in that field. This option
1566is used to consider such identifiers valid for identifying PXE clients. For
1567instance
1568
1569.B --dhcp-pxe-vendor=PXEClient,HW-Client
1570
1571will enable dnsmasq to also provide proxy PXE service to those PXE clients with
1572.I HW-Client
1573in as their identifier.
1574.TP
1575.B \-X, --dhcp-lease-max=<number>
1576Limits dnsmasq to the specified maximum number of DHCP leases. The
1577default is 1000. This limit is to prevent DoS attacks from hosts which
1578create thousands of leases and use lots of memory in the dnsmasq
1579process.
1580.TP
1581.B \-K, --dhcp-authoritative
1582Should be set when dnsmasq is definitely the only DHCP server on a network.
1583For DHCPv4, it changes the behaviour from strict RFC compliance so that DHCP requests on
1584unknown leases from unknown hosts are not ignored. This allows new hosts
1585to get a lease without a tedious timeout under all circumstances. It also
1586allows dnsmasq to rebuild its lease database without each client needing to
1587reacquire a lease, if the database is lost. For DHCPv6 it sets the
1588priority in replies to 255 (the maximum) instead of 0 (the minimum).
1589.TP
1590.B --dhcp-rapid-commit
1591Enable DHCPv4 Rapid Commit Option specified in RFC 4039. When enabled, dnsmasq
1592will respond to a DHCPDISCOVER message including a Rapid Commit
1593option with a DHCPACK including a Rapid Commit option and fully committed
1594address and configuration information. Should only be enabled if either the
1595server is the only server for the subnet, or multiple servers are present and they each commit a binding for all clients.
1596.TP
1597.B --dhcp-alternate-port[=<server port>[,<client port>]]
1598(IPv4 only) Change the ports used for DHCP from the default. If this option is
1599given alone, without arguments, it changes the ports used for DHCP
1600from 67 and 68 to 1067 and 1068. If a single argument is given, that
1601port number is used for the server and the port number plus one used
1602for the client. Finally, two port numbers allows arbitrary
1603specification of both server and client ports for DHCP.
1604.TP
1605.B \-3, --bootp-dynamic[=<network-id>[,<network-id>]]
1606(IPv4 only) Enable dynamic allocation of IP addresses to BOOTP clients. Use this
1607with care, since each address allocated to a BOOTP client is leased
1608forever, and therefore becomes permanently unavailable for re-use by
1609other hosts. if this is given without tags, then it unconditionally
1610enables dynamic allocation. With tags, only when the tags are all
1611set. It may be repeated with different tag sets.
1612.TP
1613.B \-5, --no-ping
1614(IPv4 only) By default, the DHCP server will attempt to ensure that an address is
1615not in use before allocating it to a host. It does this by sending an
1616ICMP echo request (aka "ping") to the address in question. If it gets
1617a reply, then the address must already be in use, and another is
1618tried. This flag disables this check. Use with caution.
1619.TP
1620.B --log-dhcp
1621Extra logging for DHCP: log all the options sent to DHCP clients and
1622the tags used to determine them.
1623.TP
1624.B --quiet-dhcp, --quiet-dhcp6, --quiet-ra, --quiet-tftp
1625Suppress logging of the routine operation of these protocols. Errors and
1626problems will still be logged. \fB--quiet-tftp\fP does not consider file not
1627found to be an error. \fB--quiet-dhcp\fP and quiet-dhcp6 are over-ridden by
1628\fB--log-dhcp\fP.
1629.TP
1630.B \-l, --dhcp-leasefile=<path>
1631Use the specified file to store DHCP lease information.
1632.TP
1633.B --dhcp-duid=<enterprise-id>,<uid>
1634(IPv6 only) Specify the server persistent UID which the DHCPv6 server
1635will use. This option is not normally required as dnsmasq creates a
1636DUID automatically when it is first needed. When given, this option
1637provides dnsmasq the data required to create a DUID-EN type DUID. Note
1638that once set, the DUID is stored in the lease database, so to change between DUID-EN and
1639automatically created DUIDs or vice-versa, the lease database must be
1640re-initialised. The enterprise-id is assigned by IANA, and the uid is a
1641string of hex octets unique to a particular device.
1642.TP
1643.B \-6 --dhcp-script=<path>
1644Whenever a new DHCP lease is created, or an old one destroyed, or a
1645TFTP file transfer completes, the
1646executable specified by this option is run. <path>
1647must be an absolute pathname, no PATH search occurs.
1648The arguments to the process
1649are "add", "old" or "del", the MAC
1650address of the host (or DUID for IPv6) , the IP address, and the hostname,
1651if known. "add" means a lease has been created, "del" means it has
1652been destroyed, "old" is a notification of an existing lease when
1653dnsmasq starts or a change to MAC address or hostname of an existing
1654lease (also, lease length or expiry and client-id, if \fB--leasefile-ro\fP is set
1655and lease expiry if \fB--script-on-renewal\fP is set).
1656If the MAC address is from a network type other than ethernet,
1657it will have the network type prepended, eg "06-01:23:45:67:89:ab" for
1658token ring. The process is run as root (assuming that dnsmasq was originally run as
1659root) even if dnsmasq is configured to change UID to an unprivileged user.
1660
1661The environment is inherited from the invoker of dnsmasq, with some or
1662all of the following variables added
1663
1664For both IPv4 and IPv6:
1665
1666DNSMASQ_DOMAIN if the fully-qualified domain name of the host is
1667known, this is set to the domain part. (Note that the hostname passed
1668to the script as an argument is never fully-qualified.)
1669
1670If the client provides a hostname, DNSMASQ_SUPPLIED_HOSTNAME
1671
1672If the client provides user-classes, DNSMASQ_USER_CLASS0..DNSMASQ_USER_CLASSn
1673
1674If dnsmasq was compiled with HAVE_BROKEN_RTC, then
1675the length of the lease (in seconds) is stored in
1676DNSMASQ_LEASE_LENGTH, otherwise the time of lease expiry is stored in
1677DNSMASQ_LEASE_EXPIRES. The number of seconds until lease expiry is
1678always stored in DNSMASQ_TIME_REMAINING.
1679
1680If a lease used to have a hostname, which is
1681removed, an "old" event is generated with the new state of the lease,
1682ie no name, and the former name is provided in the environment
1683variable DNSMASQ_OLD_HOSTNAME.
1684
1685DNSMASQ_INTERFACE stores the name of
1686the interface on which the request arrived; this is not set for "old"
1687actions when dnsmasq restarts.
1688
1689DNSMASQ_RELAY_ADDRESS is set if the client
1690used a DHCP relay to contact dnsmasq and the IP address of the relay
1691is known.
1692
1693DNSMASQ_TAGS contains all the tags set during the
1694DHCP transaction, separated by spaces.
1695
1696DNSMASQ_LOG_DHCP is set if
1697.B --log-dhcp
1698is in effect.
1699
1700For IPv4 only:
1701
1702DNSMASQ_CLIENT_ID if the host provided a client-id.
1703
1704DNSMASQ_CIRCUIT_ID, DNSMASQ_SUBSCRIBER_ID, DNSMASQ_REMOTE_ID if a
1705DHCP relay-agent added any of these options.
1706
1707If the client provides vendor-class, DNSMASQ_VENDOR_CLASS.
1708
1709DNSMASQ_REQUESTED_OPTIONS a string containing the decimal values in the Parameter Request List option, comma separated, if the parameter request list option is provided by the client.
1710
1711For IPv6 only:
1712
1713If the client provides vendor-class, DNSMASQ_VENDOR_CLASS_ID,
1714containing the IANA enterprise id for the class, and
1715DNSMASQ_VENDOR_CLASS0..DNSMASQ_VENDOR_CLASSn for the data.
1716
1717DNSMASQ_SERVER_DUID containing the DUID of the server: this is the same for
1718every call to the script.
1719
1720DNSMASQ_IAID containing the IAID for the lease. If the lease is a
1721temporary allocation, this is prefixed to 'T'.
1722
1723DNSMASQ_MAC containing the MAC address of the client, if known.
1724
1725Note that the supplied hostname, vendorclass and userclass data is
1726only supplied for
1727"add" actions or "old" actions when a host resumes an existing lease,
1728since these data are not held in dnsmasq's lease
1729database.
1730
1731
1732
1733All file descriptors are
1734closed except stdin, which is open to /dev/null, and stdout and stderr which capture output for logging by dnsmasq.
1735(In debug mode, stdio, stdout and stderr file are left as those inherited from the invoker of dnsmasq).
1736
1737The script is not invoked concurrently: at most one instance
1738of the script is ever running (dnsmasq waits for an instance of script to exit
1739before running the next). Changes to the lease database are which
1740require the script to be invoked are queued awaiting exit of a running instance.
1741If this queueing allows multiple state changes occur to a single
1742lease before the script can be run then
1743earlier states are discarded and the current state of that lease is
1744reflected when the script finally runs.
1745
1746At dnsmasq startup, the script will be invoked for
1747all existing leases as they are read from the lease file. Expired
1748leases will be called with "del" and others with "old". When dnsmasq
1749receives a HUP signal, the script will be invoked for existing leases
1750with an "old" event.
1751
1752
1753There are four further actions which may appear as the first argument
1754to the script, "init", "arp-add", "arp-del" and "tftp". More may be added in the future, so
1755scripts should be written to ignore unknown actions. "init" is
1756described below in
1757.B --leasefile-ro
1758The "tftp" action is invoked when a TFTP file transfer completes: the
1759arguments are the file size in bytes, the address to which the file
1760was sent, and the complete pathname of the file.
1761
1762The "arp-add" and "arp-del" actions are only called if enabled with
1763.B --script-arp
1764They are are supplied with a MAC address and IP address as arguments. "arp-add" indicates
1765the arrival of a new entry in the ARP or neighbour table, and "arp-del" indicates the deletion of same.
1766
1767.TP
1768.B --dhcp-luascript=<path>
1769Specify a script written in Lua, to be run when leases are created,
1770destroyed or changed. To use this option, dnsmasq must be compiled
1771with the correct support. The Lua interpreter is initialised once, when
1772dnsmasq starts, so that global variables persist between lease
1773events. The Lua code must define a
1774.B lease
1775function, and may provide
1776.B init
1777and
1778.B shutdown
1779functions, which are called, without arguments when dnsmasq starts up
1780and terminates. It may also provide a
1781.B tftp
1782function.
1783
1784The
1785.B lease
1786function receives the information detailed in
1787.B --dhcp-script.
1788It gets two arguments, firstly the action, which is a string
1789containing, "add", "old" or "del", and secondly a table of tag value
1790pairs. The tags mostly correspond to the environment variables
1791detailed above, for instance the tag "domain" holds the same data as
1792the environment variable DNSMASQ_DOMAIN. There are a few extra tags
1793which hold the data supplied as arguments to
1794.B --dhcp-script.
1795These are
1796.B mac_address, ip_address
1797and
1798.B hostname
1799for IPv4, and
1800.B client_duid, ip_address
1801and
1802.B hostname
1803for IPv6.
1804
1805The
1806.B tftp
1807function is called in the same way as the lease function, and the
1808table holds the tags
1809.B destination_address,
1810.B file_name
1811and
1812.B file_size.
1813
1814The
1815.B arp
1816and
1817.B arp-old
1818functions are called only when enabled with
1819.B --script-arp
1820and have a table which holds the tags
1821.B mac_address
1822and
1823.B client_address.
1824.TP
1825.B --dhcp-scriptuser
1826Specify the user as which to run the lease-change script or Lua script. This defaults to root, but can be changed to another user using this flag.
1827.TP
1828.B --script-arp
1829Enable the "arp" and "arp-old" functions in the \fB--dhcp-script\fP and \fB--dhcp-luascript\fP.
1830.TP
1831.B \-9, --leasefile-ro
1832Completely suppress use of the lease database file. The file will not
1833be created, read, or written. Change the way the lease-change
1834script (if one is provided) is called, so that the lease database may
1835be maintained in external storage by the script. In addition to the
1836invocations given in
1837.B --dhcp-script
1838the lease-change script is called once, at dnsmasq startup, with the
1839single argument "init". When called like this the script should write
1840the saved state of the lease database, in dnsmasq leasefile format, to
1841stdout and exit with zero exit code. Setting this
1842option also forces the leasechange script to be called on changes
1843to the client-id and lease length and expiry time.
1844.TP
1845.B --script-on-renewal
1846Call the DHCP script when the lease expiry time changes, for instance when the
1847lease is renewed.
1848.TP
1849.B --bridge-interface=<interface>,<alias>[,<alias>]
1850Treat DHCP (v4 and v6) requests and IPv6 Router Solicit packets
1851arriving at any of the <alias> interfaces as if they had arrived at
1852<interface>. This option allows dnsmasq to provide DHCP and RA
1853service over unaddressed and unbridged Ethernet interfaces, e.g. on an
1854OpenStack compute host where each such interface is a TAP interface to
1855a VM, or as in "old style bridging" on BSD platforms. A trailing '*'
1856wildcard can be used in each <alias>.
1857
1858It is permissible to add more than one alias using more than one \fB--bridge-interface\fP option since
1859\fB--bridge-interface=int1,alias1,alias2\fP is exactly equivalent to
1860\fB--bridge-interface=int1,alias1 --bridge-interface=int1,alias2\fP
1861.TP
1862.B --shared-network=<interface>,<addr>
1863.PD 0
1864.TP
1865.B --shared-network=<addr>,<addr>
1866.PD 1v
1867The DHCP server determines which DHCP ranges are useable for allocating an
1868address to a DHCP client based on the network from which the DHCP request arrives,
1869and the IP configuration of the server's interface on that network. The shared-network
1870option extends the available subnets (and therefore DHCP ranges) beyond the
1871subnets configured on the arrival interface.
1872
1873The first argument is either the
1874name of an interface, or an address that is configured on a local interface, and the
1875second argument is an address which defines another subnet on which addresses can be allocated.
1876
1877To be useful, there must be a suitable dhcp-range which allows address allocation on this subnet
1878and this dhcp-range MUST include the netmask.
1879
1880Using shared-network also needs extra
1881consideration of routing. Dnsmasq does not have the usual information that it uses to
1882determine the default route, so the default route option (or other routing) MUST be
1883configured manually. The client must have a route to the server: if the two-address form
1884of shared-network is used, this needs to be to the first specified address. If the interface,address
1885form is used, there must be a route to all of the addresses configured on the interface.
1886
1887The two-address form of shared-network is also usable with a DHCP relay: the first address
1888is the address of the relay and the second, as before, specifies an extra subnet which
1889addresses may be allocated from.
1890
1891.TP
1892.B \-s, --domain=<domain>[,<address range>[,local]]
1893Specifies DNS domains for the DHCP server. Domains may be be given
1894unconditionally (without the IP range) or for limited IP ranges. This has two effects;
1895firstly it causes the DHCP server to return the domain to any hosts
1896which request it, and secondly it sets the domain which it is legal
1897for DHCP-configured hosts to claim. The intention is to constrain
1898hostnames so that an untrusted host on the LAN cannot advertise
1899its name via DHCP as e.g. "microsoft.com" and capture traffic not
1900meant for it. If no domain suffix is specified, then any DHCP
1901hostname with a domain part (ie with a period) will be disallowed
1902and logged. If suffix is specified, then hostnames with a domain
1903part are allowed, provided the domain part matches the suffix. In
1904addition, when a suffix is set then hostnames without a domain
1905part have the suffix added as an optional domain part. Eg on my network I can set
1906.B --domain=thekelleys.org.uk
1907and have a machine whose DHCP hostname is "laptop". The IP address for that machine is available from
1908.B dnsmasq
1909both as "laptop" and "laptop.thekelleys.org.uk". If the domain is
1910given as "#" then the domain is read from the first "search" directive
1911in /etc/resolv.conf (or equivalent).
1912
1913The address range can be of the form
1914<ip address>,<ip address> or <ip address>/<netmask> or just a single
1915<ip address>. See
1916.B --dhcp-fqdn
1917which can change the behaviour of dnsmasq with domains.
1918
1919If the address range is given as ip-address/network-size, then a
1920additional flag "local" may be supplied which has the effect of adding
1921\fB--local\fP declarations for forward and reverse DNS queries. Eg.
1922.B --domain=thekelleys.org.uk,192.168.0.0/24,local
1923is identical to
1924.B --domain=thekelleys.org.uk,192.168.0.0/24
1925.B --local=/thekelleys.org.uk/ --local=/0.168.192.in-addr.arpa/
1926The network size must be 8, 16 or 24 for this to be legal.
1927.TP
1928.B --dhcp-fqdn
1929In the default mode, dnsmasq inserts the unqualified names of
1930DHCP clients into the DNS. For this reason, the names must be unique,
1931even if two clients which have the same name are in different
1932domains. If a second DHCP client appears which has the same name as an
1933existing client, the name is transferred to the new client. If
1934.B --dhcp-fqdn
1935is set, this behaviour changes: the unqualified name is no longer
1936put in the DNS, only the qualified name. Two DHCP clients with the
1937same name may both keep the name, provided that the domain part is
1938different (ie the fully qualified names differ.) To ensure that all
1939names have a domain part, there must be at least
1940.B --domain
1941without an address specified when
1942.B --dhcp-fqdn
1943is set.
1944.TP
1945.B --dhcp-client-update
1946Normally, when giving a DHCP lease, dnsmasq sets flags in the FQDN
1947option to tell the client not to attempt a DDNS update with its name
1948and IP address. This is because the name-IP pair is automatically
1949added into dnsmasq's DNS view. This flag suppresses that behaviour,
1950this is useful, for instance, to allow Windows clients to update
1951Active Directory servers. See RFC 4702 for details.
1952.TP
1953.B --enable-ra
1954Enable dnsmasq's IPv6 Router Advertisement feature. DHCPv6 doesn't
1955handle complete network configuration in the same way as DHCPv4. Router
1956discovery and (possibly) prefix discovery for autonomous address
1957creation are handled by a different protocol. When DHCP is in use,
1958only a subset of this is needed, and dnsmasq can handle it, using
1959existing DHCP configuration to provide most data. When RA is enabled,
1960dnsmasq will advertise a prefix for each \fB--dhcp-range\fP, with default
1961router as the relevant link-local address on
1962the machine running dnsmasq. By default, the "managed address" bits are set, and
1963the "use SLAAC" bit is reset. This can be changed for individual
1964subnets with the mode keywords described in
1965.B --dhcp-range.
1966RFC6106 DNS parameters are included in the advertisements. By default,
1967the relevant link-local address of the machine running dnsmasq is sent
1968as recursive DNS server. If provided, the DHCPv6 options dns-server and
1969domain-search are used for the DNS server (RDNSS) and the domain search list (DNSSL).
1970.TP
1971.B --ra-param=<interface>,[mtu:<integer>|<interface>|off,][high,|low,]<ra-interval>[,<router lifetime>]
1972Set non-default values for router advertisements sent via an
1973interface. The priority field for the router may be altered from the
1974default of medium with eg
1975.B --ra-param=eth0,high.
1976The interval between router advertisements may be set (in seconds) with
1977.B --ra-param=eth0,60.
1978The lifetime of the route may be changed or set to zero, which allows
1979a router to advertise prefixes but not a route via itself.
1980.B --ra-param=eth0,0,0
1981(A value of zero for the interval means the default value.) All four parameters may be set at once.
1982.B --ra-param=eth0,mtu:1280,low,60,1200
1983
1984The interface field may include a wildcard.
1985
1986The mtu: parameter may be an arbitrary interface name, in which case the MTU value for that interface is used. This is useful
1987for (eg) advertising the MTU of a WAN interface on the other interfaces of a router.
1988.TP
1989.B --dhcp-reply-delay=[tag:<tag>,]<integer>
1990Delays sending DHCPOFFER and PROXYDHCP replies for at least the specified number of seconds.
1991This can be used as workaround for bugs in PXE boot firmware that does not function properly when
1992receiving an instant reply.
1993This option takes into account the time already spent waiting (e.g. performing ping check) if any.
1994.TP
1995.B --enable-tftp[=<interface>[,<interface>]]
1996Enable the TFTP server function. This is deliberately limited to that
1997needed to net-boot a client. Only reading is allowed; the tsize and
1998blksize extensions are supported (tsize is only supported in octet
1999mode). Without an argument, the TFTP service is provided to the same set of interfaces as DHCP service.
2000If the list of interfaces is provided, that defines which interfaces receive TFTP service.
2001.TP
2002.B --tftp-root=<directory>[,<interface>]
2003Look for files to transfer using TFTP relative to the given
2004directory. When this is set, TFTP paths which include ".." are
2005rejected, to stop clients getting outside the specified root.
2006Absolute paths (starting with /) are allowed, but they must be within
2007the tftp-root. If the optional interface argument is given, the
2008directory is only used for TFTP requests via that interface.
2009.TP
2010.B --tftp-no-fail
2011Do not abort startup if specified tftp root directories are inaccessible.
2012.TP
2013.B --tftp-unique-root[=ip|mac]
2014Add the IP or hardware address of the TFTP client as a path component on the end
2015of the TFTP-root. Only valid if a \fB--tftp-root\fP is set and the directory exists.
2016Defaults to adding IP address (in standard dotted-quad format).
2017For instance, if \fB--tftp-root\fP is "/tftp" and client 1.2.3.4 requests file "myfile"
2018then the effective path will be "/tftp/1.2.3.4/myfile" if /tftp/1.2.3.4 exists or /tftp/myfile otherwise.
2019When "=mac" is specified it will append the MAC address instead, using lowercase zero padded digits
2020separated by dashes, e.g.: 01-02-03-04-aa-bb
2021Note that resolving MAC addresses is only possible if the client is in the local network or obtained
2022a DHCP lease from us.
2023.TP
2024.B --tftp-secure
2025Enable TFTP secure mode: without this, any file which is readable by
2026the dnsmasq process under normal unix access-control rules is
2027available via TFTP. When the \fB--tftp-secure\fP flag is given, only files
2028owned by the user running the dnsmasq process are accessible. If
2029dnsmasq is being run as root, different rules apply: \fB--tftp-secure\fP
2030has no effect, but only files which have the world-readable bit set
2031are accessible. It is not recommended to run dnsmasq as root with TFTP
2032enabled, and certainly not without specifying \fB--tftp-root\fP. Doing so
2033can expose any world-readable file on the server to any host on the net.
2034.TP
2035.B --tftp-lowercase
2036Convert filenames in TFTP requests to all lowercase. This is useful
2037for requests from Windows machines, which have case-insensitive
2038filesystems and tend to play fast-and-loose with case in filenames.
2039Note that dnsmasq's tftp server always converts "\\" to "/" in filenames.
2040.TP
2041.B --tftp-max=<connections>
2042Set the maximum number of concurrent TFTP connections allowed. This
2043defaults to 50. When serving a large number of TFTP connections,
2044per-process file descriptor limits may be encountered. Dnsmasq needs
2045one file descriptor for each concurrent TFTP connection and one
2046file descriptor per unique file (plus a few others). So serving the
2047same file simultaneously to n clients will use require about n + 10 file
2048descriptors, serving different files simultaneously to n clients will
2049require about (2*n) + 10 descriptors. If
2050.B --tftp-port-range
2051is given, that can affect the number of concurrent connections.
2052.TP
2053.B --tftp-mtu=<mtu size>
2054Use size as the ceiling of the MTU supported by the intervening network when
2055negotiating TFTP blocksize, overriding the MTU setting of the local interface if it is larger.
2056.TP
2057.B --tftp-no-blocksize
2058Stop the TFTP server from negotiating the "blocksize" option with a
2059client. Some buggy clients request this option but then behave badly
2060when it is granted.
2061.TP
2062.B --tftp-port-range=<start>,<end>
2063A TFTP server listens on a well-known port (69) for connection initiation,
2064but it also uses a dynamically-allocated port for each
2065connection. Normally these are allocated by the OS, but this option
2066specifies a range of ports for use by TFTP transfers. This can be
2067useful when TFTP has to traverse a firewall. The start of the range
2068cannot be lower than 1025 unless dnsmasq is running as root. The number
2069of concurrent TFTP connections is limited by the size of the port range.
2070.TP
2071.B --tftp-single-port
2072Run in a mode where the TFTP server uses ONLY the well-known port (69) for its end
2073of the TFTP transfer. This allows TFTP to work when there in NAT is the path between client and server. Note that
2074this is not strictly compliant with the RFCs specifying the TFTP protocol: use at your own risk.
2075.TP
2076.B \-C, --conf-file=<file>
2077Specify a configuration file. The presence of this option stops dnsmasq from reading the default configuration
2078file (normally /etc/dnsmasq.conf). Multiple files may be specified by repeating the option
2079either on the command line or in configuration files. A
2080filename of "-" causes dnsmasq to read configuration from stdin.
2081.TP
2082.B \-7, --conf-dir=<directory>[,<file-extension>......],
2083Read all the files in the given directory as configuration
2084files. If extension(s) are given, any files which end in those
2085extensions are skipped. Any files whose names end in ~ or start with . or start and end
2086with # are always skipped. If the extension starts with * then only files
2087which have that extension are loaded. So
2088.B --conf-dir=/path/to/dir,*.conf
2089loads all files with the suffix .conf in /path/to/dir. This flag may be given on the command
2090line or in a configuration file. If giving it on the command line, be sure to
2091escape * characters. Files are loaded in alphabetical order of filename.
2092.TP
2093.B --servers-file=<file>
2094A special case of
2095.B --conf-file
2096which differs in two respects. Firstly, only \fB--server\fP and \fB--rev-server\fP are allowed
2097in the configuration file included. Secondly, the file is re-read and the configuration
2098therein is updated when dnsmasq receives SIGHUP.
2099.SH CONFIG FILE
2100At startup, dnsmasq reads
2101.I /etc/dnsmasq.conf,
2102if it exists. (On
2103FreeBSD, the file is
2104.I /usr/local/etc/dnsmasq.conf
2105) (but see the
2106.B \--conf-file
2107and
2108.B \--conf-dir
2109options.) The format of this
2110file consists of one option per line, exactly as the long options detailed
2111in the OPTIONS section but without the leading "--". Lines starting with # are comments and ignored. For
2112options which may only be specified once, the configuration file overrides
2113the command line. Quoting is allowed in a config file:
2114between " quotes the special meanings of ,:. and # are removed and the
2115following escapes are allowed: \\\\ \\" \\t \\e \\b \\r and \\n. The later
2116corresponding to tab, escape, backspace, return and newline.
2117.SH NOTES
2118When it receives a SIGHUP,
2119.B dnsmasq
2120clears its cache and then re-loads
2121.I /etc/hosts
2122and
2123.I /etc/ethers
2124and any file given by \fB--dhcp-hostsfile\fP, \fB--dhcp-hostsdir\fP, \fB--dhcp-optsfile\fP,
2125\fB--dhcp-optsdir\fP, \fB--addn-hosts\fP or \fB--hostsdir\fP.
2126The DHCP lease change script is called for all
2127existing DHCP leases. If
2128.B
2129--no-poll
2130is set SIGHUP also re-reads
2131.I /etc/resolv.conf.
2132SIGHUP
2133does NOT re-read the configuration file.
2134.PP
2135When it receives a SIGUSR1,
2136.B dnsmasq
2137writes statistics to the system log. It writes the cache size,
2138the number of names which have had to removed from the cache before
2139they expired in order to make room for new names and the total number
2140of names that have been inserted into the cache. The number of cache hits and
2141misses and the number of authoritative queries answered are also given. For each upstream
2142server it gives the number of queries sent, and the number which
2143resulted in an error. In
2144.B --no-daemon
2145mode or when full logging is enabled (\fB--log-queries\fP), a complete dump of the
2146contents of the cache is made.
2147
2148The cache statistics are also available in the DNS as answers to
2149queries of class CHAOS and type TXT in domain bind. The domain names are cachesize.bind, insertions.bind, evictions.bind,
2150misses.bind, hits.bind, auth.bind and servers.bind. An example command to query this, using the
2151.B dig
2152utility would be
2153
2154dig +short chaos txt cachesize.bind
2155
2156.PP
2157When it receives SIGUSR2 and it is logging direct to a file (see
2158.B --log-facility
2159)
2160.B dnsmasq
2161will close and reopen the log file. Note that during this operation,
2162dnsmasq will not be running as root. When it first creates the logfile
2163dnsmasq changes the ownership of the file to the non-root user it will run
2164as. Logrotate should be configured to create a new log file with
2165the ownership which matches the existing one before sending SIGUSR2.
2166If TCP DNS queries are in progress, the old logfile will remain open in
2167child processes which are handling TCP queries and may continue to be
2168written. There is a limit of 150 seconds, after which all existing TCP
2169processes will have expired: for this reason, it is not wise to
2170configure logfile compression for logfiles which have just been
2171rotated. Using logrotate, the required options are
2172.B create
2173and
2174.B delaycompress.
2175
2176
2177.PP
2178Dnsmasq is a DNS query forwarder: it is not capable of recursively
2179answering arbitrary queries starting from the root servers but
2180forwards such queries to a fully recursive upstream DNS server which is
2181typically provided by an ISP. By default, dnsmasq reads
2182.I /etc/resolv.conf
2183to discover the IP
2184addresses of the upstream nameservers it should use, since the
2185information is typically stored there. Unless
2186.B --no-poll
2187is used,
2188.B dnsmasq
2189checks the modification time of
2190.I /etc/resolv.conf
2191(or equivalent if
2192.B \--resolv-file
2193is used) and re-reads it if it changes. This allows the DNS servers to
2194be set dynamically by PPP or DHCP since both protocols provide the
2195information.
2196Absence of
2197.I /etc/resolv.conf
2198is not an error
2199since it may not have been created before a PPP connection exists. Dnsmasq
2200simply keeps checking in case
2201.I /etc/resolv.conf
2202is created at any
2203time. Dnsmasq can be told to parse more than one resolv.conf
2204file. This is useful on a laptop, where both PPP and DHCP may be used:
2205dnsmasq can be set to poll both
2206.I /etc/ppp/resolv.conf
2207and
2208.I /etc/dhcpc/resolv.conf
2209and will use the contents of whichever changed
2210last, giving automatic switching between DNS servers.
2211.PP
2212Upstream servers may also be specified on the command line or in
2213the configuration file. These server specifications optionally take a
2214domain name which tells dnsmasq to use that server only to find names
2215in that particular domain.
2216.PP
2217In order to configure dnsmasq to act as cache for the host on which it is running, put "nameserver 127.0.0.1" in
2218.I /etc/resolv.conf
2219to force local processes to send queries to
2220dnsmasq. Then either specify the upstream servers directly to dnsmasq
2221using
2222.B \--server
2223options or put their addresses real in another file, say
2224.I /etc/resolv.dnsmasq
2225and run dnsmasq with the
2226.B \--resolv-file /etc/resolv.dnsmasq
2227option. This second technique allows for dynamic update of the server
2228addresses by PPP or DHCP.
2229.PP
2230Addresses in /etc/hosts will "shadow" different addresses for the same
2231names in the upstream DNS, so "mycompany.com 1.2.3.4" in /etc/hosts will ensure that
2232queries for "mycompany.com" always return 1.2.3.4 even if queries in
2233the upstream DNS would otherwise return a different address. There is
2234one exception to this: if the upstream DNS contains a CNAME which
2235points to a shadowed name, then looking up the CNAME through dnsmasq
2236will result in the unshadowed address associated with the target of
2237the CNAME. To work around this, add the CNAME to /etc/hosts so that
2238the CNAME is shadowed too.
2239
2240.PP
2241The tag system works as follows: For each DHCP request, dnsmasq
2242collects a set of valid tags from active configuration lines which
2243include set:<tag>, including one from the
2244.B --dhcp-range
2245used to allocate the address, one from any matching
2246.B --dhcp-host
2247(and "known" or "known-othernet" if a \fB--dhcp-host\fP matches)
2248The tag "bootp" is set for BOOTP requests, and a tag whose name is the
2249name of the interface on which the request arrived is also set.
2250
2251Any configuration lines which include one or more tag:<tag> constructs
2252will only be valid if all that tags are matched in the set derived
2253above. Typically this is \fB--dhcp-option\fP.
2254.B --dhcp-option
2255which has tags will be used in preference to an untagged
2256.B --dhcp-option,
2257provided that _all_ the tags match somewhere in the
2258set collected as described above. The prefix '!' on a tag means 'not'
2259so \fB--dhcp-option=tag:!purple,3,1.2.3.4\fP sends the option when the
2260tag purple is not in the set of valid tags. (If using this in a
2261command line rather than a configuration file, be sure to escape !,
2262which is a shell metacharacter)
2263
2264When selecting \fB--dhcp-options\fP, a tag from \fB--dhcp-range\fP is second class
2265relative to other tags, to make it easy to override options for
2266individual hosts, so
2267.B --dhcp-range=set:interface1,......
2268.B --dhcp-host=set:myhost,.....
2269.B --dhcp-option=tag:interface1,option:nis-domain,"domain1"
2270.B --dhcp-option=tag:myhost,option:nis-domain,"domain2"
2271will set the NIS-domain to domain1 for hosts in the range, but
2272override that to domain2 for a particular host.
2273
2274.PP
2275Note that for
2276.B --dhcp-range
2277both tag:<tag> and set:<tag> are allowed, to both select the range in
2278use based on (eg) \fB--dhcp-host\fP, and to affect the options sent, based on
2279the range selected.
2280
2281This system evolved from an earlier, more limited one and for backward
2282compatibility "net:" may be used instead of "tag:" and "set:" may be
2283omitted. (Except in
2284.B --dhcp-host,
2285where "net:" may be used instead of "set:".) For the same reason, '#'
2286may be used instead of '!' to indicate NOT.
2287.PP
2288The DHCP server in dnsmasq will function as a BOOTP server also,
2289provided that the MAC address and IP address for clients are given,
2290either using
2291.B --dhcp-host
2292configurations or in
2293.I /etc/ethers
2294, and a
2295.B --dhcp-range
2296configuration option is present to activate the DHCP server
2297on a particular network. (Setting \fB--bootp-dynamic\fP removes the need for
2298static address mappings.) The filename
2299parameter in a BOOTP request is used as a tag,
2300as is the tag "bootp", allowing some control over the options returned to
2301different classes of hosts.
2302
2303.SH AUTHORITATIVE CONFIGURATION
2304Configuring dnsmasq to act as an authoritative DNS server is
2305complicated by the fact that it involves configuration of external DNS
2306servers to provide delegation. We will walk through three scenarios of
2307increasing complexity. Prerequisites for all of these scenarios
2308are a globally accessible IP address, an A or AAAA record pointing to that address,
2309and an external DNS server capable of doing delegation of the zone in
2310question. For the first part of this explanation, we will call the A (or AAAA) record
2311for the globally accessible address server.example.com, and the zone
2312for which dnsmasq is authoritative our.zone.com.
2313
2314The simplest configuration consists of two lines of dnsmasq configuration; something like
2315
2316.nf
2317.B --auth-server=server.example.com,eth0
2318.B --auth-zone=our.zone.com,1.2.3.0/24
2319.fi
2320
2321and two records in the external DNS
2322
2323.nf
2324server.example.com A 192.0.43.10
2325our.zone.com NS server.example.com
2326.fi
2327
2328eth0 is the external network interface on which dnsmasq is listening,
2329and has (globally accessible) address 192.0.43.10.
2330
2331Note that the external IP address may well be dynamic (ie assigned
2332from an ISP by DHCP or PPP) If so, the A record must be linked to this
2333dynamic assignment by one of the usual dynamic-DNS systems.
2334
2335A more complex, but practically useful configuration has the address
2336record for the globally accessible IP address residing in the
2337authoritative zone which dnsmasq is serving, typically at the root. Now
2338we have
2339
2340.nf
2341.B --auth-server=our.zone.com,eth0
2342.B --auth-zone=our.zone.com,1.2.3.0/24
2343.fi
2344
2345.nf
2346our.zone.com A 1.2.3.4
2347our.zone.com NS our.zone.com
2348.fi
2349
2350The A record for our.zone.com has now become a glue record, it solves
2351the chicken-and-egg problem of finding the IP address of the
2352nameserver for our.zone.com when the A record is within that
2353zone. Note that this is the only role of this record: as dnsmasq is
2354now authoritative from our.zone.com it too must provide this
2355record. If the external address is static, this can be done with an
2356.B /etc/hosts
2357entry or
2358.B --host-record.
2359
2360.nf
2361.B --auth-server=our.zone.com,eth0
2362.B --host-record=our.zone.com,1.2.3.4
2363.B --auth-zone=our.zone.com,1.2.3.0/24
2364.fi
2365
2366If the external address is dynamic, the address
2367associated with our.zone.com must be derived from the address of the
2368relevant interface. This is done using
2369.B --interface-name
2370Something like:
2371
2372.nf
2373.B --auth-server=our.zone.com,eth0
2374.B --interface-name=our.zone.com,eth0
2375.B --auth-zone=our.zone.com,1.2.3.0/24,eth0
2376.fi
2377
2378(The "eth0" argument in \fB--auth-zone\fP adds the subnet containing eth0's
2379dynamic address to the zone, so that the \fB--interface-name\fP returns the
2380address in outside queries.)
2381
2382Our final configuration builds on that above, but also adds a
2383secondary DNS server. This is another DNS server which learns the DNS data
2384for the zone by doing zones transfer, and acts as a backup should
2385the primary server become inaccessible. The configuration of the
2386secondary is beyond the scope of this man-page, but the extra
2387configuration of dnsmasq is simple:
2388
2389.nf
2390.B --auth-sec-servers=secondary.myisp.com
2391.fi
2392
2393and
2394
2395.nf
2396our.zone.com NS secondary.myisp.com
2397.fi
2398
2399Adding auth-sec-servers enables zone transfer in dnsmasq, to allow the
2400secondary to collect the DNS data. If you wish to restrict this data
2401to particular hosts then
2402
2403.nf
2404.B --auth-peer=<IP address of secondary>
2405.fi
2406
2407will do so.
2408
2409Dnsmasq acts as an authoritative server for in-addr.arpa and
2410ip6.arpa domains associated with the subnets given in \fB--auth-zone\fP
2411declarations, so reverse (address to name) lookups can be simply
2412configured with a suitable NS record, for instance in this example,
2413where we allow 1.2.3.0/24 addresses.
2414
2415.nf
2416 3.2.1.in-addr.arpa NS our.zone.com
2417.fi
2418
2419Note that at present, reverse (in-addr.arpa and ip6.arpa) zones are
2420not available in zone transfers, so there is no point arranging
2421secondary servers for reverse lookups.
2422
2423.PP
2424When dnsmasq is configured to act as an authoritative server, the
2425following data is used to populate the authoritative zone.
2426.PP
2427.B --mx-host, --srv-host, --dns-rr, --txt-record, --naptr-record, --caa-record,
2428as long as the record names are in the authoritative domain.
2429.PP
2430.B --synth-domain
2431as long as the domain is in the authoritative zone and, for
2432reverse (PTR) queries, the address is in the relevant subnet.
2433.PP
2434.B --cname
2435as long as the record name is in the authoritative domain. If the
2436target of the CNAME is unqualified, then it is qualified with the
2437authoritative zone name. CNAME used in this way (only) may be wildcards, as in
2438
2439.nf
2440.B --cname=*.example.com,default.example.com
2441.fi
2442
2443.PP
2444IPv4 and IPv6 addresses from /etc/hosts (and
2445.B --addn-hosts
2446) and
2447.B --host-record
2448and
2449.B --interface-name
2450and
2451.B ---dynamic-host
2452provided the address falls into one of the subnets specified in the
2453.B --auth-zone.
2454.PP
2455Addresses of DHCP leases, provided the address falls into one of the subnets specified in the
2456.B --auth-zone.
2457(If constructed DHCP ranges are is use, which depend on the address dynamically
2458assigned to an interface, then the form of
2459.B --auth-zone
2460which defines subnets by the dynamic address of an interface should
2461be used to ensure this condition is met.)
2462.PP
2463In the default mode, where a DHCP lease
2464has an unqualified name, and possibly a qualified name constructed
2465using
2466.B --domain
2467then the name in the authoritative zone is constructed from the
2468unqualified name and the zone's domain. This may or may not equal
2469that specified by
2470.B --domain.
2471If
2472.B --dhcp-fqdn
2473is set, then the fully qualified names associated with DHCP leases are
2474used, and must match the zone's domain.
2475
2476
2477
2478.SH EXIT CODES
24790 - Dnsmasq successfully forked into the background, or terminated
2480normally if backgrounding is not enabled.
2481.PP
24821 - A problem with configuration was detected.
2483.PP
24842 - A problem with network access occurred (address in use, attempt
2485to use privileged ports without permission).
2486.PP
24873 - A problem occurred with a filesystem operation (missing
2488file/directory, permissions).
2489.PP
24904 - Memory allocation failure.
2491.PP
24925 - Other miscellaneous problem.
2493.PP
249411 or greater - a non zero return code was received from the
2495lease-script process "init" call. The exit code from dnsmasq is the
2496script's exit code with 10 added.
2497
2498.SH LIMITS
2499The default values for resource limits in dnsmasq are generally
2500conservative, and appropriate for embedded router type devices with
2501slow processors and limited memory. On more capable hardware, it is
2502possible to increase the limits, and handle many more clients. The
2503following applies to dnsmasq-2.37: earlier versions did not scale as well.
2504
2505.PP
2506Dnsmasq is capable of handling DNS and DHCP for at least a thousand
2507clients. The DHCP lease times should not be very short (less than one hour). The
2508value of
2509.B --dns-forward-max
2510can be increased: start with it equal to
2511the number of clients and increase if DNS seems slow. Note that DNS
2512performance depends too on the performance of the upstream
2513nameservers. The size of the DNS cache may be increased: the hard
2514limit is 10000 names and the default (150) is very low. Sending
2515SIGUSR1 to dnsmasq makes it log information which is useful for tuning
2516the cache size. See the
2517.B NOTES
2518section for details.
2519
2520.PP
2521The built-in TFTP server is capable of many simultaneous file
2522transfers: the absolute limit is related to the number of file-handles
2523allowed to a process and the ability of the select() system call to
2524cope with large numbers of file handles. If the limit is set too high
2525using
2526.B --tftp-max
2527it will be scaled down and the actual limit logged at
2528start-up. Note that more transfers are possible when the same file is
2529being sent than when each transfer sends a different file.
2530
2531.PP
2532It is possible to use dnsmasq to block Web advertising by using a list
2533of known banner-ad servers, all resolving to 127.0.0.1 or 0.0.0.0, in
2534.B /etc/hosts
2535or an additional hosts file. The list can be very long,
2536dnsmasq has been tested successfully with one million names. That size
2537file needs a 1GHz processor and about 60Mb of RAM.
2538
2539.SH INTERNATIONALISATION
2540Dnsmasq can be compiled to support internationalisation. To do this,
2541the make targets "all-i18n" and "install-i18n" should be used instead of
2542the standard targets "all" and "install". When internationalisation
2543is compiled in, dnsmasq will produce log messages in the local
2544language and support internationalised domain names (IDN). Domain
2545names in /etc/hosts, /etc/ethers and /etc/dnsmasq.conf which contain
2546non-ASCII characters will be translated to the DNS-internal punycode
2547representation. Note that
2548dnsmasq determines both the language for messages and the assumed
2549charset for configuration
2550files from the LANG environment variable. This should be set to the system
2551default value by the script which is responsible for starting
2552dnsmasq. When editing the configuration files, be careful to do so
2553using only the system-default locale and not user-specific one, since
2554dnsmasq has no direct way of determining the charset in use, and must
2555assume that it is the system default.
2556
2557.SH FILES
2558.IR /etc/dnsmasq.conf
2559
2560.IR /usr/local/etc/dnsmasq.conf
2561
2562.IR /etc/resolv.conf
2563.IR /var/run/dnsmasq/resolv.conf
2564.IR /etc/ppp/resolv.conf
2565.IR /etc/dhcpc/resolv.conf
2566
2567.IR /etc/hosts
2568
2569.IR /etc/ethers
2570
2571.IR /var/lib/misc/dnsmasq.leases
2572
2573.IR /var/db/dnsmasq.leases
2574
2575.IR /var/run/dnsmasq.pid
2576.SH SEE ALSO
2577.BR hosts (5),
2578.BR resolver (5)
2579.SH AUTHOR
2580This manual page was written by Simon Kelley <simon@thekelleys.org.uk>.
2581
2582