Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 1 | .TH DNSMASQ 8 |
| 2 | .SH NAME |
| 3 | dnsmasq \- A lightweight DHCP and caching DNS server. |
| 4 | .SH SYNOPSIS |
| 5 | .B dnsmasq |
| 6 | .I [OPTION]... |
| 7 | .SH "DESCRIPTION" |
| 8 | .BR dnsmasq |
Simon Kelley | 5aabfc7 | 2007-08-29 11:24:47 +0100 | [diff] [blame] | 9 | is a lightweight DNS, TFTP and DHCP server. It is intended to provide |
| 10 | coupled DNS and DHCP service to a LAN. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 11 | .PP |
| 12 | Dnsmasq accepts DNS queries and either answers them from a small, local, |
| 13 | cache or forwards them to a real, recursive, DNS server. It loads the |
| 14 | contents of /etc/hosts so that local hostnames |
| 15 | which do not appear in the global DNS can be resolved and also answers |
| 16 | DNS queries for DHCP configured hosts. |
| 17 | .PP |
Simon Kelley | 3be3454 | 2004-09-11 19:12:13 +0100 | [diff] [blame] | 18 | The dnsmasq DHCP server supports static address assignments, multiple |
| 19 | networks, DHCP-relay and RFC3011 subnet specifiers. It automatically |
| 20 | sends a sensible default set of DHCP options, and can be configured to |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 21 | send any desired set of DHCP options, including vendor-encapsulated |
Simon Kelley | 1b7ecd1 | 2007-02-05 14:57:57 +0000 | [diff] [blame] | 22 | options. It includes a secure, read-only, |
| 23 | TFTP server to allow net/PXE boot of DHCP hosts and also supports BOOTP. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 24 | .PP |
Simon Kelley | 3be3454 | 2004-09-11 19:12:13 +0100 | [diff] [blame] | 25 | Dnsmasq |
Simon Kelley | 1b7ecd1 | 2007-02-05 14:57:57 +0000 | [diff] [blame] | 26 | supports IPv6 for DNS, but not DHCP. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 27 | .SH OPTIONS |
| 28 | Note that in general missing parameters are allowed and switch off |
Simon Kelley | 832af0b | 2007-01-21 20:01:28 +0000 | [diff] [blame] | 29 | functions, for instance "--pid-file" disables writing a PID file. On |
Simon Kelley | 33820b7 | 2004-04-03 21:10:00 +0100 | [diff] [blame] | 30 | BSD, unless the GNU getopt library is linked, the long form of the |
| 31 | options does not work on the command line; it is still recognised in |
| 32 | the configuration file. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 33 | .TP |
| 34 | .B \-h, --no-hosts |
| 35 | Don't read the hostnames in /etc/hosts. |
| 36 | .TP |
| 37 | .B \-H, --addn-hosts=<file> |
| 38 | Additional hosts file. Read the specified file as well as /etc/hosts. If -h is given, read |
Simon Kelley | fd9fa48 | 2004-10-21 20:24:00 +0100 | [diff] [blame] | 39 | only the specified file. This option may be repeated for more than one |
| 40 | additional hosts file. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 41 | .TP |
Simon Kelley | 832af0b | 2007-01-21 20:01:28 +0000 | [diff] [blame] | 42 | .B \-E, --expand-hosts |
| 43 | Add the domain to simple names (without a period) in /etc/hosts |
| 44 | in the same way as for DHCP-derived names. |
| 45 | .TP |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 46 | .B \-T, --local-ttl=<time> |
| 47 | When replying with information from /etc/hosts or the DHCP leases |
| 48 | file dnsmasq by default sets the time-to-live field to zero, meaning |
| 49 | that the requestor should not itself cache the information. This is |
| 50 | the correct thing to do in almost all situations. This option allows a |
| 51 | time-to-live (in seconds) to be given for these replies. This will |
| 52 | reduce the load on the server at the expense of clients using stale |
| 53 | data under some circumstances. |
| 54 | .TP |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 55 | .B --neg-ttl=<time> |
| 56 | Negative replies from upstream servers normally contain time-to-live |
| 57 | information in SOA records which dnsmasq uses for caching. If the |
| 58 | replies from upstream servers omit this information, dnsmasq does not |
| 59 | cache the reply. This option gives a default value for time-to-live |
| 60 | (in seconds) which dnsmasq uses to cache negative replies even in |
| 61 | the absence of an SOA record. |
| 62 | .TP |
Simon Kelley | 3be3454 | 2004-09-11 19:12:13 +0100 | [diff] [blame] | 63 | .B \-k, --keep-in-foreground |
| 64 | Do not go into the background at startup but otherwise run as |
Simon Kelley | 3d8df26 | 2005-08-29 12:19:27 +0100 | [diff] [blame] | 65 | normal. This is intended for use when dnsmasq is run under daemontools |
| 66 | or launchd. |
Simon Kelley | 3be3454 | 2004-09-11 19:12:13 +0100 | [diff] [blame] | 67 | .TP |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 68 | .B \-d, --no-daemon |
| 69 | Debug mode: don't fork to the background, don't write a pid file, |
| 70 | don't change user id, generate a complete cache dump on receipt on |
Simon Kelley | 3be3454 | 2004-09-11 19:12:13 +0100 | [diff] [blame] | 71 | SIGUSR1, log to stderr as well as syslog, don't fork new processes |
| 72 | to handle TCP queries. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 73 | .TP |
| 74 | .B \-q, --log-queries |
| 75 | Log the results of DNS queries handled by dnsmasq. Enable a full cache dump on receipt of SIGUSR1. |
| 76 | .TP |
Simon Kelley | 849a835 | 2006-06-09 21:02:31 +0100 | [diff] [blame] | 77 | .B \-8, --log-facility=<facility> |
| 78 | Set the facility to which dnsmasq will send syslog entries, this |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 79 | defaults to DAEMON, and to LOCAL0 when debug mode is in operation. If |
Simon Kelley | 9e03894 | 2008-05-30 20:06:34 +0100 | [diff] [blame] | 80 | the facility given contains at least one '/' character, it is taken to |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 81 | be a filename, and dnsmasq logs to the given file, instead of |
| 82 | syslog. (Errors whilst reading configuration will still go to syslog, |
| 83 | but all output from a successful startup, and all output whilst |
Simon Kelley | 5aabfc7 | 2007-08-29 11:24:47 +0100 | [diff] [blame] | 84 | running, will go exclusively to the file.) When logging to a file, |
| 85 | dnsmasq will close and reopen the file when it receives SIGUSR2. This |
| 86 | allows the log file to be rotated without stopping dnsmasq. |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 87 | .TP |
| 88 | .B --log-async[=<lines>] |
| 89 | Enable asynchronous logging and optionally set the limit on the |
| 90 | number of lines |
| 91 | which will be queued by dnsmasq when writing to the syslog is slow. |
| 92 | Dnsmasq can log asynchronously: this |
| 93 | allows it to continue functioning without being blocked by syslog, and |
| 94 | allows syslog to use dnsmasq for DNS queries without risking deadlock. |
| 95 | If the queue of log-lines becomes full, dnsmasq will log the |
| 96 | overflow, and the number of messages lost. The default queue length is |
| 97 | 5, a sane value would be 5-25, and a maximum limit of 100 is imposed. |
Simon Kelley | 849a835 | 2006-06-09 21:02:31 +0100 | [diff] [blame] | 98 | .TP |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 99 | .B \-x, --pid-file=<path> |
| 100 | Specify an alternate path for dnsmasq to record its process-id in. Normally /var/run/dnsmasq.pid. |
| 101 | .TP |
| 102 | .B \-u, --user=<username> |
| 103 | Specify the userid to which dnsmasq will change after startup. Dnsmasq must normally be started as root, but it will drop root |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame] | 104 | privileges after startup by changing id to another user. Normally this user is "nobody" but that |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 105 | can be over-ridden with this switch. |
| 106 | .TP |
| 107 | .B \-g, --group=<groupname> |
| 108 | Specify the group which dnsmasq will run |
| 109 | as. The defaults to "dip", if available, to facilitate access to |
| 110 | /etc/ppp/resolv.conf which is not normally world readable. |
| 111 | .TP |
| 112 | .B \-v, --version |
| 113 | Print the version number. |
| 114 | .TP |
| 115 | .B \-p, --port=<port> |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 116 | Listen on <port> instead of the standard DNS port (53). Setting this |
| 117 | to zero completely disables DNS function, leaving only DHCP and/or TFTP. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 118 | .TP |
Simon Kelley | feba5c1 | 2004-07-27 20:28:58 +0100 | [diff] [blame] | 119 | .B \-P, --edns-packet-max=<size> |
| 120 | Specify the largest EDNS.0 UDP packet which is supported by the DNS |
| 121 | forwarder. Defaults to 1280, which is the RFC2671-recommended maximum |
| 122 | for ethernet. |
| 123 | .TP |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 124 | .B \-Q, --query-port=<query_port> |
Simon Kelley | 1a6bca8 | 2008-07-11 11:11:42 +0100 | [diff] [blame^] | 125 | Send outbound DNS queries from, and listen for their replies on, the |
| 126 | specific UDP port <query_port> instead of using random ports. NOTE |
| 127 | that using this option will make dnsmasq less secure against DNS |
| 128 | spoofing attacks but it may be faster and use less resources. Setting this option |
| 129 | to zero makes dnsmasq use a single port allocated to it by the |
| 130 | OS: this was the default behaviour in versions prior to 2.43. |
| 131 | .TP |
| 132 | .B --min-port=<port> |
| 133 | Do not use ports less than that given as source for outbound DNS |
| 134 | queries. Dnsmasq picks random ports as source for outbound queries: |
| 135 | when this option is given, the ports used will always to larger |
| 136 | than that specified. Useful for systems behind firewalls. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 137 | .TP |
| 138 | .B \-i, --interface=<interface name> |
Simon Kelley | feba5c1 | 2004-07-27 20:28:58 +0100 | [diff] [blame] | 139 | Listen only on the specified interface(s). Dnsmasq automatically adds |
| 140 | the loopback (local) interface to the list of interfaces to use when |
| 141 | the |
| 142 | .B \--interface |
| 143 | option is used. If no |
| 144 | .B \--interface |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 145 | or |
Simon Kelley | feba5c1 | 2004-07-27 20:28:58 +0100 | [diff] [blame] | 146 | .B \--listen-address |
| 147 | options are given dnsmasq listens on all available interfaces except any |
| 148 | given in |
| 149 | .B \--except-interface |
Simon Kelley | 309331f | 2006-04-22 15:05:01 +0100 | [diff] [blame] | 150 | options. IP alias interfaces (eg "eth1:0") cannot be used with |
Simon Kelley | 8a911cc | 2004-03-16 18:35:52 +0000 | [diff] [blame] | 151 | .B --interface |
| 152 | or |
| 153 | .B --except-interface |
Simon Kelley | 309331f | 2006-04-22 15:05:01 +0100 | [diff] [blame] | 154 | options, use --listen-address instead. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 155 | .TP |
| 156 | .B \-I, --except-interface=<interface name> |
Simon Kelley | feba5c1 | 2004-07-27 20:28:58 +0100 | [diff] [blame] | 157 | Do not listen on the specified interface. Note that the order of |
| 158 | .B \--listen-address |
| 159 | .B --interface |
| 160 | and |
| 161 | .B --except-interface |
| 162 | options does not matter and that |
| 163 | .B --except-interface |
| 164 | options always override the others. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 165 | .TP |
Simon Kelley | 3d8df26 | 2005-08-29 12:19:27 +0100 | [diff] [blame] | 166 | .B \-2, --no-dhcp-interface=<interface name> |
Simon Kelley | 832af0b | 2007-01-21 20:01:28 +0000 | [diff] [blame] | 167 | Do not provide DHCP or TFTP on the specified interface, but do provide DNS service. |
Simon Kelley | 3d8df26 | 2005-08-29 12:19:27 +0100 | [diff] [blame] | 168 | .TP |
Simon Kelley | 44a2a31 | 2004-03-10 20:04:35 +0000 | [diff] [blame] | 169 | .B \-a, --listen-address=<ipaddr> |
Simon Kelley | feba5c1 | 2004-07-27 20:28:58 +0100 | [diff] [blame] | 170 | Listen on the given IP address(es). Both |
| 171 | .B \--interface |
| 172 | and |
| 173 | .B \--listen-address |
| 174 | options may be given, in which case the set of both interfaces and |
| 175 | addresses is used. Note that if no |
| 176 | .B \--interface |
| 177 | option is given, but |
| 178 | .B \--listen-address |
| 179 | is, dnsmasq will not automatically listen on the loopback |
| 180 | interface. To achieve this, its IP address, 127.0.0.1, must be |
| 181 | explicitly given as a |
| 182 | .B \--listen-address |
| 183 | option. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 184 | .TP |
Simon Kelley | 44a2a31 | 2004-03-10 20:04:35 +0000 | [diff] [blame] | 185 | .B \-z, --bind-interfaces |
| 186 | On systems which support it, dnsmasq binds the wildcard address, |
| 187 | even when it is listening on only some interfaces. It then discards |
| 188 | requests that it shouldn't reply to. This has the advantage of |
| 189 | working even when interfaces come and go and change address. This |
| 190 | option forces dnsmasq to really bind only the interfaces it is |
| 191 | listening on. About the only time when this is useful is when |
Simon Kelley | f6b7dc4 | 2005-01-23 12:06:08 +0000 | [diff] [blame] | 192 | running another nameserver (or another instance of dnsmasq) on the |
Simon Kelley | 309331f | 2006-04-22 15:05:01 +0100 | [diff] [blame] | 193 | same machine. Setting this option also enables multiple instances of |
Simon Kelley | f6b7dc4 | 2005-01-23 12:06:08 +0000 | [diff] [blame] | 194 | dnsmasq which provide DHCP service to run in the same machine. |
| 195 | .TP |
| 196 | .B \-y, --localise-queries |
| 197 | Return answers to DNS queries from /etc/hosts which depend on the interface over which the query was |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame] | 198 | received. If a name in /etc/hosts has more than one address associated with |
Simon Kelley | f6b7dc4 | 2005-01-23 12:06:08 +0000 | [diff] [blame] | 199 | it, and at least one of those addresses is on the same subnet as the |
| 200 | interface to which the query was sent, then return only the |
| 201 | address(es) on that subnet. This allows for a server to have multiple |
| 202 | addresses in /etc/hosts corresponding to each of its interfaces, and |
| 203 | hosts will get the correct address based on which network they are |
| 204 | attached to. Currently this facility is limited to IPv4. |
Simon Kelley | 44a2a31 | 2004-03-10 20:04:35 +0000 | [diff] [blame] | 205 | .TP |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 206 | .B \-b, --bogus-priv |
| 207 | Bogus private reverse lookups. All reverse lookups for private IP ranges (ie 192.168.x.x, etc) |
Simon Kelley | feba5c1 | 2004-07-27 20:28:58 +0100 | [diff] [blame] | 208 | which are not found in /etc/hosts or the DHCP leases file are answered |
| 209 | with "no such domain" rather than being forwarded upstream. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 210 | .TP |
Simon Kelley | 1cff166 | 2004-03-12 08:12:58 +0000 | [diff] [blame] | 211 | .B \-V, --alias=<old-ip>,<new-ip>[,<mask>] |
| 212 | Modify IPv4 addresses returned from upstream nameservers; old-ip is |
| 213 | replaced by new-ip. If the optional mask is given then any address |
| 214 | which matches the masked old-ip will be re-written. So, for instance |
| 215 | .B --alias=1.2.3.0,6.7.8.0,255.255.255.0 |
| 216 | will map 1.2.3.56 to 6.7.8.56 and 1.2.3.67 to 6.7.8.67. This is what |
| 217 | Cisco PIX routers call "DNS doctoring". |
| 218 | .TP |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 219 | .B \-B, --bogus-nxdomain=<ipaddr> |
| 220 | Transform replies which contain the IP address given into "No such |
| 221 | domain" replies. This is intended to counteract a devious move made by |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame] | 222 | Verisign in September 2003 when they started returning the address of |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 223 | an advertising web page in response to queries for unregistered names, |
| 224 | instead of the correct NXDOMAIN response. This option tells dnsmasq to |
| 225 | fake the correct response when it sees this behaviour. As at Sept 2003 |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame] | 226 | the IP address being returned by Verisign is 64.94.110.11 |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 227 | .TP |
| 228 | .B \-f, --filterwin2k |
| 229 | Later versions of windows make periodic DNS requests which don't get sensible answers from |
| 230 | the public DNS and can cause problems by triggering dial-on-demand links. This flag turns on an option |
| 231 | to filter such requests. The requests blocked are for records of types SOA and SRV, and type ANY where the |
| 232 | requested name has underscores, to catch LDAP requests. |
| 233 | .TP |
| 234 | .B \-r, --resolv-file=<file> |
| 235 | Read the IP addresses of the upstream nameservers from <file>, instead of |
| 236 | /etc/resolv.conf. For the format of this file see |
| 237 | .BR resolv.conf (5) |
| 238 | the only lines relevant to dnsmasq are nameserver ones. Dnsmasq can |
| 239 | be told to poll more than one resolv.conf file, the first file name specified |
| 240 | overrides the default, subsequent ones add to the list. This is only |
| 241 | allowed when polling; the file with the currently latest modification |
| 242 | time is the one used. |
| 243 | .TP |
| 244 | .B \-R, --no-resolv |
| 245 | Don't read /etc/resolv.conf. Get upstream servers only from the command |
Simon Kelley | b49644f | 2004-01-30 21:36:24 +0000 | [diff] [blame] | 246 | line or the dnsmasq configuration file. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 247 | .TP |
Simon Kelley | 3d8df26 | 2005-08-29 12:19:27 +0100 | [diff] [blame] | 248 | .B \-1, --enable-dbus |
| 249 | Allow dnsmasq configuration to be updated via DBus method calls. The |
| 250 | configuration which can be changed is upstream DNS servers (and |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame] | 251 | corresponding domains) and cache clear. Requires that dnsmasq has |
Simon Kelley | 3d8df26 | 2005-08-29 12:19:27 +0100 | [diff] [blame] | 252 | been built with DBus support. |
| 253 | .TP |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 254 | .B \-o, --strict-order |
| 255 | By default, dnsmasq will send queries to any of the upstream servers |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 256 | it knows about and tries to favour servers that are known to |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 257 | be up. Setting this flag forces dnsmasq to try each query with each |
| 258 | server strictly in the order they appear in /etc/resolv.conf |
| 259 | .TP |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 260 | .B --all-servers |
| 261 | By default, when dnsmasq has more than one upstream server available, |
| 262 | it will send queries to just one server. Setting this flag forces |
| 263 | dnsmasq to send all queries to all available servers. The reply from |
| 264 | the server which answers first will be returned to the original requestor. |
| 265 | .TP |
| 266 | .B --stop-dns-rebind |
| 267 | Reject (and log) addresses from upstream nameservers which are in the |
| 268 | private IP ranges. This blocks an attack where a browser behind a |
| 269 | firewall is used to probe machines on the local network. |
| 270 | .TP |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 271 | .B \-n, --no-poll |
| 272 | Don't poll /etc/resolv.conf for changes. |
| 273 | .TP |
Simon Kelley | 1697269 | 2006-10-16 20:04:18 +0100 | [diff] [blame] | 274 | .B --clear-on-reload |
| 275 | Whenever /etc/resolv.conf is re-read, clear the DNS cache. |
| 276 | This is useful when new nameservers may have different |
| 277 | data than that held in cache. |
| 278 | .TP |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 279 | .B \-D, --domain-needed |
| 280 | Tells dnsmasq to never forward queries for plain names, without dots |
Simon Kelley | 3d8df26 | 2005-08-29 12:19:27 +0100 | [diff] [blame] | 281 | or domain parts, to upstream nameservers. If the name is not known |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 282 | from /etc/hosts or DHCP then a "not found" answer is returned. |
| 283 | .TP |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 284 | .B \-S, --local, --server=[/[<domain>]/[domain/]][<ipaddr>[#<port>][@<source-ip>|<interface>[#<port>]] |
Simon Kelley | 5aabfc7 | 2007-08-29 11:24:47 +0100 | [diff] [blame] | 285 | Specify IP address of upstream servers directly. Setting this flag does |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 286 | not suppress reading of /etc/resolv.conf, use -R to do that. If one or |
| 287 | more |
| 288 | optional domains are given, that server is used only for those domains |
| 289 | and they are queried only using the specified server. This is |
| 290 | intended for private nameservers: if you have a nameserver on your |
| 291 | network which deals with names of the form |
| 292 | xxx.internal.thekelleys.org.uk at 192.168.1.1 then giving the flag |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame] | 293 | .B -S /internal.thekelleys.org.uk/192.168.1.1 |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 294 | will send all queries for |
| 295 | internal machines to that nameserver, everything else will go to the |
| 296 | servers in /etc/resolv.conf. An empty domain specification, |
| 297 | .B // |
| 298 | has the special meaning of "unqualified names only" ie names without any |
| 299 | dots in them. A non-standard port may be specified as |
| 300 | part of the IP |
| 301 | address using a # character. |
| 302 | More than one -S flag is allowed, with |
| 303 | repeated domain or ipaddr parts as required. |
| 304 | |
| 305 | Also permitted is a -S |
| 306 | flag which gives a domain but no IP address; this tells dnsmasq that |
| 307 | a domain is local and it may answer queries from /etc/hosts or DHCP |
| 308 | but should never forward queries on that domain to any upstream |
| 309 | servers. |
| 310 | .B local |
| 311 | is a synonym for |
| 312 | .B server |
| 313 | to make configuration files clearer in this case. |
| 314 | |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 315 | The optional string after the @ character tells |
| 316 | dnsmasq how to set the source of the queries to this |
| 317 | nameserver. It should be an ip-address, which should belong to the machine on which |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 318 | dnsmasq is running otherwise this server line will be logged and then |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 319 | ignored, or an interface name. If an interface name is given, then |
| 320 | queries to the server will be forced via that interface; if an |
| 321 | ip-address is given then the source address of the queries will be set |
| 322 | to that address. |
| 323 | The query-port flag is ignored for any servers which have a |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 324 | source address specified but the port may be specified directly as |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 325 | part of the source address. Forcing queries to an interface is not |
| 326 | implemented on all platforms supported by dnsmasq. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 327 | .TP |
| 328 | .B \-A, --address=/<domain>/[domain/]<ipaddr> |
| 329 | Specify an IP address to return for any host in the given domains. |
| 330 | Queries in the domains are never forwarded and always replied to |
| 331 | with the specified IP address which may be IPv4 or IPv6. To give |
| 332 | both IPv4 and IPv6 addresses for a domain, use repeated -A flags. |
| 333 | Note that /etc/hosts and DHCP leases override this for individual |
| 334 | names. A common use of this is to redirect the entire doubleclick.net |
Simon Kelley | a222641 | 2004-05-13 20:27:08 +0100 | [diff] [blame] | 335 | domain to some friendly local web server to avoid banner ads. The |
| 336 | domain specification works in the same was as for --server, with the |
| 337 | additional facility that /#/ matches any domain. Thus |
| 338 | --address=/#/1.2.3.4 will always return 1.2.3.4 for any query not |
| 339 | answered from /etc/hosts or DHCP and not sent to an upstream |
| 340 | nameserver by a more specific --server directive. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 341 | .TP |
Simon Kelley | f6b7dc4 | 2005-01-23 12:06:08 +0000 | [diff] [blame] | 342 | .B \-m, --mx-host=<mx name>[[,<hostname>],<preference>] |
Simon Kelley | de37951 | 2004-06-22 20:23:33 +0100 | [diff] [blame] | 343 | Return an MX record named <mx name> pointing to the given hostname (if |
| 344 | given), or |
| 345 | the host specified in the --mx-target switch |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 346 | or, if that switch is not given, the host on which dnsmasq |
Simon Kelley | f6b7dc4 | 2005-01-23 12:06:08 +0000 | [diff] [blame] | 347 | is running. The default is useful for directing mail from systems on a LAN |
| 348 | to a central server. The preference value is optional, and defaults to |
| 349 | 1 if not given. More than one MX record may be given for a host. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 350 | .TP |
| 351 | .B \-t, --mx-target=<hostname> |
Simon Kelley | f6b7dc4 | 2005-01-23 12:06:08 +0000 | [diff] [blame] | 352 | Specify the default target for the MX record returned by dnsmasq. See |
| 353 | --mx-host. If --mx-target is given, but not --mx-host, then dnsmasq |
| 354 | returns a MX record containing the MX target for MX queries on the |
| 355 | hostname of the machine on which dnsmasq is running. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 356 | .TP |
| 357 | .B \-e, --selfmx |
| 358 | Return an MX record pointing to itself for each local |
| 359 | machine. Local machines are those in /etc/hosts or with DHCP leases. |
| 360 | .TP |
| 361 | .B \-L, --localmx |
| 362 | Return an MX record pointing to the host given by mx-target (or the |
| 363 | machine on which dnsmasq is running) for each |
| 364 | local machine. Local machines are those in /etc/hosts or with DHCP |
| 365 | leases. |
| 366 | .TP |
Simon Kelley | f6b7dc4 | 2005-01-23 12:06:08 +0000 | [diff] [blame] | 367 | .B \-W, --srv-host=<_service>.<_prot>.[<domain>],[<target>[,<port>[,<priority>[,<weight>]]]] |
| 368 | Return a SRV DNS record. See RFC2782 for details. If not supplied, the |
| 369 | domain defaults to that given by |
| 370 | .B --domain. |
| 371 | The default for the target domain is empty, and the default for port |
| 372 | is one and the defaults for |
| 373 | weight and priority are zero. Be careful if transposing data from BIND |
| 374 | zone files: the port, weight and priority numbers are in a different |
| 375 | order. More than one SRV record for a given service/domain is allowed, |
Simon Kelley | 3d8df26 | 2005-08-29 12:19:27 +0100 | [diff] [blame] | 376 | all that match are returned. |
Simon Kelley | f6b7dc4 | 2005-01-23 12:06:08 +0000 | [diff] [blame] | 377 | .TP |
Simon Kelley | 0a85254 | 2005-03-23 20:28:59 +0000 | [diff] [blame] | 378 | .B \-Y, --txt-record=<name>[[,<text>],<text>] |
| 379 | Return a TXT DNS record. The value of TXT record is a set of strings, |
| 380 | so any number may be included, split by commas. |
| 381 | .TP |
Simon Kelley | 832af0b | 2007-01-21 20:01:28 +0000 | [diff] [blame] | 382 | .B --ptr-record=<name>[,<target>] |
| 383 | Return a PTR DNS record. |
| 384 | .TP |
Simon Kelley | 1a6bca8 | 2008-07-11 11:11:42 +0100 | [diff] [blame^] | 385 | .B --naptr-record=<name>,<order>,<preference>,<flags>,<service>,<regexp>[,<replacement>] |
| 386 | Return an NAPTR DNS record, as specified in RFC3403. |
| 387 | .TP |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 388 | .B --interface-name=<name>,<interface> |
| 389 | Return a DNS record associating the name with the primary address on |
| 390 | the given interface. This flag specifies an A record for the given |
| 391 | name in the same way as an /etc/hosts line, except that the address is |
| 392 | not constant, but taken from the given interface. If the interface is |
Simon Kelley | 9e03894 | 2008-05-30 20:06:34 +0100 | [diff] [blame] | 393 | down, not configured or non-existent, an empty record is returned. The |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 394 | matching PTR record is also created, mapping the interface address to |
| 395 | the name. More than one name may be associated with an interface |
| 396 | address by repeating the flag; in that case the first instance is used |
| 397 | for the reverse address-to-name mapping. |
| 398 | .TP |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 399 | .B \-c, --cache-size=<cachesize> |
| 400 | Set the size of dnsmasq's cache. The default is 150 names. Setting the cache size to zero disables caching. |
| 401 | .TP |
| 402 | .B \-N, --no-negcache |
| 403 | Disable negative caching. Negative caching allows dnsmasq to remember |
| 404 | "no such domain" answers from upstream nameservers and answer |
Simon Kelley | 5aabfc7 | 2007-08-29 11:24:47 +0100 | [diff] [blame] | 405 | identical queries without forwarding them again. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 406 | .TP |
Simon Kelley | 1697269 | 2006-10-16 20:04:18 +0100 | [diff] [blame] | 407 | .B \-0, --dns-forward-max=<queries> |
| 408 | Set the maximum number of concurrent DNS queries. The default value is |
| 409 | 150, which should be fine for most setups. The only known situation |
| 410 | where this needs to be increased is when using web-server log file |
| 411 | resolvers, which can generate large numbers of concurrent queries. |
Simon Kelley | 208b65c | 2006-08-05 21:41:37 +0100 | [diff] [blame] | 412 | .TP |
Simon Kelley | 0a85254 | 2005-03-23 20:28:59 +0000 | [diff] [blame] | 413 | .B \-F, --dhcp-range=[[net:]network-id,]<start-addr>,<end-addr>[[,<netmask>],<broadcast>][,<default lease time>] |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 414 | Enable the DHCP server. Addresses will be given out from the range |
Simon Kelley | 44a2a31 | 2004-03-10 20:04:35 +0000 | [diff] [blame] | 415 | <start-addr> to <end-addr> and from statically defined addresses given |
| 416 | in |
| 417 | .B dhcp-host |
| 418 | options. If the lease time is given, then leases |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame] | 419 | will be given for that length of time. The lease time is in seconds, |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 420 | or minutes (eg 45m) or hours (eg 1h) or the literal "infinite". The |
Simon Kelley | 9e03894 | 2008-05-30 20:06:34 +0100 | [diff] [blame] | 421 | minimum lease time is two minutes. This |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 422 | option may be repeated, with different addresses, to enable DHCP |
Simon Kelley | 44a2a31 | 2004-03-10 20:04:35 +0000 | [diff] [blame] | 423 | service to more than one network. For directly connected networks (ie, |
| 424 | networks on which the machine running dnsmasq has an interface) the |
| 425 | netmask is optional. It is, however, required for networks which |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame] | 426 | receive DHCP service via a relay agent. The broadcast address is |
Simon Kelley | 44a2a31 | 2004-03-10 20:04:35 +0000 | [diff] [blame] | 427 | always optional. On some broken systems, dnsmasq can listen on only |
| 428 | one interface when using DHCP, and the name of that interface must be |
| 429 | given using the |
| 430 | .B interface |
Simon Kelley | 4011c4e | 2006-10-28 16:26:19 +0100 | [diff] [blame] | 431 | option. This limitation currently affects OpenBSD before version 4.0. It is always |
Simon Kelley | f6b7dc4 | 2005-01-23 12:06:08 +0000 | [diff] [blame] | 432 | allowed to have more than one dhcp-range in a single subnet. The optional |
Simon Kelley | 44a2a31 | 2004-03-10 20:04:35 +0000 | [diff] [blame] | 433 | network-id is a alphanumeric label which marks this network so that |
Simon Kelley | 0a85254 | 2005-03-23 20:28:59 +0000 | [diff] [blame] | 434 | dhcp options may be specified on a per-network basis. |
| 435 | When it is prefixed with 'net:' then its meaning changes from setting |
Simon Kelley | cdeda28 | 2006-03-16 20:16:06 +0000 | [diff] [blame] | 436 | a tag to matching it. Only one tag may be set, but more than one tag may be matched. |
Simon Kelley | 0a85254 | 2005-03-23 20:28:59 +0000 | [diff] [blame] | 437 | The end address may be replaced by the keyword |
Simon Kelley | 33820b7 | 2004-04-03 21:10:00 +0100 | [diff] [blame] | 438 | .B static |
| 439 | which tells dnsmasq to enable DHCP for the network specified, but not |
| 440 | to dynamically allocate IP addresses. Only hosts which have static |
| 441 | addresses given via |
| 442 | .B dhcp-host |
| 443 | or from /etc/ethers will be served. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 444 | .TP |
Simon Kelley | 832af0b | 2007-01-21 20:01:28 +0000 | [diff] [blame] | 445 | .B \-G, --dhcp-host=[<hwaddr>][,id:<client_id>|*][,net:<netid>][,<ipaddr>][,<hostname>][,<lease_time>][,ignore] |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 446 | Specify per host parameters for the DHCP server. This allows a machine |
| 447 | with a particular hardware address to be always allocated the same |
| 448 | hostname, IP address and lease time. A hostname specified like this |
| 449 | overrides any supplied by the DHCP client on the machine. It is also |
| 450 | allowable to ommit the hardware address and include the hostname, in |
| 451 | which case the IP address and lease times will apply to any machine |
| 452 | claiming that name. For example |
| 453 | .B --dhcp-host=00:20:e0:3b:13:af,wap,infinite |
| 454 | tells dnsmasq to give |
Simon Kelley | cdeda28 | 2006-03-16 20:16:06 +0000 | [diff] [blame] | 455 | the machine with hardware address 00:20:e0:3b:13:af the name wap, and |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 456 | an infinite DHCP lease. |
| 457 | .B --dhcp-host=lap,192.168.0.199 |
| 458 | tells |
| 459 | dnsmasq to always allocate the machine lap the IP address |
Simon Kelley | 1ab84e2 | 2004-01-29 16:48:35 +0000 | [diff] [blame] | 460 | 192.168.0.199. Addresses allocated like this are not constrained to be |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 461 | in the range given by the --dhcp-range option, but they must be on the |
| 462 | network being served by the DHCP server. It is allowed to use client identifiers rather than |
| 463 | hardware addresses to identify hosts by prefixing with 'id:'. Thus: |
| 464 | .B --dhcp-host=id:01:02:03:04,..... |
| 465 | refers to the host with client identifier 01:02:03:04. It is also |
| 466 | allowed to specify the client ID as text, like this: |
Simon Kelley | a84fa1d | 2004-04-23 22:21:21 +0100 | [diff] [blame] | 467 | .B --dhcp-host=id:clientidastext,..... |
| 468 | The special option id:* means "ignore any client-id |
| 469 | and use MAC addresses only." This is useful when a client presents a client-id sometimes |
| 470 | but not others. |
Simon Kelley | 1ab84e2 | 2004-01-29 16:48:35 +0000 | [diff] [blame] | 471 | If a name appears in /etc/hosts, the associated address can be |
| 472 | allocated to a DHCP lease, but only if a |
| 473 | .B --dhcp-host |
Simon Kelley | 33820b7 | 2004-04-03 21:10:00 +0100 | [diff] [blame] | 474 | option specifying the name also exists. The special keyword "ignore" |
| 475 | tells dnsmasq to never offer a DHCP lease to a machine. The machine |
| 476 | can be specified by hardware address, client ID or hostname, for |
| 477 | instance |
| 478 | .B --dhcp-host=00:20:e0:3b:13:af,ignore |
| 479 | This is |
| 480 | useful when there is another DHCP server on the network which should |
Simon Kelley | 3d8df26 | 2005-08-29 12:19:27 +0100 | [diff] [blame] | 481 | be used by some machines. The net:<network-id> sets the network-id tag |
Simon Kelley | 5aabfc7 | 2007-08-29 11:24:47 +0100 | [diff] [blame] | 482 | whenever this dhcp-host directive is in use.This can be used to |
| 483 | selectively send DHCP options just for this host. When a host matches any |
| 484 | dhcp-host directive (or one implied by /etc/ethers) then the special |
| 485 | network-id tag "known" is set. This allows dnsmasq to be configured to |
| 486 | ignore requests from unknown machines using |
| 487 | .B --dhcp-ignore=#known |
Simon Kelley | 0a85254 | 2005-03-23 20:28:59 +0000 | [diff] [blame] | 488 | Ethernet addresses (but not client-ids) may have |
| 489 | wildcard bytes, so for example |
| 490 | .B --dhcp-host=00:20:e0:3b:13:*,ignore |
Simon Kelley | cdeda28 | 2006-03-16 20:16:06 +0000 | [diff] [blame] | 491 | will cause dnsmasq to ignore a range of hardware addresses. Note that |
Simon Kelley | 0a85254 | 2005-03-23 20:28:59 +0000 | [diff] [blame] | 492 | the "*" will need to be escaped or quoted on a command line, but not |
Simon Kelley | cdeda28 | 2006-03-16 20:16:06 +0000 | [diff] [blame] | 493 | in the configuration file. Hardware addresses normally match any |
| 494 | network (ARP) type, but it is possible to restrict them to a single |
| 495 | ARP type by preceding them with the ARP-type (in HEX) and "-". so |
| 496 | .B --dhcp-host=06-00:20:e0:3b:13:af,1.2.3.4 |
| 497 | will only match a |
| 498 | Token-Ring hardware address, since the ARP-address type for token ring |
| 499 | is 6. |
Simon Kelley | 5aabfc7 | 2007-08-29 11:24:47 +0100 | [diff] [blame] | 500 | .TP |
| 501 | .B --dhcp-hostsfile=<file> |
| 502 | Read DHCP host information from the specified file. The file contains |
| 503 | information about one host per line. The format of a line is the same |
| 504 | as text to the right of '=' in --dhcp-host. The advantage of storing DHCP host information |
| 505 | in this file is that it can be changed without re-starting dnsmasq: |
| 506 | the file will be re-read when dnsmasq receives SIGHUP. |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 507 | .TP |
| 508 | .B --dhcp-optsfile=<file> |
| 509 | Read DHCP option information from the specified file. The advantage of |
| 510 | using this option is the same as for --dhcp-hostsfile: the |
| 511 | dhcp-optsfile will be re-read when dnsmasq receives SIGHUP. |
Simon Kelley | 44a2a31 | 2004-03-10 20:04:35 +0000 | [diff] [blame] | 512 | .TP |
| 513 | .B \-Z, --read-ethers |
| 514 | Read /etc/ethers for information about hosts for the DHCP server. The |
| 515 | format of /etc/ethers is a hardware address, followed by either a |
| 516 | hostname or dotted-quad IP address. When read by dnsmasq these lines |
| 517 | have exactly the same effect as |
| 518 | .B --dhcp-host |
Simon Kelley | 5aabfc7 | 2007-08-29 11:24:47 +0100 | [diff] [blame] | 519 | options containing the same information. /etc/ethers is re-read when |
| 520 | dnsmasq receives SIGHUP. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 521 | .TP |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 522 | .B \-O, --dhcp-option=[<network-id>,[<network-id>,]][vendor:[<vendor-class>],][<opt>|option:<opt-name>],[<value>[,<value>]] |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame] | 523 | Specify different or extra options to DHCP clients. By default, |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 524 | dnsmasq sends some standard options to DHCP clients, the netmask and |
| 525 | broadcast address are set to the same as the host running dnsmasq, and |
| 526 | the DNS server and default route are set to the address of the machine |
| 527 | running dnsmasq. If the domain name option has been set, that is sent. |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 528 | This configuration allows these defaults to be overridden, |
| 529 | or other options specified. The option, to be sent may be given as a |
| 530 | decimal number or as "option:<option-name>" The option numbers are |
| 531 | specified in RFC2132 and subsequent RFCs. The set of option-names |
| 532 | known by dnsmasq can be discovered by running "dnsmasq --help dhcp". |
| 533 | For example, to set the default route option to |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 534 | 192.168.4.4, do |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 535 | .B --dhcp-option=3,192.168.4.4 |
| 536 | or |
| 537 | .B --dhcp-option = option:router, 192.168.4.4 |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 538 | and to set the time-server address to 192.168.0.4, do |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 539 | .B --dhcp-option = 42,192.168.0.4 |
| 540 | or |
| 541 | .B --dhcp-option = option:ntp-server, 192.168.0.4 |
Simon Kelley | 1ab84e2 | 2004-01-29 16:48:35 +0000 | [diff] [blame] | 542 | The special address 0.0.0.0 is taken to mean "the address of the |
Simon Kelley | f6b7dc4 | 2005-01-23 12:06:08 +0000 | [diff] [blame] | 543 | machine running dnsmasq". Data types allowed are comma separated |
| 544 | dotted-quad IP addresses, a decimal number, colon-separated hex digits |
Simon Kelley | 26128d2 | 2004-11-14 16:43:54 +0000 | [diff] [blame] | 545 | and a text string. If the optional network-ids are given then |
| 546 | this option is only sent when all the network-ids are matched. |
Simon Kelley | 91dccd0 | 2005-03-31 17:48:32 +0100 | [diff] [blame] | 547 | |
Simon Kelley | cdeda28 | 2006-03-16 20:16:06 +0000 | [diff] [blame] | 548 | Special processing is done on a text argument for option 119, to |
Simon Kelley | 832af0b | 2007-01-21 20:01:28 +0000 | [diff] [blame] | 549 | conform with RFC 3397. Text or dotted-quad IP addresses as arguments |
| 550 | to option 120 are handled as per RFC 3361. Dotted-quad IP addresses |
| 551 | which are followed by a slash and then a netmask size are encoded as |
| 552 | described in RFC 3442. |
Simon Kelley | cdeda28 | 2006-03-16 20:16:06 +0000 | [diff] [blame] | 553 | |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 554 | Be careful: no checking is done that the correct type of data for the |
Simon Kelley | 26128d2 | 2004-11-14 16:43:54 +0000 | [diff] [blame] | 555 | option number is sent, it is quite possible to |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 556 | persuade dnsmasq to generate illegal DHCP packets with injudicious use |
Simon Kelley | 91dccd0 | 2005-03-31 17:48:32 +0100 | [diff] [blame] | 557 | of this flag. When the value is a decimal number, dnsmasq must determine how |
| 558 | large the data item is. It does this by examining the option number and/or the |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame] | 559 | value, but can be overridden by appending a single letter flag as follows: |
Simon Kelley | 91dccd0 | 2005-03-31 17:48:32 +0100 | [diff] [blame] | 560 | b = one byte, s = two bytes, i = four bytes. This is mainly useful with |
Simon Kelley | 3d8df26 | 2005-08-29 12:19:27 +0100 | [diff] [blame] | 561 | encapsulated vendor class options (see below) where dnsmasq cannot |
| 562 | determine data size from the option number. Option data which |
| 563 | consists solely of periods and digits will be interpreted by dnsmasq |
| 564 | as an IP address, and inserted into an option as such. To force a |
| 565 | literal string, use quotes. For instance when using option 66 to send |
| 566 | a literal IP address as TFTP server name, it is necessary to do |
| 567 | .B --dhcp-option=66,"1.2.3.4" |
Simon Kelley | 91dccd0 | 2005-03-31 17:48:32 +0100 | [diff] [blame] | 568 | |
| 569 | Encapsulated Vendor-class options may also be specified using |
| 570 | --dhcp-option: for instance |
Simon Kelley | 1b7ecd1 | 2007-02-05 14:57:57 +0000 | [diff] [blame] | 571 | .B --dhcp-option=vendor:PXEClient,1,0.0.0.0 |
| 572 | sends the encapsulated vendor |
| 573 | class-specific option "mftp-address=0.0.0.0" to any client whose |
| 574 | vendor-class matches "PXEClient". The vendor-class matching is |
Simon Kelley | 6b01084 | 2007-02-12 20:32:07 +0000 | [diff] [blame] | 575 | substring based (see --dhcp-vendorclass for details). If a |
| 576 | vendor-class option (number 60) is sent by dnsmasq, then that is used |
| 577 | for selecting encapsulated options in preference to any sent by the |
| 578 | client. It is |
Simon Kelley | 1b7ecd1 | 2007-02-05 14:57:57 +0000 | [diff] [blame] | 579 | possible to omit the vendorclass completely; |
| 580 | .B --dhcp-option=vendor:,1,0.0.0.0 |
| 581 | in which case the encapsulated option is always sent. |
| 582 | The address 0.0.0.0 is not treated specially in |
Simon Kelley | 91dccd0 | 2005-03-31 17:48:32 +0100 | [diff] [blame] | 583 | encapsulated vendor class options. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 584 | .TP |
Simon Kelley | 6b01084 | 2007-02-12 20:32:07 +0000 | [diff] [blame] | 585 | .B --dhcp-option-force=[<network-id>,[<network-id>,]][vendor:[<vendor-class>],]<opt>,[<value>[,<value>]] |
| 586 | This works in exactly the same way as |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 587 | .B --dhcp-option |
| 588 | except that the option will always be sent, even if the client does |
Simon Kelley | 6b01084 | 2007-02-12 20:32:07 +0000 | [diff] [blame] | 589 | not ask for it in the parameter request list. This is sometimes |
| 590 | needed, for example when sending options to PXELinux. |
| 591 | .TP |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 592 | .B --dhcp-no-override |
| 593 | Disable re-use of the DHCP servername and filename fields as extra |
| 594 | option space. If it can, dnsmasq moves the boot server and filename |
| 595 | information (from dhcp-boot) out of their dedicated fields into |
| 596 | DHCP options. This make extra space available in the DHCP packet for |
| 597 | options but can, rarely, confuse old or broken clients. This flag |
| 598 | forces "simple and safe" behaviour to avoid problems in such a case. |
| 599 | .TP |
Simon Kelley | a84fa1d | 2004-04-23 22:21:21 +0100 | [diff] [blame] | 600 | .B \-U, --dhcp-vendorclass=<network-id>,<vendor-class> |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 601 | Map from a vendor-class string to a network id tag. Most DHCP clients provide a |
Simon Kelley | a222641 | 2004-05-13 20:27:08 +0100 | [diff] [blame] | 602 | "vendor class" which represents, in some sense, the type of host. This option |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 603 | maps vendor classes to tags, so that DHCP options may be selectively delivered |
Simon Kelley | a84fa1d | 2004-04-23 22:21:21 +0100 | [diff] [blame] | 604 | to different classes of hosts. For example |
| 605 | .B dhcp-vendorclass=printers,Hewlett-Packard JetDirect |
| 606 | will allow options to be set only for HP printers like so: |
Simon Kelley | a222641 | 2004-05-13 20:27:08 +0100 | [diff] [blame] | 607 | .B --dhcp-option=printers,3,192.168.4.4 |
| 608 | The vendor-class string is |
| 609 | substring matched against the vendor-class supplied by the client, to |
| 610 | allow fuzzy matching. |
| 611 | .TP |
| 612 | .B \-j, --dhcp-userclass=<network-id>,<user-class> |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 613 | Map from a user-class string to a network id tag (with substring |
Simon Kelley | a222641 | 2004-05-13 20:27:08 +0100 | [diff] [blame] | 614 | matching, like vendor classes). Most DHCP clients provide a |
| 615 | "user class" which is configurable. This option |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 616 | maps user classes to tags, so that DHCP options may be selectively delivered |
Simon Kelley | a222641 | 2004-05-13 20:27:08 +0100 | [diff] [blame] | 617 | to different classes of hosts. It is possible, for instance to use |
| 618 | this to set a different printer server for hosts in the class |
| 619 | "accounts" than for hosts in the class "engineering". |
Simon Kelley | a84fa1d | 2004-04-23 22:21:21 +0100 | [diff] [blame] | 620 | .TP |
Simon Kelley | cdeda28 | 2006-03-16 20:16:06 +0000 | [diff] [blame] | 621 | .B \-4, --dhcp-mac=<network-id>,<MAC address> |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 622 | Map from a MAC address to a network-id tag. The MAC address may include |
Simon Kelley | cdeda28 | 2006-03-16 20:16:06 +0000 | [diff] [blame] | 623 | wildcards. For example |
| 624 | .B --dhcp-mac=3com,01:34:23:*:*:* |
| 625 | will set the tag "3com" for any host whose MAC address matches the pattern. |
| 626 | .TP |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 627 | .B --dhcp-circuitid=<network-id>,<circuit-id>, --dhcp-remoteid=<network-id>,<remote-id> |
| 628 | Map from RFC3046 relay agent options to network-id tags. This data may |
| 629 | be provided by DHCP relay agents. The circuit-id or remote-id is |
| 630 | normally given as colon-separated hex, but is also allowed to be a |
| 631 | simple string. If an exact match is achieved between the circuit or |
| 632 | agent ID and one provided by a relay agent, the network-id tag is set. |
| 633 | .TP |
| 634 | .B --dhcp-subscrid=<network-id>,<subscriber-id> |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 635 | Map from RFC3993 subscriber-id relay agent options to network-id tags. |
| 636 | .TP |
| 637 | .B --dhcp-match=<network-id>,<option number> |
| 638 | Set the network-id tag if the client sends a DHCP option of the given |
| 639 | number. This can be used to identify particular clients which send |
| 640 | information using private option numbers. |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 641 | .TP |
Simon Kelley | cdeda28 | 2006-03-16 20:16:06 +0000 | [diff] [blame] | 642 | .B \-J, --dhcp-ignore=<network-id>[,<network-id>] |
Simon Kelley | 26128d2 | 2004-11-14 16:43:54 +0000 | [diff] [blame] | 643 | When all the given network-ids match the set of network-ids derived |
| 644 | from the net, host, vendor and user classes, ignore the host and do |
| 645 | not allocate it a DHCP lease. |
| 646 | .TP |
Simon Kelley | 5aabfc7 | 2007-08-29 11:24:47 +0100 | [diff] [blame] | 647 | .B --dhcp-ignore-names[=<network-id>[,<network-id>]] |
Simon Kelley | 832af0b | 2007-01-21 20:01:28 +0000 | [diff] [blame] | 648 | When all the given network-ids match the set of network-ids derived |
| 649 | from the net, host, vendor and user classes, ignore any hostname |
Simon Kelley | 9e03894 | 2008-05-30 20:06:34 +0100 | [diff] [blame] | 650 | provided by the host. Note that, unlike dhcp-ignore, it is permissible |
Simon Kelley | 832af0b | 2007-01-21 20:01:28 +0000 | [diff] [blame] | 651 | to supply no netid tags, in which case DHCP-client supplied hostnames |
| 652 | are always ignored, and DHCP hosts are added to the DNS using only |
| 653 | dhcp-host configuration in dnsmasq and the contents of /etc/hosts and |
| 654 | /etc/ethers. |
| 655 | .TP |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 656 | .B --dhcp-broadcast=<network-id>[,<network-id>] |
| 657 | When all the given network-ids match the set of network-ids derived |
| 658 | from the net, host, vendor and user classes, always use broadcast to |
| 659 | communicate with the host when it is unconfigured. Most DHCP clients which |
| 660 | need broadcast replies set a flag in their requests so that this |
| 661 | happens automatically, some old BOOTP clients do not. |
| 662 | .TP |
Simon Kelley | 26128d2 | 2004-11-14 16:43:54 +0000 | [diff] [blame] | 663 | .B \-M, --dhcp-boot=[net:<network-id>,]<filename>,[<servername>[,<server address>]] |
Simon Kelley | 832af0b | 2007-01-21 20:01:28 +0000 | [diff] [blame] | 664 | Set BOOTP options to be returned by the DHCP server. Server name and |
| 665 | address are optional: if not provided, the name is left empty, and the |
| 666 | address set to the address of the machine running dnsmasq. If dnsmasq |
| 667 | is providing a TFTP service (see |
| 668 | .B --enable-tftp |
| 669 | ) then only the filename is required here to enable network booting. |
| 670 | If the optional network-id(s) are given, |
Simon Kelley | 26128d2 | 2004-11-14 16:43:54 +0000 | [diff] [blame] | 671 | they must match for this configuration to be sent. Note that |
| 672 | network-ids are prefixed by "net:" to distinguish them. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 673 | .TP |
Simon Kelley | 44a2a31 | 2004-03-10 20:04:35 +0000 | [diff] [blame] | 674 | .B \-X, --dhcp-lease-max=<number> |
| 675 | Limits dnsmasq to the specified maximum number of DHCP leases. The |
| 676 | default is 150. This limit is to prevent DoS attacks from hosts which |
| 677 | create thousands of leases and use lots of memory in the dnsmasq |
| 678 | process. |
| 679 | .TP |
Simon Kelley | fd9fa48 | 2004-10-21 20:24:00 +0100 | [diff] [blame] | 680 | .B \-K, --dhcp-authoritative |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 681 | Should be set when dnsmasq is definitely the only DHCP server on a network. |
Simon Kelley | fd9fa48 | 2004-10-21 20:24:00 +0100 | [diff] [blame] | 682 | It changes the behaviour from strict RFC compliance so that DHCP requests on |
| 683 | unknown leases from unknown hosts are not ignored. This allows new hosts |
Simon Kelley | cdeda28 | 2006-03-16 20:16:06 +0000 | [diff] [blame] | 684 | to get a lease without a tedious timeout under all circumstances. It also |
| 685 | allows dnsmasq to rebuild its lease database without each client needing to |
Simon Kelley | 9e03894 | 2008-05-30 20:06:34 +0100 | [diff] [blame] | 686 | reacquire a lease, if the database is lost. |
| 687 | .TP |
| 688 | .B --dhcp-alternate-port[=<server port>[,<client port>]] |
| 689 | Change the ports used for DHCP from the default. If this option is |
| 690 | given alone, without arguments, it changes the ports used for DHCP |
| 691 | from 67 and 68 to 1067 and 1068. If a single argument is given, that |
| 692 | port number is used for the server and the port number plus one used |
| 693 | for the client. Finally, two port numbers allows arbitrary |
| 694 | specification of both server and client ports for DHCP. |
Simon Kelley | fd9fa48 | 2004-10-21 20:24:00 +0100 | [diff] [blame] | 695 | .TP |
Simon Kelley | 3d8df26 | 2005-08-29 12:19:27 +0100 | [diff] [blame] | 696 | .B \-3, --bootp-dynamic |
| 697 | Enable dynamic allocation of IP addresses to BOOTP clients. Use this |
| 698 | with care, since each address allocated to a BOOTP client is leased |
| 699 | forever, and therefore becomes permanently unavailable for re-use by |
| 700 | other hosts. |
| 701 | .TP |
Simon Kelley | 5e9e0ef | 2006-04-17 14:24:29 +0100 | [diff] [blame] | 702 | .B \-5, --no-ping |
| 703 | By default, the DHCP server will attempt to ensure that an address in |
| 704 | not in use before allocating it to a host. It does this by sending an |
| 705 | ICMP echo request (aka "ping") to the address in question. If it gets |
| 706 | a reply, then the address must already be in use, and another is |
| 707 | tried. This flag disables this check. Use with caution. |
| 708 | .TP |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 709 | .B --log-dhcp |
| 710 | Extra logging for DHCP: log all the options sent to DHCP clients and |
| 711 | the netid tags used to determine them. |
| 712 | .TP |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 713 | .B \-l, --dhcp-leasefile=<path> |
Simon Kelley | 33820b7 | 2004-04-03 21:10:00 +0100 | [diff] [blame] | 714 | Use the specified file to store DHCP lease information. If this option |
| 715 | is given but no dhcp-range option is given then dnsmasq version 1 |
| 716 | behaviour is activated. The file given is assumed to be an ISC dhcpd |
| 717 | lease file and parsed for leases which are then added to the DNS |
| 718 | system if they have a hostname. This functionality may have been |
Simon Kelley | 7cebd20 | 2006-05-06 14:13:33 +0100 | [diff] [blame] | 719 | excluded from dnsmasq at compile time, in which case an error will |
| 720 | occur. In any case note that ISC leasefile integration is a deprecated |
| 721 | feature. It should not be used in new installations, and will be |
| 722 | removed in a future release. |
Simon Kelley | 208b65c | 2006-08-05 21:41:37 +0100 | [diff] [blame] | 723 | .TP |
Simon Kelley | 7cebd20 | 2006-05-06 14:13:33 +0100 | [diff] [blame] | 724 | .B \-6 --dhcp-script=<path> |
| 725 | Whenever a new DHCP lease is created, or an old one destroyed, the |
Simon Kelley | 208b65c | 2006-08-05 21:41:37 +0100 | [diff] [blame] | 726 | binary specified by this option is run. The arguments to the process |
Simon Kelley | 7cebd20 | 2006-05-06 14:13:33 +0100 | [diff] [blame] | 727 | are "add", "old" or "del", the MAC |
| 728 | address of the host (or "<null>"), the IP address, and the hostname, |
| 729 | if known. "add" means a lease has been created, "del" means it has |
| 730 | been destroyed, "old" is a notification of an existing lease when |
Simon Kelley | 208b65c | 2006-08-05 21:41:37 +0100 | [diff] [blame] | 731 | dnsmasq starts or a change to MAC address or hostname of an existing |
| 732 | lease (also, lease length or expiry and client-id, if leasefile-ro is set). |
Simon Kelley | 1697269 | 2006-10-16 20:04:18 +0100 | [diff] [blame] | 733 | The process is run as root (assuming that dnsmasq was originally run as |
| 734 | root) even if dnsmasq is configured to change UID to an unprivileged user. |
Simon Kelley | 208b65c | 2006-08-05 21:41:37 +0100 | [diff] [blame] | 735 | The environment is inherited from the invoker of dnsmasq, and if the |
Simon Kelley | 1697269 | 2006-10-16 20:04:18 +0100 | [diff] [blame] | 736 | host provided a client-id, this is stored in the environment variable |
| 737 | DNSMASQ_CLIENT_ID. If the client provides vendor-class or user-class |
| 738 | information, these are provided in DNSMASQ_VENDOR_CLASS and |
Simon Kelley | 1b7ecd1 | 2007-02-05 14:57:57 +0000 | [diff] [blame] | 739 | DNSMASQ_USER_CLASS0..DNSMASQ_USER_CLASSn variables, but only for |
Simon Kelley | 4011c4e | 2006-10-28 16:26:19 +0100 | [diff] [blame] | 740 | "add" actions or "old" actions when a host resumes an existing lease, |
| 741 | since these data are not held in dnsmasq's lease |
Simon Kelley | 1697269 | 2006-10-16 20:04:18 +0100 | [diff] [blame] | 742 | database. If dnsmasq was compiled with HAVE_BROKEN_RTC, then |
Simon Kelley | 208b65c | 2006-08-05 21:41:37 +0100 | [diff] [blame] | 743 | the length of the lease (in seconds) is stored in |
Simon Kelley | 1697269 | 2006-10-16 20:04:18 +0100 | [diff] [blame] | 744 | DNSMASQ_LEASE_LENGTH, otherwise the time of lease expiry is stored in |
Simon Kelley | 5aabfc7 | 2007-08-29 11:24:47 +0100 | [diff] [blame] | 745 | DNSMASQ_LEASE_EXPIRES. The number of seconds until lease expiry is |
| 746 | always stored in DNSMASQ_TIME_REMAINING. |
| 747 | If a lease used to have a hostname, which is |
Simon Kelley | 1697269 | 2006-10-16 20:04:18 +0100 | [diff] [blame] | 748 | removed, an "old" event is generated with the new state of the lease, |
| 749 | ie no name, and the former name is provided in the environment |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 750 | variable DNSMASQ_OLD_HOSTNAME. DNSMASQ_INTERFACE stores the name of |
Simon Kelley | 9e03894 | 2008-05-30 20:06:34 +0100 | [diff] [blame] | 751 | the interface on which the request arrived; this is not set for "old" |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 752 | actions when dnsmasq restarts. |
Simon Kelley | 9e03894 | 2008-05-30 20:06:34 +0100 | [diff] [blame] | 753 | All file descriptors are |
Simon Kelley | 7cebd20 | 2006-05-06 14:13:33 +0100 | [diff] [blame] | 754 | closed except stdin, stdout and stderr which are open to /dev/null |
| 755 | (except in debug mode). |
| 756 | The script is not invoked concurrently: if subsequent lease |
| 757 | changes occur, the script is not invoked again until any existing |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 758 | invocation exits. At dnsmasq startup, the script will be invoked for |
Simon Kelley | 7cebd20 | 2006-05-06 14:13:33 +0100 | [diff] [blame] | 759 | all existing leases as they are read from the lease file. Expired |
| 760 | leases will be called with "del" and others with "old". <path> |
Simon Kelley | 5aabfc7 | 2007-08-29 11:24:47 +0100 | [diff] [blame] | 761 | must be an absolute pathname, no PATH search occurs. When dnsmasq |
| 762 | receives a HUP signal, the script will be invoked for existing leases |
Simon Kelley | 9e03894 | 2008-05-30 20:06:34 +0100 | [diff] [blame] | 763 | with an "old " event. |
| 764 | .TP |
| 765 | .B --dhcp-scriptuser |
| 766 | Specify the user as which to run the lease-change script. This defaults to root, but can be changed to another user using this flag. |
Simon Kelley | 208b65c | 2006-08-05 21:41:37 +0100 | [diff] [blame] | 767 | .TP |
| 768 | .B \-9, --leasefile-ro |
| 769 | Completely suppress use of the lease database file. The file will not |
| 770 | be created, read, or written. Change the way the lease-change |
| 771 | script (if one is provided) is called, so that the lease database may |
| 772 | be maintained in external storage by the script. In addition to the |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 773 | invocations given in |
Simon Kelley | 208b65c | 2006-08-05 21:41:37 +0100 | [diff] [blame] | 774 | .B --dhcp-script |
| 775 | the lease-change script is called once, at dnsmasq startup, with the |
| 776 | single argument "init". When called like this the script should write |
| 777 | the saved state of the lease database, in dnsmasq leasefile format, to |
| 778 | stdout and exit with zero exit code. Setting this |
| 779 | option also forces the leasechange script to be called on changes |
| 780 | to the client-id and lease length and expiry time. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 781 | .TP |
Simon Kelley | 832af0b | 2007-01-21 20:01:28 +0000 | [diff] [blame] | 782 | .B --bridge-interface=<interface>,<alias>[,<alias>] |
| 783 | Treat DHCP request packets arriving at any of the <alias> interfaces |
| 784 | as if they had arrived at <interface>. This option is only available |
Simon Kelley | 9e03894 | 2008-05-30 20:06:34 +0100 | [diff] [blame] | 785 | on BSD platforms, and is necessary when using "old style" bridging, since |
Simon Kelley | 832af0b | 2007-01-21 20:01:28 +0000 | [diff] [blame] | 786 | packets arrive at tap interfaces which don't have an IP address. |
| 787 | .TP |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 788 | .B \-s, --domain=<domain> |
| 789 | Specifies the domain for the DHCP server. This has two effects; |
| 790 | firstly it causes the DHCP server to return the domain to any hosts |
| 791 | which request it, and secondly it sets the domain which it is legal |
Simon Kelley | 1b7ecd1 | 2007-02-05 14:57:57 +0000 | [diff] [blame] | 792 | for DHCP-configured hosts to claim. The intention is to constrain |
| 793 | hostnames so that an untrusted host on the LAN cannot advertise |
| 794 | its name via dhcp as e.g. "microsoft.com" and capture traffic not |
| 795 | meant for it. If no domain suffix is specified, then any DHCP |
| 796 | hostname with a domain part (ie with a period) will be disallowed |
| 797 | and logged. If suffix is specified, then hostnames with a domain |
| 798 | part are allowed, provided the domain part matches the suffix. In |
| 799 | addition, when a suffix is set then hostnames without a domain |
| 800 | part have the suffix added as an optional domain part. Eg on my network I can set |
Simon Kelley | 3d8df26 | 2005-08-29 12:19:27 +0100 | [diff] [blame] | 801 | .B --domain=thekelleys.org.uk |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 802 | and have a machine whose DHCP hostname is "laptop". The IP address for that machine is available from |
| 803 | .B dnsmasq |
Simon Kelley | de37951 | 2004-06-22 20:23:33 +0100 | [diff] [blame] | 804 | both as "laptop" and "laptop.thekelleys.org.uk". If the domain is |
| 805 | given as "#" then the domain is read from the first "search" directive |
| 806 | in /etc/resolv.conf (or equivalent). |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 807 | .TP |
Simon Kelley | 832af0b | 2007-01-21 20:01:28 +0000 | [diff] [blame] | 808 | .B --enable-tftp |
| 809 | Enable the TFTP server function. This is deliberately limited to that |
Simon Kelley | 9e03894 | 2008-05-30 20:06:34 +0100 | [diff] [blame] | 810 | needed to net-boot a client. Only reading is allowed; the tsize and |
| 811 | blksize extensions are supported (tsize is only supported in octet mode). |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame] | 812 | .TP |
Simon Kelley | 832af0b | 2007-01-21 20:01:28 +0000 | [diff] [blame] | 813 | .B --tftp-root=<directory> |
| 814 | Look for files to transfer using TFTP relative to the given |
| 815 | directory. When this is set, TFTP paths which include ".." are |
| 816 | rejected, to stop clients getting outside the specified root. |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 817 | Absolute paths (starting with /) are allowed, but they must be within |
| 818 | the tftp-root. |
Simon Kelley | 832af0b | 2007-01-21 20:01:28 +0000 | [diff] [blame] | 819 | .TP |
Simon Kelley | 5aabfc7 | 2007-08-29 11:24:47 +0100 | [diff] [blame] | 820 | .B --tftp-unique-root |
| 821 | Add the IP address of the TFTP client as a path component on the end |
| 822 | of the TFTP-root (in standard dotted-quad format). Only valid if a |
| 823 | tftp-root is set and the directory exists. For instance, if tftp-root is "/tftp" and client |
| 824 | 1.2.3.4 requests file "myfile" then the effective path will be |
| 825 | "/tftp/1.2.3.4/myfile" if /tftp/1.2.3.4 exists or /tftp/myfile otherwise. |
| 826 | .TP |
Simon Kelley | 832af0b | 2007-01-21 20:01:28 +0000 | [diff] [blame] | 827 | .B --tftp-secure |
Simon Kelley | 5aabfc7 | 2007-08-29 11:24:47 +0100 | [diff] [blame] | 828 | Enable TFTP secure mode: without this, any file which is readable by |
Simon Kelley | 832af0b | 2007-01-21 20:01:28 +0000 | [diff] [blame] | 829 | the dnsmasq process under normal unix access-control rules is |
| 830 | available via TFTP. When the --tftp-secure flag is given, only files |
| 831 | owned by the user running the dnsmasq process are accessible. If |
| 832 | dnsmasq is being run as root, different rules apply: --tftp-secure |
Simon Kelley | 1b7ecd1 | 2007-02-05 14:57:57 +0000 | [diff] [blame] | 833 | has no effect, but only files which have the world-readable bit set |
Simon Kelley | 832af0b | 2007-01-21 20:01:28 +0000 | [diff] [blame] | 834 | are accessible. It is not recommended to run dnsmasq as root with TFTP |
| 835 | enabled, and certainly not without specifying --tftp-root. Doing so |
| 836 | can expose any world-readable file on the server to any host on the net. |
| 837 | .TP |
| 838 | .B --tftp-max=<connections> |
| 839 | Set the maximum number of concurrent TFTP connections allowed. This |
| 840 | defaults to 50. When serving a large number of TFTP connections, |
| 841 | per-process file descriptor limits may be encountered. Dnsmasq needs |
| 842 | one file descriptor for each concurrent TFTP connection and one |
| 843 | file descriptor per unique file (plus a few others). So serving the |
| 844 | same file simultaneously to n clients will use require about n + 10 file |
| 845 | descriptors, serving different files simultaneously to n clients will |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 846 | require about (2*n) + 10 descriptors. If |
| 847 | .B --tftp-port-range |
| 848 | is given, that can affect the number of concurrent connections. |
Simon Kelley | 6b01084 | 2007-02-12 20:32:07 +0000 | [diff] [blame] | 849 | .TP |
| 850 | .B --tftp-no-blocksize |
| 851 | Stop the TFTP server from negotiating the "blocksize" option with a |
| 852 | client. Some buggy clients request this option but then behave badly |
| 853 | when it is granted. |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 854 | .TP |
| 855 | .B --tftp-port-range=<start>,<end> |
| 856 | A TFTP server listens on a well-known port (69) for connection initiation, |
| 857 | but it also uses a dynamically-allocated port for each |
| 858 | connection. Normally these are allocated by the OS, but this option |
| 859 | specifies a range of ports for use by TFTP transfers. This can be |
| 860 | useful when TFTP has to traverse a firewall. The start of the range |
| 861 | cannot be lower than 1025 unless dnsmasq is running as root. The number |
| 862 | of concurrent TFTP connections is limited by the size of the port range. |
Simon Kelley | 832af0b | 2007-01-21 20:01:28 +0000 | [diff] [blame] | 863 | .TP |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame] | 864 | .B \-C, --conf-file=<file> |
| 865 | Specify a different configuration file. The conf-file option is also allowed in |
Simon Kelley | 849a835 | 2006-06-09 21:02:31 +0100 | [diff] [blame] | 866 | configuration files, to include multiple configuration files. |
| 867 | .TP |
| 868 | .B \-7, --conf-dir=<directory> |
| 869 | Read all the files in the given directory as configuration |
| 870 | files. Files whose names end in ~ or start with . or start and end |
| 871 | with # are skipped. This flag may be given on the command |
| 872 | line or in a configuration file. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 873 | .SH CONFIG FILE |
Simon Kelley | 3be3454 | 2004-09-11 19:12:13 +0100 | [diff] [blame] | 874 | At startup, dnsmasq reads |
| 875 | .I /etc/dnsmasq.conf, |
| 876 | if it exists. (On |
| 877 | FreeBSD, the file is |
| 878 | .I /usr/local/etc/dnsmasq.conf |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame] | 879 | ) (but see the |
| 880 | .B \-C |
Simon Kelley | 849a835 | 2006-06-09 21:02:31 +0100 | [diff] [blame] | 881 | and |
| 882 | .B \-7 |
| 883 | options.) The format of this |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 884 | file consists of one option per line, exactly as the long options detailed |
| 885 | in the OPTIONS section but without the leading "--". Lines starting with # are comments and ignored. For |
Simon Kelley | b49644f | 2004-01-30 21:36:24 +0000 | [diff] [blame] | 886 | options which may only be specified once, the configuration file overrides |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame] | 887 | the command line. Quoting is allowed in a config file: |
Simon Kelley | 3d8df26 | 2005-08-29 12:19:27 +0100 | [diff] [blame] | 888 | between " quotes the special meanings of ,:. and # are removed and the |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 889 | following escapes are allowed: \\\\ \\" \\t \\e \\b \\r and \\n. The later |
| 890 | corresponding to tab, escape, backspace, return and newline. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 891 | .SH NOTES |
| 892 | When it receives a SIGHUP, |
| 893 | .B dnsmasq |
Simon Kelley | 3be3454 | 2004-09-11 19:12:13 +0100 | [diff] [blame] | 894 | clears its cache and then re-loads |
Simon Kelley | 5aabfc7 | 2007-08-29 11:24:47 +0100 | [diff] [blame] | 895 | .I /etc/hosts |
| 896 | and |
| 897 | .I /etc/ethers |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 898 | and any file given by --dhcp-hostsfile, --dhcp-optsfile or --addn-hosts. |
Simon Kelley | 5aabfc7 | 2007-08-29 11:24:47 +0100 | [diff] [blame] | 899 | The dhcp lease change script is called for all |
| 900 | existing DHCP leases. If |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 901 | .B |
| 902 | --no-poll |
Simon Kelley | 3be3454 | 2004-09-11 19:12:13 +0100 | [diff] [blame] | 903 | is set SIGHUP also re-reads |
| 904 | .I /etc/resolv.conf. |
| 905 | SIGHUP |
Simon Kelley | b49644f | 2004-01-30 21:36:24 +0000 | [diff] [blame] | 906 | does NOT re-read the configuration file. |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 907 | .PP |
| 908 | When it receives a SIGUSR1, |
| 909 | .B dnsmasq |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 910 | writes statistics to the system log. It writes the cache size, |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 911 | the number of names which have had to removed from the cache before |
| 912 | they expired in order to make room for new names and the total number |
Simon Kelley | 824af85 | 2008-02-12 20:43:05 +0000 | [diff] [blame] | 913 | of names that have been inserted into the cache. For each upstream |
| 914 | server it gives the number of queries sent, and the number which |
| 915 | resulted in an error. In |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 916 | .B --no-daemon |
Simon Kelley | 5aabfc7 | 2007-08-29 11:24:47 +0100 | [diff] [blame] | 917 | mode or when full logging is enabled (-q), a complete dump of the |
| 918 | contents of the cache is made. |
| 919 | .PP |
| 920 | When it receives SIGUSR2 and it is logging direct to a file (see |
| 921 | .B --log-facility |
| 922 | ) |
| 923 | .B dnsmasq |
| 924 | will close and reopen the log file. Note that during this operation, |
| 925 | dnsmasq will not be running as root. When it first creates the logfile |
| 926 | dnsmasq changes the ownership of the file to the non-root user it will run |
| 927 | as. Logrotate should be configured to create a new log file with |
Simon Kelley | 9e03894 | 2008-05-30 20:06:34 +0100 | [diff] [blame] | 928 | the ownership which matches the existing one before sending SIGUSR2. |
Simon Kelley | 5aabfc7 | 2007-08-29 11:24:47 +0100 | [diff] [blame] | 929 | If TCP DNS queries are in progress, the old logfile will remain open in |
| 930 | child processes which are handling TCP queries and may continue to be |
| 931 | written. There is a limit of 150 seconds, after which all existing TCP |
| 932 | processes will have expired: for this reason, it is not wise to |
| 933 | configure logfile compression for logfiles which have just been |
| 934 | rotated. Using logrotate, the required options are |
| 935 | .B create |
| 936 | and |
| 937 | .B delaycompress. |
| 938 | |
| 939 | |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 940 | .PP |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 941 | Dnsmasq is a DNS query forwarder: it it not capable of recursively |
| 942 | answering arbitrary queries starting from the root servers but |
| 943 | forwards such queries to a fully recursive upstream DNS server which is |
| 944 | typically provided by an ISP. By default, dnsmasq reads |
Simon Kelley | 3be3454 | 2004-09-11 19:12:13 +0100 | [diff] [blame] | 945 | .I /etc/resolv.conf |
| 946 | to discover the IP |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 947 | addresses of the upstream nameservers it should use, since the |
| 948 | information is typically stored there. Unless |
| 949 | .B --no-poll |
| 950 | is used, |
| 951 | .B dnsmasq |
Simon Kelley | 3be3454 | 2004-09-11 19:12:13 +0100 | [diff] [blame] | 952 | checks the modification time of |
| 953 | .I /etc/resolv.conf |
| 954 | (or equivalent if |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 955 | .B \--resolv-file |
| 956 | is used) and re-reads it if it changes. This allows the DNS servers to |
| 957 | be set dynamically by PPP or DHCP since both protocols provide the |
| 958 | information. |
Simon Kelley | 3be3454 | 2004-09-11 19:12:13 +0100 | [diff] [blame] | 959 | Absence of |
| 960 | .I /etc/resolv.conf |
| 961 | is not an error |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 962 | since it may not have been created before a PPP connection exists. Dnsmasq |
Simon Kelley | 3be3454 | 2004-09-11 19:12:13 +0100 | [diff] [blame] | 963 | simply keeps checking in case |
| 964 | .I /etc/resolv.conf |
| 965 | is created at any |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 966 | time. Dnsmasq can be told to parse more than one resolv.conf |
| 967 | file. This is useful on a laptop, where both PPP and DHCP may be used: |
Simon Kelley | 3be3454 | 2004-09-11 19:12:13 +0100 | [diff] [blame] | 968 | dnsmasq can be set to poll both |
| 969 | .I /etc/ppp/resolv.conf |
| 970 | and |
| 971 | .I /etc/dhcpc/resolv.conf |
| 972 | and will use the contents of whichever changed |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 973 | last, giving automatic switching between DNS servers. |
| 974 | .PP |
| 975 | Upstream servers may also be specified on the command line or in |
Simon Kelley | b49644f | 2004-01-30 21:36:24 +0000 | [diff] [blame] | 976 | the configuration file. These server specifications optionally take a |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 977 | domain name which tells dnsmasq to use that server only to find names |
| 978 | in that particular domain. |
| 979 | .PP |
| 980 | In order to configure dnsmasq to act as cache for the host on which it is running, put "nameserver 127.0.0.1" in |
| 981 | .I /etc/resolv.conf |
| 982 | to force local processes to send queries to |
| 983 | dnsmasq. Then either specify the upstream servers directly to dnsmasq |
| 984 | using |
| 985 | .B \--server |
| 986 | options or put their addresses real in another file, say |
| 987 | .I /etc/resolv.dnsmasq |
| 988 | and run dnsmasq with the |
| 989 | .B \-r /etc/resolv.dnsmasq |
| 990 | option. This second technique allows for dynamic update of the server |
| 991 | addresses by PPP or DHCP. |
Simon Kelley | 3be3454 | 2004-09-11 19:12:13 +0100 | [diff] [blame] | 992 | .PP |
Simon Kelley | f6b7dc4 | 2005-01-23 12:06:08 +0000 | [diff] [blame] | 993 | Addresses in /etc/hosts will "shadow" different addresses for the same |
| 994 | names in the upstream DNS, so "mycompany.com 1.2.3.4" in /etc/hosts will ensure that |
| 995 | queries for "mycompany.com" always return 1.2.3.4 even if queries in |
| 996 | the upstream DNS would otherwise return a different address. There is |
| 997 | one exception to this: if the upstream DNS contains a CNAME which |
| 998 | points to a shadowed name, then looking up the CNAME through dnsmasq |
| 999 | will result in the unshadowed address associated with the target of |
| 1000 | the CNAME. To work around this, add the CNAME to /etc/hosts so that |
| 1001 | the CNAME is shadowed too. |
| 1002 | |
| 1003 | .PP |
Simon Kelley | 26128d2 | 2004-11-14 16:43:54 +0000 | [diff] [blame] | 1004 | The network-id system works as follows: For each DHCP request, dnsmasq |
| 1005 | collects a set of valid network-id tags, one from the |
| 1006 | .B dhcp-range |
| 1007 | used to allocate the address, one from any matching |
| 1008 | .B dhcp-host |
| 1009 | and possibly many from matching vendor classes and user |
| 1010 | classes sent by the DHCP client. Any |
| 1011 | .B dhcp-option |
| 1012 | which has network-id tags will be used in preference to an untagged |
| 1013 | .B dhcp-option, |
| 1014 | provided that _all_ the tags match somewhere in the |
| 1015 | set collected as described above. The prefix '#' on a tag means 'not' |
| 1016 | so --dhcp=option=#purple,3,1.2.3.4 sends the option when the |
| 1017 | network-id tag purple is not in the set of valid tags. |
| 1018 | .PP |
Simon Kelley | f6b7dc4 | 2005-01-23 12:06:08 +0000 | [diff] [blame] | 1019 | If the network-id in a |
| 1020 | .B dhcp-range |
| 1021 | is prefixed with 'net:' then its meaning changes from setting a |
| 1022 | tag to matching it. Thus if there is more than dhcp-range on a subnet, |
| 1023 | and one is tagged with a network-id which is set (for instance |
| 1024 | from a vendorclass option) then hosts which set the netid tag will be |
| 1025 | allocated addresses in the tagged range. |
| 1026 | .PP |
Simon Kelley | 3be3454 | 2004-09-11 19:12:13 +0100 | [diff] [blame] | 1027 | The DHCP server in dnsmasq will function as a BOOTP server also, |
| 1028 | provided that the MAC address and IP address for clients are given, |
| 1029 | either using |
| 1030 | .B dhcp-host |
| 1031 | configurations or in |
| 1032 | .I /etc/ethers |
| 1033 | , and a |
| 1034 | .B dhcp-range |
| 1035 | configuration option is present to activate the DHCP server |
Simon Kelley | b8187c8 | 2005-11-26 21:46:27 +0000 | [diff] [blame] | 1036 | on a particular network. (Setting --bootp-dynamic removes the need for |
| 1037 | static address mappings.) The filename |
Simon Kelley | 3be3454 | 2004-09-11 19:12:13 +0100 | [diff] [blame] | 1038 | parameter in a BOOTP request is matched against netids in |
| 1039 | .B dhcp-option |
Simon Kelley | 6b01084 | 2007-02-12 20:32:07 +0000 | [diff] [blame] | 1040 | configurations, as is the tag "bootp", allowing some control over the options returned to |
Simon Kelley | 3be3454 | 2004-09-11 19:12:13 +0100 | [diff] [blame] | 1041 | different classes of hosts. |
| 1042 | |
Simon Kelley | 5aabfc7 | 2007-08-29 11:24:47 +0100 | [diff] [blame] | 1043 | .SH EXIT CODES |
| 1044 | .PP |
| 1045 | 0 - Dnsmasq successfully forked into the background, or terminated |
| 1046 | normally if backgrounding is not enabled. |
| 1047 | .PP |
| 1048 | 1 - A problem with configuration was detected. |
| 1049 | .PP |
| 1050 | 2 - A problem with network access occurred (address in use, attempt |
| 1051 | to use privileged ports without permission). |
| 1052 | .PP |
Simon Kelley | 9e03894 | 2008-05-30 20:06:34 +0100 | [diff] [blame] | 1053 | 3 - A problem occurred with a filesystem operation (missing |
Simon Kelley | 5aabfc7 | 2007-08-29 11:24:47 +0100 | [diff] [blame] | 1054 | file/directory, permissions). |
| 1055 | .PP |
| 1056 | 4 - Memory allocation failure. |
| 1057 | .PP |
| 1058 | 5 - Other miscellaneous problem. |
| 1059 | .PP |
| 1060 | 11 or greater - a non zero return code was received from the |
| 1061 | lease-script process "init" call. The exit code from dnsmasq is the |
| 1062 | script's exit code with 10 added. |
| 1063 | |
Simon Kelley | 1b7ecd1 | 2007-02-05 14:57:57 +0000 | [diff] [blame] | 1064 | .SH LIMITS |
| 1065 | The default values for resource limits in dnsmasq are generally |
| 1066 | conservative, and appropriate for embedded router type devices with |
| 1067 | slow processors and limited memory. On more capable hardware, it is |
| 1068 | possible to increase the limits, and handle many more clients. The |
| 1069 | following applies to dnsmasq-2.37: earlier versions did not scale as well. |
| 1070 | |
| 1071 | .PP |
| 1072 | Dnsmasq is capable of handling DNS and DHCP for at least a thousand |
| 1073 | clients. Clearly to do this the value of |
Simon Kelley | f2621c7 | 2007-04-29 19:47:21 +0100 | [diff] [blame] | 1074 | .B --dhcp-lease-max |
Simon Kelley | 1b7ecd1 | 2007-02-05 14:57:57 +0000 | [diff] [blame] | 1075 | must be increased, |
| 1076 | and lease times should not be very short (less than one hour). The |
| 1077 | value of |
| 1078 | .B --dns-forward-max |
| 1079 | can be increased: start with it equal to |
| 1080 | the number of clients and increase if DNS seems slow. Note that DNS |
| 1081 | performance depends too on the performance of the upstream |
| 1082 | nameservers. The size of the DNS cache may be increased: the hard |
| 1083 | limit is 10000 names and the default (150) is very low. Sending |
| 1084 | SIGUSR1 to dnsmasq makes it log information which is useful for tuning |
| 1085 | the cache size. See the |
| 1086 | .B NOTES |
| 1087 | section for details. |
| 1088 | |
| 1089 | .PP |
| 1090 | The built-in TFTP server is capable of many simultaneous file |
| 1091 | transfers: the absolute limit is related to the number of file-handles |
| 1092 | allowed to a process and the ability of the select() system call to |
| 1093 | cope with large numbers of file handles. If the limit is set too high |
| 1094 | using |
| 1095 | .B --tftp-max |
| 1096 | it will be scaled down and the actual limit logged at |
| 1097 | start-up. Note that more transfers are possible when the same file is |
| 1098 | being sent than when each transfer sends a different file. |
| 1099 | |
| 1100 | .PP |
| 1101 | It is possible to use dnsmasq to block Web advertising by using a list |
| 1102 | of known banner-ad servers, all resolving to 127.0.0.1 or 0.0.0.0, in |
| 1103 | .B /etc/hosts |
| 1104 | or an additional hosts file. The list can be very long, |
| 1105 | dnsmasq has been tested successfully with one million names. That size |
| 1106 | file needs a 1GHz processor and about 60Mb of RAM. |
| 1107 | |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 1108 | .SH FILES |
Simon Kelley | b49644f | 2004-01-30 21:36:24 +0000 | [diff] [blame] | 1109 | .IR /etc/dnsmasq.conf |
| 1110 | |
| 1111 | .IR /usr/local/etc/dnsmasq.conf |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 1112 | |
| 1113 | .IR /etc/resolv.conf |
| 1114 | |
| 1115 | .IR /etc/hosts |
| 1116 | |
Simon Kelley | 3be3454 | 2004-09-11 19:12:13 +0100 | [diff] [blame] | 1117 | .IR /etc/ethers |
| 1118 | |
Simon Kelley | b49644f | 2004-01-30 21:36:24 +0000 | [diff] [blame] | 1119 | .IR /var/lib/misc/dnsmasq.leases |
| 1120 | |
| 1121 | .IR /var/db/dnsmasq.leases |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 1122 | |
| 1123 | .IR /var/run/dnsmasq.pid |
| 1124 | .SH SEE ALSO |
Simon Kelley | 9e4abcb | 2004-01-22 19:47:41 +0000 | [diff] [blame] | 1125 | .BR hosts (5), |
| 1126 | .BR resolver (5) |
| 1127 | .SH AUTHOR |
| 1128 | This manual page was written by Simon Kelley <simon@thekelleys.org.uk>. |
| 1129 | |
| 1130 | |