version 1.1, 2013/07/29 19:37:40
|
version 1.1.1.3, 2016/11/02 09:57:01
|
Line 13 Dnsmasq accepts DNS queries and either answers them fr
|
Line 13 Dnsmasq accepts DNS queries and either answers them fr
|
cache or forwards them to a real, recursive, DNS server. It loads the |
cache or forwards them to a real, recursive, DNS server. It loads the |
contents of /etc/hosts so that local hostnames |
contents of /etc/hosts so that local hostnames |
which do not appear in the global DNS can be resolved and also answers |
which do not appear in the global DNS can be resolved and also answers |
DNS queries for DHCP configured hosts. It can also act as the authoritative DNS server for one or more domains, allowing local names to appear in the global DNS. | DNS queries for DHCP configured hosts. It can also act as the |
| authoritative DNS server for one or more domains, allowing local names |
| to appear in the global DNS. It can be configured to do DNSSEC |
| validation. |
.PP |
.PP |
The dnsmasq DHCP server supports static address assignments and multiple |
The dnsmasq DHCP server supports static address assignments and multiple |
networks. It automatically |
networks. It automatically |
Line 39 the configuration file.
|
Line 42 the configuration file.
|
Read and syntax check configuration file(s). Exit with code 0 if all |
Read and syntax check configuration file(s). Exit with code 0 if all |
is OK, or a non-zero code otherwise. Do not start up dnsmasq. |
is OK, or a non-zero code otherwise. Do not start up dnsmasq. |
.TP |
.TP |
|
.B \-w, --help |
|
Display all command-line options. |
|
.B --help dhcp |
|
will display known DHCPv4 configuration options, and |
|
.B --help dhcp6 |
|
will display DHCPv6 options. |
|
.TP |
.B \-h, --no-hosts |
.B \-h, --no-hosts |
Don't read the hostnames in /etc/hosts. |
Don't read the hostnames in /etc/hosts. |
.TP |
.TP |
Line 47 Additional hosts file. Read the specified file as well
|
Line 57 Additional hosts file. Read the specified file as well
|
only the specified file. This option may be repeated for more than one |
only the specified file. This option may be repeated for more than one |
additional hosts file. If a directory is given, then read all the files contained in that directory. |
additional hosts file. If a directory is given, then read all the files contained in that directory. |
.TP |
.TP |
|
.B --hostsdir=<path> |
|
Read all the hosts files contained in the directory. New or changed files |
|
are read automatically. See --dhcp-hostsdir for details. |
|
.TP |
.B \-E, --expand-hosts |
.B \-E, --expand-hosts |
Add the domain to simple names (without a period) in /etc/hosts |
Add the domain to simple names (without a period) in /etc/hosts |
in the same way as for DHCP-derived names. Note that this does not |
in the same way as for DHCP-derived names. Note that this does not |
apply to domain names in cnames, PTR records, TXT records etc. |
apply to domain names in cnames, PTR records, TXT records etc. |
.TP |
.TP |
.B \-T, --local-ttl=<time> |
.B \-T, --local-ttl=<time> |
When replying with information from /etc/hosts or the DHCP leases | When replying with information from /etc/hosts or configuration or the DHCP leases |
file dnsmasq by default sets the time-to-live field to zero, meaning |
file dnsmasq by default sets the time-to-live field to zero, meaning |
that the requester should not itself cache the information. This is |
that the requester should not itself cache the information. This is |
the correct thing to do in almost all situations. This option allows a |
the correct thing to do in almost all situations. This option allows a |
Line 61 time-to-live (in seconds) to be given for these replie
|
Line 75 time-to-live (in seconds) to be given for these replie
|
reduce the load on the server at the expense of clients using stale |
reduce the load on the server at the expense of clients using stale |
data under some circumstances. |
data under some circumstances. |
.TP |
.TP |
|
.B --dhcp-ttl=<time> |
|
As for --local-ttl, but affects only replies with information from DHCP leases. If both are given, --dhcp-ttl applies for DHCP information, and --local-ttl for others. Setting this to zero eliminates the effect of --local-ttl for DHCP. |
|
.TP |
.B --neg-ttl=<time> |
.B --neg-ttl=<time> |
Negative replies from upstream servers normally contain time-to-live |
Negative replies from upstream servers normally contain time-to-live |
information in SOA records which dnsmasq uses for caching. If the |
information in SOA records which dnsmasq uses for caching. If the |
Line 78 the upstream DNS servers.
|
Line 95 the upstream DNS servers.
|
.B --max-cache-ttl=<time> |
.B --max-cache-ttl=<time> |
Set a maximum TTL value for entries in the cache. |
Set a maximum TTL value for entries in the cache. |
.TP |
.TP |
|
.B --min-cache-ttl=<time> |
|
Extend short TTL values to the time given when caching them. Note that |
|
artificially extending TTL values is in general a bad idea, do not do it |
|
unless you have a good reason, and understand what you are doing. |
|
Dnsmasq limits the value of this option to one hour, unless recompiled. |
|
.TP |
.B --auth-ttl=<time> |
.B --auth-ttl=<time> |
Set the TTL value returned in answers from the authoritative server. |
Set the TTL value returned in answers from the authoritative server. |
.TP |
.TP |
Line 95 only, to stop dnsmasq daemonising in production, use
|
Line 118 only, to stop dnsmasq daemonising in production, use
|
.B -k. |
.B -k. |
.TP |
.TP |
.B \-q, --log-queries |
.B \-q, --log-queries |
Log the results of DNS queries handled by dnsmasq. Enable a full cache dump on receipt of SIGUSR1. | Log the results of DNS queries handled by dnsmasq. Enable a full cache dump on receipt of SIGUSR1. If the argument "extra" is supplied, ie |
| .B --log-queries=extra |
| then the log has extra information at the start of each line. |
| This consists of a serial number which ties together the log lines associated with an individual query, and the IP address of the requestor. |
.TP |
.TP |
.B \-8, --log-facility=<facility> |
.B \-8, --log-facility=<facility> |
Set the facility to which dnsmasq will send syslog entries, this |
Set the facility to which dnsmasq will send syslog entries, this |
Line 158 queries. Dnsmasq picks random ports as source for outb
|
Line 184 queries. Dnsmasq picks random ports as source for outb
|
when this option is given, the ports used will always to larger |
when this option is given, the ports used will always to larger |
than that specified. Useful for systems behind firewalls. |
than that specified. Useful for systems behind firewalls. |
.TP |
.TP |
|
.B --max-port=<port> |
|
Use ports lower than that given as source for outbound DNS queries. |
|
Dnsmasq picks random ports as source for outbound queries: |
|
when this option is given, the ports used will always be lower |
|
than that specified. Useful for systems behind firewalls. |
|
.TP |
|
|
.B \-i, --interface=<interface name> |
.B \-i, --interface=<interface name> |
Listen only on the specified interface(s). Dnsmasq automatically adds |
Listen only on the specified interface(s). Dnsmasq automatically adds |
the loopback (local) interface to the list of interfaces to use when |
the loopback (local) interface to the list of interfaces to use when |
Line 199 or
|
Line 232 or
|
.B --listen-address |
.B --listen-address |
configuration, indeed |
configuration, indeed |
.B --auth-server |
.B --auth-server |
will overide these and provide a different DNS service on the specified interface. The <domain> is the "glue record". It should resolve in the global DNS to a A and/or AAAA record which points to the address dnsmasq is listening on. | will overide these and provide a different DNS service on the |
| specified interface. The <domain> is the "glue record". It should |
| resolve in the global DNS to a A and/or AAAA record which points to |
| the address dnsmasq is listening on. When an interface is specified, |
| it may be qualified with "/4" or "/6" to specify only the IPv4 or IPv6 |
| addresses associated with the interface. |
| .TP |
| .B --local-service |
| Accept DNS queries only from hosts whose address is on a local subnet, |
| ie a subnet for which an interface exists on the server. This option |
| only has effect is there are no --interface --except-interface, |
| --listen-address or --auth-server options. It is intended to be set as |
| a default on installation, to allow unconfigured installations to be |
| useful but also safe from being used for DNS amplification attacks. |
.TP |
.TP |
.B \-2, --no-dhcp-interface=<interface name> |
.B \-2, --no-dhcp-interface=<interface name> |
Do not provide DHCP or TFTP on the specified interface, but do provide DNS service. |
Do not provide DHCP or TFTP on the specified interface, but do provide DNS service. |
Line 277 an advertising web page in response to queries for unr
|
Line 323 an advertising web page in response to queries for unr
|
instead of the correct NXDOMAIN response. This option tells dnsmasq to |
instead of the correct NXDOMAIN response. This option tells dnsmasq to |
fake the correct response when it sees this behaviour. As at Sept 2003 |
fake the correct response when it sees this behaviour. As at Sept 2003 |
the IP address being returned by Verisign is 64.94.110.11 |
the IP address being returned by Verisign is 64.94.110.11 |
|
.TP |
|
.B --ignore-address=<ipaddr> |
|
Ignore replies to A-record queries which include the specified address. |
|
No error is generated, dnsmasq simply continues to listen for another reply. |
|
This is useful to defeat blocking strategies which rely on quickly supplying a |
|
forged answer to a DNS request for certain domain, before the correct answer can arrive. |
.TP |
.TP |
.B \-f, --filterwin2k |
.B \-f, --filterwin2k |
Later versions of windows make periodic DNS requests which don't get sensible answers from |
Later versions of windows make periodic DNS requests which don't get sensible answers from |
Line 318 it will send queries to just one server. Setting this
|
Line 370 it will send queries to just one server. Setting this
|
dnsmasq to send all queries to all available servers. The reply from |
dnsmasq to send all queries to all available servers. The reply from |
the server which answers first will be returned to the original requester. |
the server which answers first will be returned to the original requester. |
.TP |
.TP |
|
.B --dns-loop-detect |
|
Enable code to detect DNS forwarding loops; ie the situation where a query sent to one |
|
of the upstream server eventually returns as a new query to the dnsmasq instance. The |
|
process works by generating TXT queries of the form <hex>.test and sending them to |
|
each upstream server. The hex is a UID which encodes the instance of dnsmasq sending the query |
|
and the upstream server to which it was sent. If the query returns to the server which sent it, then |
|
the upstream server through which it was sent is disabled and this event is logged. Each time the |
|
set of upstream servers changes, the test is re-run on all of them, including ones which |
|
were previously disabled. |
|
.TP |
.B --stop-dns-rebind |
.B --stop-dns-rebind |
Reject (and log) addresses from upstream nameservers which are in the |
Reject (and log) addresses from upstream nameservers which are in the |
private IP ranges. This blocks an attack where a browser behind a |
private IP ranges. This blocks an attack where a browser behind a |
Line 338 by '/', like the --server syntax, eg.
|
Line 400 by '/', like the --server syntax, eg.
|
Don't poll /etc/resolv.conf for changes. |
Don't poll /etc/resolv.conf for changes. |
.TP |
.TP |
.B --clear-on-reload |
.B --clear-on-reload |
Whenever /etc/resolv.conf is re-read, clear the DNS cache. | Whenever /etc/resolv.conf is re-read or the upstream servers are set |
| via DBus, clear the DNS cache. |
This is useful when new nameservers may have different |
This is useful when new nameservers may have different |
data than that held in cache. |
data than that held in cache. |
.TP |
.TP |
Line 359 xxx.internal.thekelleys.org.uk at 192.168.1.1 then giv
|
Line 422 xxx.internal.thekelleys.org.uk at 192.168.1.1 then giv
|
.B -S /internal.thekelleys.org.uk/192.168.1.1 |
.B -S /internal.thekelleys.org.uk/192.168.1.1 |
will send all queries for |
will send all queries for |
internal machines to that nameserver, everything else will go to the |
internal machines to that nameserver, everything else will go to the |
servers in /etc/resolv.conf. An empty domain specification, | servers in /etc/resolv.conf. DNSSEC validation is turned off for such |
| private nameservers, UNLESS a |
| .B --trust-anchor |
| is specified for the domain in question. An empty domain specification, |
.B // |
.B // |
has the special meaning of "unqualified names only" ie names without any |
has the special meaning of "unqualified names only" ie names without any |
dots in them. A non-standard port may be specified as |
dots in them. A non-standard port may be specified as |
Line 406 source address specified but the port may be specified
|
Line 472 source address specified but the port may be specified
|
part of the source address. Forcing queries to an interface is not |
part of the source address. Forcing queries to an interface is not |
implemented on all platforms supported by dnsmasq. |
implemented on all platforms supported by dnsmasq. |
.TP |
.TP |
.B \-A, --address=/<domain>/[domain/]<ipaddr> | .B --rev-server=<ip-address>/<prefix-len>,<ipaddr>[#<port>][@<source-ip>|<interface>[#<port>]] |
| This is functionally the same as |
| .B --server, |
| but provides some syntactic sugar to make specifying address-to-name queries easier. For example |
| .B --rev-server=1.2.3.0/24,192.168.0.1 |
| is exactly equivalent to |
| .B --server=/3.2.1.in-addr.arpa/192.168.0.1 |
| .TP |
| .B \-A, --address=/<domain>/[domain/][<ipaddr>] |
Specify an IP address to return for any host in the given domains. |
Specify an IP address to return for any host in the given domains. |
Queries in the domains are never forwarded and always replied to |
Queries in the domains are never forwarded and always replied to |
with the specified IP address which may be IPv4 or IPv6. To give |
with the specified IP address which may be IPv4 or IPv6. To give |
Line 418 domain specification works in the same was as for --se
|
Line 492 domain specification works in the same was as for --se
|
additional facility that /#/ matches any domain. Thus |
additional facility that /#/ matches any domain. Thus |
--address=/#/1.2.3.4 will always return 1.2.3.4 for any query not |
--address=/#/1.2.3.4 will always return 1.2.3.4 for any query not |
answered from /etc/hosts or DHCP and not sent to an upstream |
answered from /etc/hosts or DHCP and not sent to an upstream |
nameserver by a more specific --server directive. | nameserver by a more specific --server directive. As for --server, |
| one or more domains with no address returns a no-such-domain answer, so |
| --address=/example.com/ is equivalent to --server=/example.com/ and returns |
| NXDOMAIN for example.com and all its subdomains. |
.TP |
.TP |
.B --ipset=/<domain>/[domain/]<ipset>[,<ipset>] |
.B --ipset=/<domain>/[domain/]<ipset>[,<ipset>] |
Places the resolved IP addresses of queries for the specified domains |
Places the resolved IP addresses of queries for the specified domains |
Line 462 zone files: the port, weight and priority numbers are
|
Line 539 zone files: the port, weight and priority numbers are
|
order. More than one SRV record for a given service/domain is allowed, |
order. More than one SRV record for a given service/domain is allowed, |
all that match are returned. |
all that match are returned. |
.TP |
.TP |
.B --host-record=<name>[,<name>....][<IPv4-address>],[<IPv6-address>] | .B --host-record=<name>[,<name>....],[<IPv4-address>],[<IPv6-address>][,<TTL>] |
Add A, AAAA and PTR records to the DNS. This adds one or more names to |
Add A, AAAA and PTR records to the DNS. This adds one or more names to |
the DNS with associated IPv4 (A) and IPv6 (AAAA) records. A name may |
the DNS with associated IPv4 (A) and IPv6 (AAAA) records. A name may |
appear in more than one |
appear in more than one |
Line 479 is in effect. Short and long names may appear in the s
|
Line 556 is in effect. Short and long names may appear in the s
|
.B host-record, |
.B host-record, |
eg. |
eg. |
.B --host-record=laptop,laptop.thekelleys.org,192.168.0.1,1234::100 |
.B --host-record=laptop,laptop.thekelleys.org,192.168.0.1,1234::100 |
|
|
|
If the time-to-live is given, it overrides the default, which is zero |
|
or the value of --local-ttl. The value is a positive integer and gives |
|
the time-to-live in seconds. |
.TP |
.TP |
.B \-Y, --txt-record=<name>[[,<text>],<text>] |
.B \-Y, --txt-record=<name>[[,<text>],<text>] |
Return a TXT DNS record. The value of TXT record is a set of strings, |
Return a TXT DNS record. The value of TXT record is a set of strings, |
Line 492 Return a PTR DNS record.
|
Line 573 Return a PTR DNS record.
|
.B --naptr-record=<name>,<order>,<preference>,<flags>,<service>,<regexp>[,<replacement>] |
.B --naptr-record=<name>,<order>,<preference>,<flags>,<service>,<regexp>[,<replacement>] |
Return an NAPTR DNS record, as specified in RFC3403. |
Return an NAPTR DNS record, as specified in RFC3403. |
.TP |
.TP |
.B --cname=<cname>,<target> | .B --cname=<cname>,<target>[,<TTL>] |
Return a CNAME record which indicates that <cname> is really |
Return a CNAME record which indicates that <cname> is really |
<target>. There are significant limitations on the target; it must be a |
<target>. There are significant limitations on the target; it must be a |
DNS name which is known to dnsmasq from /etc/hosts (or additional |
DNS name which is known to dnsmasq from /etc/hosts (or additional |
hosts files), from DHCP or from another | hosts files), from DHCP, from --interface-name or from another |
.B --cname. |
.B --cname. |
If the target does not satisfy this |
If the target does not satisfy this |
criteria, the whole cname is ignored. The cname must be unique, but it |
criteria, the whole cname is ignored. The cname must be unique, but it |
is permissable to have more than one cname pointing to the same target. |
is permissable to have more than one cname pointing to the same target. |
|
|
|
If the time-to-live is given, it overrides the default, which is zero |
|
or the value of -local-ttl. The value is a positive integer and gives |
|
the time-to-live in seconds. |
.TP |
.TP |
.B --dns-rr=<name>,<RR-number>,[<hex data>] |
.B --dns-rr=<name>,<RR-number>,[<hex data>] |
Return an arbitrary DNS Resource Record. The number is the type of the |
Return an arbitrary DNS Resource Record. The number is the type of the |
Line 508 record (which is always in the C_IN class). The value
|
Line 593 record (which is always in the C_IN class). The value
|
given by the hex data, which may be of the form 01:23:45 or 01 23 45 or |
given by the hex data, which may be of the form 01:23:45 or 01 23 45 or |
012345 or any mixture of these. |
012345 or any mixture of these. |
.TP |
.TP |
.B --interface-name=<name>,<interface> | .B --interface-name=<name>,<interface>[/4|/6] |
Return a DNS record associating the name with the primary address on |
Return a DNS record associating the name with the primary address on |
the given interface. This flag specifies an A record for the given | the given interface. This flag specifies an A or AAAA record for the given |
name in the same way as an /etc/hosts line, except that the address is |
name in the same way as an /etc/hosts line, except that the address is |
not constant, but taken from the given interface. If the interface is | not constant, but taken from the given interface. The interface may be |
| followed by "/4" or "/6" to specify that only IPv4 or IPv6 addresses |
| of the interface should be used. If the interface is |
down, not configured or non-existent, an empty record is returned. The |
down, not configured or non-existent, an empty record is returned. The |
matching PTR record is also created, mapping the interface address to |
matching PTR record is also created, mapping the interface address to |
the name. More than one name may be associated with an interface |
the name. More than one name may be associated with an interface |
address by repeating the flag; in that case the first instance is used |
address by repeating the flag; in that case the first instance is used |
for the reverse address-to-name mapping. |
for the reverse address-to-name mapping. |
.TP |
.TP |
.B --add-mac | .B --synth-domain=<domain>,<address range>[,<prefix>] |
| Create artificial A/AAAA and PTR records for an address range. The |
| records use the address, with periods (or colons for IPv6) replaced |
| with dashes. |
| |
| An example should make this clearer. |
| .B --synth-domain=thekelleys.org.uk,192.168.0.0/24,internal- |
| will result in a query for internal-192-168-0-56.thekelleys.org.uk returning |
| 192.168.0.56 and a reverse query vice versa. The same applies to IPv6, |
| but IPv6 addresses may start with '::' |
| but DNS labels may not start with '-' so in this case if no prefix is |
| configured a zero is added in front of the label. ::1 becomes 0--1. |
| |
| The address range can be of the form |
| <ip address>,<ip address> or <ip address>/<netmask> |
| .TP |
| .B --add-mac[=base64|text] |
Add the MAC address of the requestor to DNS queries which are |
Add the MAC address of the requestor to DNS queries which are |
forwarded upstream. This may be used to DNS filtering by the upstream |
forwarded upstream. This may be used to DNS filtering by the upstream |
server. The MAC address can only be added if the requestor is on the same |
server. The MAC address can only be added if the requestor is on the same |
subnet as the dnsmasq server. Note that the mechanism used to achieve this (an EDNS0 option) |
subnet as the dnsmasq server. Note that the mechanism used to achieve this (an EDNS0 option) |
is not yet standardised, so this should be considered |
is not yet standardised, so this should be considered |
experimental. Also note that exposing MAC addresses in this way may |
experimental. Also note that exposing MAC addresses in this way may |
have security and privacy implications. | have security and privacy implications. The warning about caching |
| given for --add-subnet applies to --add-mac too. An alternative encoding of the |
| MAC, 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. |
.TP |
.TP |
|
.B --add-cpe-id=<string> |
|
Add a arbitrary identifying string to o DNS queries which are |
|
forwarded upstream. |
|
.TP |
|
.B --add-subnet[[=[<IPv4 address>/]<IPv4 prefix length>][,[<IPv6 address>/]<IPv6 prefix length>]] |
|
Add a subnet address to the DNS queries which are forwarded |
|
upstream. If an address is specified in the flag, it will be used, |
|
otherwise, the address of the requestor will be used. The amount of |
|
the address forwarded depends on the prefix length parameter: 32 (128 |
|
for IPv6) forwards the whole address, zero forwards none of it but |
|
still marks the request so that no upstream nameserver will add client |
|
address information either. The default is zero for both IPv4 and |
|
IPv6. Note that upstream nameservers may be configured to return |
|
different results based on this information, but the dnsmasq cache |
|
does not take account. If a dnsmasq instance is configured such that |
|
different results may be encountered, caching should be disabled. |
|
|
|
For example, |
|
.B --add-subnet=24,96 |
|
will add the /24 and /96 subnets of the requestor for IPv4 and IPv6 requestors, respectively. |
|
.B --add-subnet=1.2.3.4/24 |
|
will add 1.2.3.0/24 for IPv4 requestors and ::/0 for IPv6 requestors. |
|
.B --add-subnet=1.2.3.4/24,1.2.3.4/24 |
|
will add 1.2.3.0/24 for both IPv4 and IPv6 requestors. |
|
|
|
.TP |
.B \-c, --cache-size=<cachesize> |
.B \-c, --cache-size=<cachesize> |
Set the size of dnsmasq's cache. The default is 150 names. Setting the cache size to zero disables caching. |
Set the size of dnsmasq's cache. The default is 150 names. Setting the cache size to zero disables caching. |
.TP |
.TP |
Line 542 Set the maximum number of concurrent DNS queries. The
|
Line 673 Set the maximum number of concurrent DNS queries. The
|
where this needs to be increased is when using web-server log file |
where this needs to be increased is when using web-server log file |
resolvers, which can generate large numbers of concurrent queries. |
resolvers, which can generate large numbers of concurrent queries. |
.TP |
.TP |
|
.B --dnssec |
|
Validate DNS replies and cache DNSSEC data. When forwarding DNS queries, dnsmasq requests the |
|
DNSSEC records needed to validate the replies. The replies are validated and the result returned as |
|
the Authenticated Data bit in the DNS packet. In addition the DNSSEC records are stored in the cache, making |
|
validation by clients more efficient. Note that validation by clients is the most secure DNSSEC mode, but for |
|
clients unable to do validation, use of the AD bit set by dnsmasq is useful, provided that the network between |
|
the dnsmasq server and the client is trusted. Dnsmasq must be compiled with HAVE_DNSSEC enabled, and DNSSEC |
|
trust anchors provided, see |
|
.B --trust-anchor. |
|
Because the DNSSEC validation process uses the cache, it is not |
|
permitted to reduce the cache size below the default when DNSSEC is |
|
enabled. The nameservers upstream of dnsmasq must be DNSSEC-capable, |
|
ie capable of returning DNSSEC records with data. If they are not, |
|
then dnsmasq will not be able to determine the trusted status of |
|
answers. In the default mode, this menas that all replies will be |
|
marked as untrusted. If |
|
.B --dnssec-check-unsigned |
|
is set and the upstream servers don't support DNSSEC, then DNS service will be entirely broken. |
|
.TP |
|
.B --trust-anchor=[<class>],<domain>,<key-tag>,<algorithm>,<digest-type>,<digest> |
|
Provide DS records to act a trust anchors for DNSSEC |
|
validation. Typically these will be the DS record(s) for Zone Signing |
|
key(s) of the root zone, |
|
but trust anchors for limited domains are also possible. The current |
|
root-zone trust anchors may be downloaded from https://data.iana.org/root-anchors/root-anchors.xml |
|
.TP |
|
.B --dnssec-check-unsigned |
|
As a default, dnsmasq does not check that unsigned DNS replies are |
|
legitimate: they are assumed to be valid and passed on (without the |
|
"authentic data" bit set, of course). This does not protect against an |
|
attacker forging unsigned replies for signed DNS zones, but it is |
|
fast. If this flag is set, dnsmasq will check the zones of unsigned |
|
replies, to ensure that unsigned replies are allowed in those |
|
zones. The cost of this is more upstream queries and slower |
|
performance. See also the warning about upstream servers in the |
|
section on |
|
.B --dnssec |
|
.TP |
|
.B --dnssec-no-timecheck |
|
DNSSEC signatures are only valid for specified time windows, and should be rejected outside those windows. This generates an |
|
interesting chicken-and-egg problem for machines which don't have a hardware real time clock. For these machines to determine the correct |
|
time typically requires use of NTP and therefore DNS, but validating DNS requires that the correct time is already known. Setting this flag |
|
removes the time-window checks (but not other DNSSEC validation.) only until the dnsmasq process receives SIGHUP. The intention is |
|
that dnsmasq should be started with this flag when the platform determines that reliable time is not currently available. As soon as |
|
reliable time is established, a SIGHUP should be sent to dnsmasq, which enables time checking, and purges the cache of DNS records |
|
which have not been throughly checked. |
|
.TP |
|
.B --dnssec-timestamp=<path> |
|
Enables an alternative way of checking the validity of the system time for DNSSEC (see --dnssec-no-timecheck). In this case, the |
|
system time is considered to be valid once it becomes later than the timestamp on the specified file. The file is created and |
|
its timestamp set automatically by dnsmasq. The file must be stored on a persistent filesystem, so that it and its mtime are carried |
|
over system restarts. The timestamp file is created after dnsmasq has dropped root, so it must be in a location writable by the |
|
unprivileged user that dnsmasq runs as. |
|
.TP |
.B --proxy-dnssec |
.B --proxy-dnssec |
A resolver on a client machine can do DNSSEC validation in two ways: it | Copy the DNSSEC Authenticated Data bit from upstream servers to downstream clients and cache it. This is an |
can perform the cryptograhic operations on the reply it receives, or | alternative to having dnsmasq validate DNSSEC, but it depends on the security of the network between |
it can rely on the upstream recursive nameserver to do the validation | dnsmasq and the upstream servers, and the trustworthiness of the upstream servers. |
and set a bit in the reply if it succeeds. Dnsmasq is not a DNSSEC | |
validator, so it cannot perform the validation role of the recursive nameserver, | |
but it can pass through the validation results from its own upstream | |
nameservers. This option enables this behaviour. You should only do | |
this if you trust all the configured upstream nameservers | |
.I and the network between you and them. | |
If you use the first DNSSEC mode, validating resolvers in clients, | |
this option is not required. Dnsmasq always returns all the data | |
needed for a client to do validation itself. | |
.TP |
.TP |
.B --auth-zone=<domain>[,<subnet>[,<subnet>.....]] | .B --dnssec-debug |
| Set debugging mode for the DNSSEC validation, set the Checking Disabled bit on upstream queries, |
| and don't convert replies which do not validate to responses with |
| a return code of SERVFAIL. Note that |
| setting this may affect DNS behaviour in bad ways, it is not an |
| extra-logging flag and should not be set in production. |
| .TP |
| .B --auth-zone=<domain>[,<subnet>[/<prefix length>][,<subnet>[/<prefix length>].....]] |
Define a DNS zone for which dnsmasq acts as authoritative server. Locally defined DNS records which are in the domain |
Define a DNS zone for which dnsmasq acts as authoritative server. Locally defined DNS records which are in the domain |
will be served, except that A and AAAA records must be in one of the | will be served. If subnet(s) are given, A and AAAA records must be in one of the |
specified subnets, or in a subnet corresponding to a contructed DHCP | specified subnets. |
range. The subnet(s) are also used to define in-addr.arpa and | |
ipv6.arpa domains which are served for reverse-DNS queries. For IPv4 | As alternative to directly specifying the subnets, it's possible to |
subnets, the prefix length is limited to the values 8, 16 or 24. | give the name of an interface, in which case the subnets implied by |
| that interface's configured addresses and netmask/prefix-length are |
| used; this is useful when using constructed DHCP ranges as the actual |
| address is dynamic and not known when configuring dnsmasq. The |
| interface addresses may be confined to only IPv6 addresses using |
| <interface>/6 or to only IPv4 using <interface>/4. This is useful when |
| an interface has dynamically determined global IPv6 addresses which should |
| appear in the zone, but RFC1918 IPv4 addresses which should not. |
| Interface-name and address-literal subnet specifications may be used |
| freely in the same --auth-zone declaration. |
| |
| The subnet(s) are also used to define in-addr.arpa and |
| ip6.arpa domains which are served for reverse-DNS queries. If not |
| specified, the prefix length defaults to 24 for IPv4 and 64 for IPv6. |
| For IPv4 subnets, the prefix length should be have the value 8, 16 or 24 |
| unless you are familiar with RFC 2317 and have arranged the |
| in-addr.arpa delegation accordingly. Note that if no subnets are |
| specified, then no reverse queries are answered. |
.TP |
.TP |
.B --auth-soa=<serial>[,<hostmaster>[,<refresh>[,<retry>[,<expiry>]]]] |
.B --auth-soa=<serial>[,<hostmaster>[,<refresh>[,<retry>[,<expiry>]]]] |
Specify fields in the SOA record associated with authoritative |
Specify fields in the SOA record associated with authoritative |
Line 590 compiled in and the kernel must have conntrack support
|
Line 790 compiled in and the kernel must have conntrack support
|
included and configured. This option cannot be combined with |
included and configured. This option cannot be combined with |
--query-port. |
--query-port. |
.TP |
.TP |
.B \-F, --dhcp-range=[tag:<tag>[,tag:<tag>],][set:<tag>,]<start-addr>[,<end-addr>][,<mode>][,<netmask>[,<broadcast>]][,<lease time>] | .B \-F, --dhcp-range=[tag:<tag>[,tag:<tag>],][set:<tag>,]<start-addr>[,<end-addr>|<mode>][,<netmask>[,<broadcast>]][,<lease time>] |
.TP |
.TP |
.B \-F, --dhcp-range=[tag:<tag>[,tag:<tag>],][set:<tag>,]<start-IPv6addr>[,<end-IPv6addr>|constructor:<interface>][,<mode>][,<prefix-len>][,<lease time>] |
.B \-F, --dhcp-range=[tag:<tag>[,tag:<tag>],][set:<tag>,]<start-IPv6addr>[,<end-IPv6addr>|constructor:<interface>][,<mode>][,<prefix-len>][,<lease time>] |
|
|
Line 619 always optional. It is always
|
Line 819 always optional. It is always
|
allowed to have more than one dhcp-range in a single subnet. |
allowed to have more than one dhcp-range in a single subnet. |
|
|
For IPv6, the parameters are slightly different: instead of netmask |
For IPv6, the parameters are slightly different: instead of netmask |
and broadcast address, there is an optional prefix length. If not | and broadcast address, there is an optional prefix length which must |
| be equal to or larger then the prefix length on the local interface. If not |
given, this defaults to 64. Unlike the IPv4 case, the prefix length is not |
given, this defaults to 64. Unlike the IPv4 case, the prefix length is not |
automatically derived from the interface configuration. The mimimum |
automatically derived from the interface configuration. The mimimum |
size of the prefix length is 64. |
size of the prefix length is 64. |
Line 630 This forms a template which describes how to create ra
|
Line 831 This forms a template which describes how to create ra
|
|
|
.B --dhcp-range=::1,::400,constructor:eth0 |
.B --dhcp-range=::1,::400,constructor:eth0 |
|
|
will look for addresses of the form <network>::1 on eth0 and then create a range from <network>::1 to <network>::400. If the interface is assigned more than one network, then the corresponding ranges will be automatically created, and then deprecated and finally removed again as the address is deprecated and then deleted. The interface name may have a final "*" wildcard. | will look for addresses on |
| eth0 and then create a range from <network>::1 to <network>::400. If |
| the interface is assigned more than one network, then the |
| corresponding ranges will be automatically created, and then |
| deprecated and finally removed again as the address is deprecated and |
| then deleted. The interface name may have a final "*" wildcard. Note |
| that just any address on eth0 will not do: it must not be an |
| autoconfigured or privacy address, or be deprecated. |
|
|
|
If a dhcp-range is only being used for stateless DHCP and/or SLAAC, |
|
then the address can be simply :: |
|
|
|
.B --dhcp-range=::,constructor:eth0 |
|
|
|
|
The optional |
The optional |
.B set:<tag> |
.B set:<tag> |
sets an alphanumeric label which marks this network so that |
sets an alphanumeric label which marks this network so that |
Line 650 or from /etc/ethers will be served. A static-only subn
|
Line 864 or from /etc/ethers will be served. A static-only subn
|
all zeros may be used as a "catch-all" address to enable replies to all |
all zeros may be used as a "catch-all" address to enable replies to all |
Information-request packets on a subnet which is provided with |
Information-request packets on a subnet which is provided with |
stateless DHCPv6, ie |
stateless DHCPv6, ie |
.B --dhcp=range=::,static | .B --dhcp-range=::,static |
|
|
For IPv4, the <mode> may be |
For IPv4, the <mode> may be |
.B proxy |
.B proxy |
Line 662 and
|
Line 876 and
|
for details.) |
for details.) |
|
|
For IPv6, the mode may be some combination of |
For IPv6, the mode may be some combination of |
.B ra-only, slaac, ra-names, ra-stateless. | .B ra-only, slaac, ra-names, ra-stateless, ra-advrouter, off-link. |
|
|
.B ra-only |
.B ra-only |
tells dnsmasq to offer Router Advertisement only on this subnet, |
tells dnsmasq to offer Router Advertisement only on this subnet, |
Line 697 can be combined with
|
Line 911 can be combined with
|
and |
and |
.B slaac. |
.B slaac. |
|
|
|
.B ra-advrouter |
|
enables a mode where router address(es) rather than prefix(es) are included in the advertisements. |
|
This is described in RFC-3775 section 7.2 and is used in mobile IPv6. In this mode the interval option |
|
is also included, as described in RFC-3775 section 7.3. |
|
|
|
.B off-link |
|
tells dnsmasq to advertise the prefix without the on-link (aka L) bit set. |
|
|
.TP |
.TP |
.B \-G, --dhcp-host=[<hwaddr>][,id:<client_id>|*][,set:<tag>][,<ipaddr>][,<hostname>][,<lease_time>][,ignore] |
.B \-G, --dhcp-host=[<hwaddr>][,id:<client_id>|*][,set:<tag>][,<ipaddr>][,<hostname>][,<lease_time>][,ignore] |
Specify per host parameters for the DHCP server. This allows a machine |
Specify per host parameters for the DHCP server. This allows a machine |
Line 721 the same subnet as some valid dhcp-range. For
|
Line 943 the same subnet as some valid dhcp-range. For
|
subnets which don't need a pool of dynamically allocated addresses, |
subnets which don't need a pool of dynamically allocated addresses, |
use the "static" keyword in the dhcp-range declaration. |
use the "static" keyword in the dhcp-range declaration. |
|
|
It is allowed to use client identifiers rather than | It is allowed to use client identifiers (called client |
| DUID in IPv6-land rather than |
hardware addresses to identify hosts by prefixing with 'id:'. Thus: |
hardware addresses to identify hosts by prefixing with 'id:'. Thus: |
.B --dhcp-host=id:01:02:03:04,..... |
.B --dhcp-host=id:01:02:03:04,..... |
refers to the host with client identifier 01:02:03:04. It is also |
refers to the host with client identifier 01:02:03:04. It is also |
Line 736 IPv6 addresses may contain only the host-identifier pa
|
Line 959 IPv6 addresses may contain only the host-identifier pa
|
.B --dhcp-host=laptop,[::56] |
.B --dhcp-host=laptop,[::56] |
in which case they act as wildcards in constructed dhcp ranges, with |
in which case they act as wildcards in constructed dhcp ranges, with |
the appropriate network part inserted. |
the appropriate network part inserted. |
Note that in IPv6 DHCP, the hardware address is not normally | Note that in IPv6 DHCP, the hardware address may not be |
available, so a client must be identified by client-id (called client | available, though it normally is for direct-connected clients, or |
DUID in IPv6-land) or hostname. | clients using DHCP relays which support RFC 6939. |
|
|
The special option id:* means "ignore any client-id | and use MAC addresses only." This is useful when a client presents a client-id sometimes |
| For DHCPv4, the special option id:* means "ignore any client-id |
and use MAC addresses only." This is useful when a client presents a client-id sometimes |
and use MAC addresses only." This is useful when a client presents a client-id sometimes |
but not others. |
but not others. |
|
|
Line 763 This is
|
Line 987 This is
|
useful when there is another DHCP server on the network which should |
useful when there is another DHCP server on the network which should |
be used by some machines. |
be used by some machines. |
|
|
The set:<tag> contruct sets the tag | The set:<tag> construct sets the tag |
whenever this dhcp-host directive is in use. This can be used to |
whenever this dhcp-host directive is in use. This can be used to |
selectively send DHCP options just for this host. More than one tag |
selectively send DHCP options just for this host. More than one tag |
can be set in a dhcp-host directive (but not in other places where |
can be set in a dhcp-host directive (but not in other places where |
Line 813 is given, then read all the files contained in that di
|
Line 1037 is given, then read all the files contained in that di
|
using this option is the same as for --dhcp-hostsfile: the |
using this option is the same as for --dhcp-hostsfile: the |
dhcp-optsfile will be re-read when dnsmasq receives SIGHUP. Note that |
dhcp-optsfile will be re-read when dnsmasq receives SIGHUP. Note that |
it is possible to encode the information in a |
it is possible to encode the information in a |
|
.TP |
|
.B --dhcp-hostsdir=<path> |
|
This is equivalent to dhcp-hostsfile, except for the following. The path MUST be a |
|
directory, and not an individual file. Changed or new files within |
|
the directory are read automatically, without the need to send SIGHUP. |
|
If a file is deleted for changed after it has been read by dnsmasq, then the |
|
host record it contained will remain until dnsmasq recieves a SIGHUP, or |
|
is restarted; ie host records are only added dynamically. |
|
.TP |
|
.B --dhcp-optsdir=<path> |
|
This is equivalent to dhcp-optsfile, with the differences noted for --dhcp-hostsdir. |
|
.TP |
.B --dhcp-boot |
.B --dhcp-boot |
flag as DHCP options, using the options names bootfile-name, |
flag as DHCP options, using the options names bootfile-name, |
server-ip-address and tftp-server. This allows these to be included |
server-ip-address and tftp-server. This allows these to be included |
Line 847 and to set the time-server address to 192.168.0.4, do
|
Line 1083 and to set the time-server address to 192.168.0.4, do
|
.B --dhcp-option = 42,192.168.0.4 |
.B --dhcp-option = 42,192.168.0.4 |
or |
or |
.B --dhcp-option = option:ntp-server, 192.168.0.4 |
.B --dhcp-option = option:ntp-server, 192.168.0.4 |
The special address 0.0.0.0 (or [::] for DHCPv6) is taken to mean "the address of the | The special address 0.0.0.0 is taken to mean "the address of the |
machine running dnsmasq". Data types allowed are comma separated | machine running dnsmasq". |
dotted-quad IP addresses, a decimal number, colon-separated hex digits | |
| Data types allowed are comma separated |
| dotted-quad IPv4 addresses, []-wrapped IPv6 addresses, a decimal number, colon-separated hex digits |
and a text string. If the optional tags are given then |
and a text string. If the optional tags are given then |
this option is only sent when all the tags are matched. |
this option is only sent when all the tags are matched. |
|
|
Line 865 keyword, followed by the option number or option name.
|
Line 1103 keyword, followed by the option number or option name.
|
name space is disjoint from the IPv4 option name space. IPv6 addresses |
name space is disjoint from the IPv4 option name space. IPv6 addresses |
in options must be bracketed with square brackets, eg. |
in options must be bracketed with square brackets, eg. |
.B --dhcp-option=option6:ntp-server,[1234::56] |
.B --dhcp-option=option6:ntp-server,[1234::56] |
| For IPv6, [::] means "the global address of |
| the machine running dnsmasq", whilst [fd00::] is replaced with the |
| ULA, if it exists, and [fe80::] with the link-local address. |
|
|
Be careful: no checking is done that the correct type of data for the |
Be careful: no checking is done that the correct type of data for the |
option number is sent, it is quite possible to |
option number is sent, it is quite possible to |
Line 928 DHCP options. This make extra space available in the D
|
Line 1168 DHCP options. This make extra space available in the D
|
options but can, rarely, confuse old or broken clients. This flag |
options but can, rarely, confuse old or broken clients. This flag |
forces "simple and safe" behaviour to avoid problems in such a case. |
forces "simple and safe" behaviour to avoid problems in such a case. |
.TP |
.TP |
|
.B --dhcp-relay=<local address>,<server address>[,<interface] |
|
Configure dnsmasq to do DHCP relay. The local address is an address |
|
allocated to an interface on the host running dnsmasq. All DHCP |
|
requests arriving on that interface will we relayed to a remote DHCP |
|
server at the server address. It is possible to relay from a single local |
|
address to multiple remote servers by using multiple dhcp-relay |
|
configs with the same local address and different server |
|
addresses. A server address must be an IP literal address, not a |
|
domain name. In the case of DHCPv6, the server address may be the |
|
ALL_SERVERS multicast address, ff05::1:3. In this case the interface |
|
must be given, not be wildcard, and is used to direct the multicast to the |
|
correct interface to reach the DHCP server. |
|
|
|
Access control for DHCP clients has the same rules as for the DHCP |
|
server, see --interface, --except-interface, etc. The optional |
|
interface name in the dhcp-relay config has a different function: it |
|
controls on which interface DHCP replies from the server will be |
|
accepted. This is intended for configurations which have three |
|
interfaces: one being relayed from, a second connecting the DHCP |
|
server, and a third untrusted network, typically the wider |
|
internet. It avoids the possibility of spoof replies arriving via this |
|
third interface. |
|
|
|
It is allowed to have dnsmasq act as a DHCP server on one set of |
|
interfaces and relay from a disjoint set of interfaces. Note that |
|
whilst it is quite possible to write configurations which appear to |
|
act as a server and a relay on the same interface, this is not |
|
supported: the relay function will take precedence. |
|
|
|
Both DHCPv4 and DHCPv6 relay is supported. It's not possible to relay |
|
DHCPv4 to a DHCPv6 server or vice-versa. |
|
.TP |
.B \-U, --dhcp-vendorclass=set:<tag>,[enterprise:<IANA-enterprise number>,]<vendor-class> |
.B \-U, --dhcp-vendorclass=set:<tag>,[enterprise:<IANA-enterprise number>,]<vendor-class> |
Map from a vendor-class string to a tag. Most DHCP clients provide a |
Map from a vendor-class string to a tag. Most DHCP clients provide a |
"vendor class" which represents, in some sense, the type of host. This option |
"vendor class" which represents, in some sense, the type of host. This option |
Line 956 this to set a different printer server for hosts in th
|
Line 1228 this to set a different printer server for hosts in th
|
"accounts" than for hosts in the class "engineering". |
"accounts" than for hosts in the class "engineering". |
.TP |
.TP |
.B \-4, --dhcp-mac=set:<tag>,<MAC address> |
.B \-4, --dhcp-mac=set:<tag>,<MAC address> |
(IPv4 only) Map from a MAC address to a tag. The MAC address may include | Map from a MAC address to a tag. The MAC address may include |
wildcards. For example |
wildcards. For example |
.B --dhcp-mac=set:3com,01:34:23:*:*:* |
.B --dhcp-mac=set:3com,01:34:23:*:*:* |
will set the tag "3com" for any host whose MAC address matches the pattern. |
will set the tag "3com" for any host whose MAC address matches the pattern. |
Line 978 agent ID and one provided by a relay agent, the tag is
|
Line 1250 agent ID and one provided by a relay agent, the tag is
|
(IPv4 only) A normal DHCP relay agent is only used to forward the initial parts of |
(IPv4 only) A normal DHCP relay agent is only used to forward the initial parts of |
a DHCP interaction to the DHCP server. Once a client is configured, it |
a DHCP interaction to the DHCP server. Once a client is configured, it |
communicates directly with the server. This is undesirable if the |
communicates directly with the server. This is undesirable if the |
relay agent is addding extra information to the DHCP packets, such as | relay agent is adding extra information to the DHCP packets, such as |
that used by |
that used by |
.B dhcp-circuitid |
.B dhcp-circuitid |
and |
and |
Line 995 relays at those addresses are affected.
|
Line 1267 relays at those addresses are affected.
|
Without a value, set the tag if the client sends a DHCP |
Without a value, set the tag if the client sends a DHCP |
option of the given number or name. When a value is given, set the tag only if |
option of the given number or name. When a value is given, set the tag only if |
the option is sent and matches the value. The value may be of the form |
the option is sent and matches the value. The value may be of the form |
"01:ff:*:02" in which case the value must match (apart from widcards) | "01:ff:*:02" in which case the value must match (apart from wildcards) |
but the option sent may have unmatched data past the end of the |
but the option sent may have unmatched data past the end of the |
value. The value may also be of the same form as in |
value. The value may also be of the same form as in |
.B dhcp-option |
.B dhcp-option |
Line 1008 will set the tag "efi-ia32" if the the number 6 appear
|
Line 1280 will set the tag "efi-ia32" if the the number 6 appear
|
architectures sent by the client in option 93. (See RFC 4578 for |
architectures sent by the client in option 93. (See RFC 4578 for |
details.) If the value is a string, substring matching is used. |
details.) If the value is a string, substring matching is used. |
|
|
The special form with vi-encap:<enterpise number> matches against | The special form with vi-encap:<enterprise number> matches against |
vendor-identifying vendor classes for the specified enterprise. Please |
vendor-identifying vendor classes for the specified enterprise. Please |
see RFC 3925 for more details of these rare and interesting beasts. |
see RFC 3925 for more details of these rare and interesting beasts. |
.TP |
.TP |
Line 1036 dhcp-host configuration in dnsmasq and the contents of
|
Line 1308 dhcp-host configuration in dnsmasq and the contents of
|
.TP |
.TP |
.B --dhcp-generate-names=tag:<tag>[,tag:<tag>] |
.B --dhcp-generate-names=tag:<tag>[,tag:<tag>] |
(IPv4 only) Generate a name for DHCP clients which do not otherwise have one, |
(IPv4 only) Generate a name for DHCP clients which do not otherwise have one, |
using the MAC address expressed in hex, seperated by dashes. Note that | using the MAC address expressed in hex, separated by dashes. Note that |
if a host provides a name, it will be used by preference to this, |
if a host provides a name, it will be used by preference to this, |
unless |
unless |
.B --dhcp-ignore-names |
.B --dhcp-ignore-names |
Line 1086 functions when supported by a suitable DHCP server.
|
Line 1358 functions when supported by a suitable DHCP server.
|
This specifies a boot option which may appear in a PXE boot menu. <CSA> is |
This specifies a boot option which may appear in a PXE boot menu. <CSA> is |
client system type, only services of the correct type will appear in a |
client system type, only services of the correct type will appear in a |
menu. The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86, |
menu. The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86, |
Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI; an | Intel_Lean_Client, IA32_EFI, X86-64_EFI, Xscale_EFI, BC_EFI, ARM32_EFI and ARM64_EFI; an |
integer may be used for other types. The |
integer may be used for other types. The |
parameter after the menu text may be a file name, in which case dnsmasq acts as a |
parameter after the menu text may be a file name, in which case dnsmasq acts as a |
boot server and directs the PXE client to download the file by TFTP, |
boot server and directs the PXE client to download the file by TFTP, |
Line 1095 either from itself (
|
Line 1367 either from itself (
|
must be set for this to work) or another TFTP server if the final server |
must be set for this to work) or another TFTP server if the final server |
address/name is given. |
address/name is given. |
Note that the "layer" |
Note that the "layer" |
suffix (normally ".0") is supplied by PXE, and should not be added to | suffix (normally ".0") is supplied by PXE, and need not be added to |
the basename. If an integer boot service type, rather than a basename | the basename. Alternatively, the basename may be a filename, complete with suffix, in which case |
| no layer suffix is added. If an integer boot service type, rather than a basename |
is given, then the PXE client will search for a |
is given, then the PXE client will search for a |
suitable boot service for that type on the network. This search may be done |
suitable boot service for that type on the network. This search may be done |
by broadcast, or direct to a server if its IP address/name is provided. |
by broadcast, or direct to a server if its IP address/name is provided. |
Line 1113 timeout has elapsed with no keyboard input, the first
|
Line 1386 timeout has elapsed with no keyboard input, the first
|
option will be automatically executed. If the timeout is zero then the first available menu |
option will be automatically executed. If the timeout is zero then the first available menu |
item will be executed immediately. If |
item will be executed immediately. If |
.B pxe-prompt |
.B pxe-prompt |
is ommitted the system will wait for user input if there are multiple | is omitted the system will wait for user input if there are multiple |
items in the menu, but boot immediately if |
items in the menu, but boot immediately if |
there is only one. See |
there is only one. See |
.B pxe-service |
.B pxe-service |
Line 1162 enables dynamic allocation. With tags, only when the t
|
Line 1435 enables dynamic allocation. With tags, only when the t
|
set. It may be repeated with different tag sets. |
set. It may be repeated with different tag sets. |
.TP |
.TP |
.B \-5, --no-ping |
.B \-5, --no-ping |
(IPv4 only) By default, the DHCP server will attempt to ensure that an address in | (IPv4 only) By default, the DHCP server will attempt to ensure that an address is |
not in use before allocating it to a host. It does this by sending an |
not in use before allocating it to a host. It does this by sending an |
ICMP echo request (aka "ping") to the address in question. If it gets |
ICMP echo request (aka "ping") to the address in question. If it gets |
a reply, then the address must already be in use, and another is |
a reply, then the address must already be in use, and another is |
Line 1172 tried. This flag disables this check. Use with caution
|
Line 1445 tried. This flag disables this check. Use with caution
|
Extra logging for DHCP: log all the options sent to DHCP clients and |
Extra logging for DHCP: log all the options sent to DHCP clients and |
the tags used to determine them. |
the tags used to determine them. |
.TP |
.TP |
|
.B --quiet-dhcp, --quiet-dhcp6, --quiet-ra |
|
Suppress logging of the routine operation of these protocols. Errors and |
|
problems will still be logged. --quiet-dhcp and quiet-dhcp6 are |
|
over-ridden by --log-dhcp. |
|
.TP |
.B \-l, --dhcp-leasefile=<path> |
.B \-l, --dhcp-leasefile=<path> |
Use the specified file to store DHCP lease information. |
Use the specified file to store DHCP lease information. |
.TP |
.TP |
Line 1262 every call to the script.
|
Line 1540 every call to the script.
|
DNSMASQ_IAID containing the IAID for the lease. If the lease is a |
DNSMASQ_IAID containing the IAID for the lease. If the lease is a |
temporary allocation, this is prefixed to 'T'. |
temporary allocation, this is prefixed to 'T'. |
|
|
|
DNSMASQ_MAC containing the MAC address of the client, if known. |
|
|
|
|
Note that the supplied hostname, vendorclass and userclass data is |
Note that the supplied hostname, vendorclass and userclass data is |
only supplied for |
only supplied for |
"add" actions or "old" actions when a host resumes an existing lease, |
"add" actions or "old" actions when a host resumes an existing lease, |
Line 1289 At dnsmasq startup, the script will be invoked for
|
Line 1567 At dnsmasq startup, the script will be invoked for
|
all existing leases as they are read from the lease file. Expired |
all existing leases as they are read from the lease file. Expired |
leases will be called with "del" and others with "old". When dnsmasq |
leases will be called with "del" and others with "old". When dnsmasq |
receives a HUP signal, the script will be invoked for existing leases |
receives a HUP signal, the script will be invoked for existing leases |
with an "old " event. | with an "old" event. |
|
|
|
|
There are two further actions which may appear as the first argument | There are four further actions which may appear as the first argument |
to the script, "init" and "tftp". More may be added in the future, so | to the script, "init", "arp-add", "arp-del" and "tftp". More may be added in the future, so |
scripts should be written to ignore unknown actions. "init" is |
scripts should be written to ignore unknown actions. "init" is |
described below in |
described below in |
.B --leasefile-ro |
.B --leasefile-ro |
Line 1301 The "tftp" action is invoked when a TFTP file transfer
|
Line 1579 The "tftp" action is invoked when a TFTP file transfer
|
arguments are the file size in bytes, the address to which the file |
arguments are the file size in bytes, the address to which the file |
was sent, and the complete pathname of the file. |
was sent, and the complete pathname of the file. |
|
|
|
The "arp-add" and "arp-del" actions are only called if enabled with |
|
.B --script-arp |
|
They are are supplied with a MAC address and IP address as arguments. "arp-add" indicates |
|
the arrival of a new entry in the ARP or neighbour table, and "arp-del" indicates the deletion of same. |
|
|
.TP |
.TP |
.B --dhcp-luascript=<path> |
.B --dhcp-luascript=<path> |
Specify a script written in Lua, to be run when leases are created, |
Specify a script written in Lua, to be run when leases are created, |
Line 1347 table holds the tags
|
Line 1630 table holds the tags
|
.B file_name |
.B file_name |
and |
and |
.B file_size. |
.B file_size. |
|
|
|
The |
|
.B arp |
|
and |
|
.B arp-old |
|
functions are called only when enabled with |
|
.B --script-arp |
|
and have a table which holds the tags |
|
.B mac_addres |
|
and |
|
.B client_address. |
.TP |
.TP |
.B --dhcp-scriptuser |
.B --dhcp-scriptuser |
Specify 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. |
Specify 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. |
.TP | .TP |
| .B --script-arp |
| Enable the "arp" and "arp-old" functions in the dhcp-script and dhcp-luascript. |
| .TP |
.B \-9, --leasefile-ro |
.B \-9, --leasefile-ro |
Completely suppress use of the lease database file. The file will not |
Completely suppress use of the lease database file. The file will not |
be created, read, or written. Change the way the lease-change |
be created, read, or written. Change the way the lease-change |
Line 1366 option also forces the leasechange script to be called
|
Line 1663 option also forces the leasechange script to be called
|
to the client-id and lease length and expiry time. |
to the client-id and lease length and expiry time. |
.TP |
.TP |
.B --bridge-interface=<interface>,<alias>[,<alias>] |
.B --bridge-interface=<interface>,<alias>[,<alias>] |
Treat DHCP request packets arriving at any of the <alias> interfaces | Treat DHCP (v4 and v6) request and IPv6 Router Solicit packets |
as if they had arrived at <interface>. This option is necessary when | arriving at any of the <alias> interfaces as if they had arrived at |
using "old style" bridging on BSD platforms, since | <interface>. This option allows dnsmasq to provide DHCP and RA |
packets arrive at tap interfaces which don't have an IP address. | service over unaddressed and unbridged Ethernet interfaces, e.g. on an |
| OpenStack compute host where each such interface is a TAP interface to |
| a VM, or as in "old style bridging" on BSD platforms. A trailing '*' |
| wildcard can be used in each <alias>. |
.TP |
.TP |
.B \-s, --domain=<domain>[,<address range>[,local]] |
.B \-s, --domain=<domain>[,<address range>[,local]] |
Specifies DNS domains for the DHCP server. Domains may be be given |
Specifies DNS domains for the DHCP server. Domains may be be given |
Line 1412 In the default mode, dnsmasq inserts the unqualified n
|
Line 1712 In the default mode, dnsmasq inserts the unqualified n
|
DHCP clients into the DNS. For this reason, the names must be unique, |
DHCP clients into the DNS. For this reason, the names must be unique, |
even if two clients which have the same name are in different |
even if two clients which have the same name are in different |
domains. If a second DHCP client appears which has the same name as an |
domains. If a second DHCP client appears which has the same name as an |
existing client, the name is transfered to the new client. If | existing client, the name is transferred to the new client. If |
.B --dhcp-fqdn |
.B --dhcp-fqdn |
is set, this behaviour changes: the unqualified name is no longer |
is set, this behaviour changes: the unqualified name is no longer |
put in the DNS, only the qualified name. Two DHCP clients with the |
put in the DNS, only the qualified name. Two DHCP clients with the |
Line 1440 creation are handled by a different protocol. When DHC
|
Line 1740 creation are handled by a different protocol. When DHC
|
only a subset of this is needed, and dnsmasq can handle it, using |
only a subset of this is needed, and dnsmasq can handle it, using |
existing DHCP configuration to provide most data. When RA is enabled, |
existing DHCP configuration to provide most data. When RA is enabled, |
dnsmasq will advertise a prefix for each dhcp-range, with default |
dnsmasq will advertise a prefix for each dhcp-range, with default |
router and recursive DNS server as the relevant link-local address on | router as the relevant link-local address on |
the machine running dnsmasq. By default, he "managed address" bits are set, and | the machine running dnsmasq. By default, the "managed address" bits are set, and |
the "use SLAAC" bit is reset. This can be changed for individual |
the "use SLAAC" bit is reset. This can be changed for individual |
subnets with the mode keywords described in |
subnets with the mode keywords described in |
.B --dhcp-range. |
.B --dhcp-range. |
RFC6106 DNS parameters are included in the advertisements. By default, |
RFC6106 DNS parameters are included in the advertisements. By default, |
the relevant link-local address of the machine running dnsmasq is sent |
the relevant link-local address of the machine running dnsmasq is sent |
as recursive DNS server. If provided, the DHCPv6 options dns-server and |
as recursive DNS server. If provided, the DHCPv6 options dns-server and |
domain-search are used for RDNSS and DNSSL. | domain-search are used for the DNS server (RDNSS) and the domain serach list (DNSSL). |
.TP |
.TP |
.B --enable-tftp | .B --ra-param=<interface>,[high|low],[[<ra-interval>],<router lifetime>] |
| Set non-default values for router advertisements sent via an |
| interface. The priority field for the router may be altered from the |
| default of medium with eg |
| .B --ra-param=eth0,high. |
| The interval between router advertisements may be set (in seconds) with |
| .B --ra-param=eth0,60. |
| The lifetime of the route may be changed or set to zero, which allows |
| a router to advertise prefixes but not a route via itself. |
| .B --ra-parm=eth0,0,0 |
| (A value of zero for the interval means the default value.) All three parameters may be set at once. |
| .B --ra-param=low,60,1200 |
| The interface field may include a wildcard. |
| .TP |
| .B --enable-tftp[=<interface>[,<interface>]] |
Enable the TFTP server function. This is deliberately limited to that |
Enable the TFTP server function. This is deliberately limited to that |
needed to net-boot a client. Only reading is allowed; the tsize and |
needed to net-boot a client. Only reading is allowed; the tsize and |
blksize extensions are supported (tsize is only supported in octet |
blksize extensions are supported (tsize is only supported in octet |
mode). | mode). Without an argument, the TFTP service is provided to the same set of interfaces as DHCP service. |
| If the list of interfaces is provided, that defines which interfaces recieve TFTP service. |
.TP |
.TP |
.B --tftp-root=<directory>[,<interface>] |
.B --tftp-root=<directory>[,<interface>] |
Look for files to transfer using TFTP relative to the given |
Look for files to transfer using TFTP relative to the given |
Line 1464 Absolute paths (starting with /) are allowed, but they
|
Line 1779 Absolute paths (starting with /) are allowed, but they
|
the tftp-root. If the optional interface argument is given, the |
the tftp-root. If the optional interface argument is given, the |
directory is only used for TFTP requests via that interface. |
directory is only used for TFTP requests via that interface. |
.TP |
.TP |
|
.B --tftp-no-fail |
|
Do not abort startup if specified tftp root directories are inaccessible. |
|
.TP |
.B --tftp-unique-root |
.B --tftp-unique-root |
Add the IP address of the TFTP client as a path component on the end |
Add the IP address of the TFTP client as a path component on the end |
of the TFTP-root (in standard dotted-quad format). Only valid if a |
of the TFTP-root (in standard dotted-quad format). Only valid if a |
Line 1500 require about (2*n) + 10 descriptors. If
|
Line 1818 require about (2*n) + 10 descriptors. If
|
.B --tftp-port-range |
.B --tftp-port-range |
is given, that can affect the number of concurrent connections. |
is given, that can affect the number of concurrent connections. |
.TP |
.TP |
|
.B --tftp-mtu=<mtu size> |
|
Use size as the ceiling of the MTU supported by the intervening network when |
|
negotiating TFTP blocksize, overriding the MTU setting of the local interface if it is larger. |
|
.TP |
.B --tftp-no-blocksize |
.B --tftp-no-blocksize |
Stop the TFTP server from negotiating the "blocksize" option with a |
Stop the TFTP server from negotiating the "blocksize" option with a |
client. Some buggy clients request this option but then behave badly |
client. Some buggy clients request this option but then behave badly |
Line 1519 Specify a different configuration file. The conf-file
|
Line 1841 Specify a different configuration file. The conf-file
|
configuration files, to include multiple configuration files. A |
configuration files, to include multiple configuration files. A |
filename of "-" causes dnsmasq to read configuration from stdin. |
filename of "-" causes dnsmasq to read configuration from stdin. |
.TP |
.TP |
.B \-7, --conf-dir=<directory>[,<file-extension>......] | .B \-7, --conf-dir=<directory>[,<file-extension>......], |
Read all the files in the given directory as configuration |
Read all the files in the given directory as configuration |
files. If extension(s) are given, any files which end in those |
files. If extension(s) are given, any files which end in those |
extensions are skipped. Any files whose names end in ~ or start with . or start and end |
extensions are skipped. Any files whose names end in ~ or start with . or start and end |
with # are always skipped. This flag may be given on the command | with # are always skipped. If the extension starts with * then only files |
line or in a configuration file. | which have that extension are loaded. So |
| .B --conf-dir=/path/to/dir,*.conf |
| loads all files with the suffix .conf in /path/to/dir. This flag may be given on the command |
| line or in a configuration file. If giving it on the command line, be sure to |
| escape * characters. |
| .TP |
| .B --servers-file=<file> |
| A special case of |
| .B --conf-file |
| which differs in two respects. Firstly, only --server and --rev-server are allowed |
| in the configuration file included. Secondly, the file is re-read and the configuration |
| therein is updated when dnsmasq recieves SIGHUP. |
.SH CONFIG FILE |
.SH CONFIG FILE |
At startup, dnsmasq reads |
At startup, dnsmasq reads |
.I /etc/dnsmasq.conf, |
.I /etc/dnsmasq.conf, |
Line 1550 clears its cache and then re-loads
|
Line 1883 clears its cache and then re-loads
|
.I /etc/hosts |
.I /etc/hosts |
and |
and |
.I /etc/ethers |
.I /etc/ethers |
and any file given by --dhcp-hostsfile, --dhcp-optsfile or --addn-hosts. | and any file given by --dhcp-hostsfile, --dhcp-hostsdir, --dhcp-optsfile, |
| --dhcp-optsdir, --addn-hosts or --hostsdir. |
The dhcp lease change script is called for all |
The dhcp lease change script is called for all |
existing DHCP leases. If |
existing DHCP leases. If |
.B |
.B |
Line 1565 When it receives a SIGUSR1,
|
Line 1899 When it receives a SIGUSR1,
|
writes statistics to the system log. It writes the cache size, |
writes statistics to the system log. It writes the cache size, |
the number of names which have had to removed from the cache before |
the number of names which have had to removed from the cache before |
they expired in order to make room for new names and the total number |
they expired in order to make room for new names and the total number |
of names that have been inserted into the cache. For each upstream | of names that have been inserted into the cache. The number of cache hits and |
| misses and the number of authoritative queries answered are also given. For each upstream |
server it gives the number of queries sent, and the number which |
server it gives the number of queries sent, and the number which |
resulted in an error. In |
resulted in an error. In |
.B --no-daemon |
.B --no-daemon |
mode or when full logging is enabled (-q), a complete dump of the |
mode or when full logging is enabled (-q), a complete dump of the |
contents of the cache is made. | contents of the cache is made. |
| |
| The cache statistics are also available in the DNS as answers to |
| queries of class CHAOS and type TXT in domain bind. The domain names are cachesize.bind, insertions.bind, evictions.bind, |
| misses.bind, hits.bind, auth.bind and servers.bind. An example command to query this, using the |
| .B dig |
| utility would be |
| |
| dig +short chaos txt cachesize.bind |
| |
.PP |
.PP |
When it receives SIGUSR2 and it is logging direct to a file (see |
When it receives SIGUSR2 and it is logging direct to a file (see |
.B --log-facility |
.B --log-facility |
Line 1666 used to allocate the address, one from any matching
|
Line 2010 used to allocate the address, one from any matching
|
The tag "bootp" is set for BOOTP requests, and a tag whose name is the |
The tag "bootp" is set for BOOTP requests, and a tag whose name is the |
name of the interface on which the request arrived is also set. |
name of the interface on which the request arrived is also set. |
|
|
Any configuration lines which includes one or more tag:<tag> contructs | Any configuration lines which include one or more tag:<tag> constructs |
will only be valid if all that tags are matched in the set derived |
will only be valid if all that tags are matched in the set derived |
above. Typically this is dhcp-option. |
above. Typically this is dhcp-option. |
.B dhcp-option |
.B dhcp-option |
Line 1674 which has tags will be used in preference to an untag
|
Line 2018 which has tags will be used in preference to an untag
|
.B dhcp-option, |
.B dhcp-option, |
provided that _all_ the tags match somewhere in the |
provided that _all_ the tags match somewhere in the |
set collected as described above. The prefix '!' on a tag means 'not' |
set collected as described above. The prefix '!' on a tag means 'not' |
so --dhcp=option=tag:!purple,3,1.2.3.4 sends the option when the | so --dhcp-option=tag:!purple,3,1.2.3.4 sends the option when the |
tag purple is not in the set of valid tags. (If using this in a |
tag purple is not in the set of valid tags. (If using this in a |
command line rather than a configuration file, be sure to escape !, |
command line rather than a configuration file, be sure to escape !, |
which is a shell metacharacter) |
which is a shell metacharacter) |
Line 1791 Something like:
|
Line 2135 Something like:
|
.nf |
.nf |
.B auth-server=our.zone.com,eth0 |
.B auth-server=our.zone.com,eth0 |
.B interface-name=our.zone.com,eth0 |
.B interface-name=our.zone.com,eth0 |
.B auth-zone=our.zone.com,1.2.3.0/24 | .B auth-zone=our.zone.com,1.2.3.0/24,eth0 |
.fi |
.fi |
|
|
|
(The "eth0" argument in auth-zone adds the subnet containing eth0's |
|
dynamic address to the zone, so that the interface-name returns the |
|
address in outside queries.) |
|
|
Our final configuration builds on that above, but also adds a |
Our final configuration builds on that above, but also adds a |
secondary DNS server. This is another DNS server which learns the DNS data |
secondary DNS server. This is another DNS server which learns the DNS data |
for the zone by doing zones transfer, and acts as a backup should |
for the zone by doing zones transfer, and acts as a backup should |
Line 1822 to particular hosts then
|
Line 2170 to particular hosts then
|
will do so. |
will do so. |
|
|
Dnsmasq acts as an authoritative server for in-addr.arpa and |
Dnsmasq acts as an authoritative server for in-addr.arpa and |
ipv6.arpa domains associated with the subnets given in auth-zone | ip6.arpa domains associated with the subnets given in auth-zone |
declarations, so reverse (address to name) lookups can be simply |
declarations, so reverse (address to name) lookups can be simply |
configured with a suitable NS record, for instance in this example, |
configured with a suitable NS record, for instance in this example, |
where we allow 1.2.3.0/24 addresses. |
where we allow 1.2.3.0/24 addresses. |
Line 1851 IPv4 and IPv6 addresses from /etc/hosts (and
|
Line 2199 IPv4 and IPv6 addresses from /etc/hosts (and
|
.B --addn-hosts |
.B --addn-hosts |
) and |
) and |
.B --host-record |
.B --host-record |
|
and |
|
.B --interface-name |
provided the address falls into one of the subnets specified in the |
provided the address falls into one of the subnets specified in the |
.B --auth-zone. |
.B --auth-zone. |
.PP |
.PP |
Addresses specified by |
|
.B --interface-name. |
|
In this case, the address is not contrained to a subnet from |
|
.B --auth-zone. |
|
|
|
.PP |
|
Addresses of DHCP leases, provided the address falls into one of the subnets specified in the |
Addresses of DHCP leases, provided the address falls into one of the subnets specified in the |
|
.B --auth-zone. |
|
(If contructed DHCP ranges are is use, which depend on the address dynamically |
|
assigned to an interface, then the form of |
.B --auth-zone |
.B --auth-zone |
OR a constructed DHCP range. In the default mode, where a DHCP lease | which defines subnets by the dynamic address of an interface should |
| be used to ensure this condition is met.) |
| .PP |
| In the default mode, where a DHCP lease |
has an unqualified name, and possibly a qualified name constructed |
has an unqualified name, and possibly a qualified name constructed |
using |
using |
.B --domain |
.B --domain |