unbound.conf 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652
  1. #
  2. # Example configuration file.
  3. #
  4. # See unbound.conf(5) man page, version 1.5.4.
  5. #
  6. # this is a comment.
  7. #Use this to include other text into the file.
  8. #include: "otherfile.conf"
  9. # The server clause sets the main parameters.
  10. server:
  11. # whitespace is not necessary, but looks cleaner.
  12. # verbosity number, 0 is least verbose. 1 is default.
  13. verbosity: {{VERBOSITY}}
  14. # print statistics to the log (for every thread) every N seconds.
  15. # Set to "" or 0 to disable. Default is disabled.
  16. statistics-interval: {{STATISTICS_INTERVAL}}
  17. # enable cumulative statistics, without clearing them after printing.
  18. statistics-cumulative: {{STATISTICS_CUMULATIVE}}
  19. # enable extended statistics (query types, answer codes, status)
  20. # printed from unbound-control. default off, because of speed.
  21. extended-statistics: {{EXTENDED_STATISTICS}}
  22. # number of threads to create. 1 disables threading.
  23. num-threads: {{NUM_THREADS}}
  24. # specify the interfaces to answer queries from by ip-address.
  25. # The default is to listen to localhost (127.0.0.1 and ::1).
  26. # specify 0.0.0.0 and ::0 to bind to all available interfaces.
  27. # specify every interface[@port] on a new 'interface:' labelled line.
  28. # The listen interfaces are not changed on reload, only on restart.
  29. # interface: 192.0.2.153
  30. # interface: 192.0.2.154
  31. # interface: 192.0.2.154@5003
  32. # interface: 2001:DB8::5
  33. interface: 0.0.0.0
  34. # enable this feature to copy the source address of queries to reply.
  35. # Socket options are not supported on all platforms. experimental.
  36. # interface-automatic: no
  37. # port to answer queries from
  38. # port: 53
  39. # specify the interfaces to send outgoing queries to authoritative
  40. # server from by ip-address. If none, the default (all) interface
  41. # is used. Specify every interface on a 'outgoing-interface:' line.
  42. # outgoing-interface: 192.0.2.153
  43. # outgoing-interface: 2001:DB8::5
  44. # outgoing-interface: 2001:DB8::6
  45. # number of ports to allocate per thread, determines the size of the
  46. # port range that can be open simultaneously. About double the
  47. # num-queries-per-thread, or, use as many as the OS will allow you.
  48. # outgoing-range: 4096
  49. # permit unbound to use this port number or port range for
  50. # making outgoing queries, using an outgoing interface.
  51. # outgoing-port-permit: 32768
  52. # deny unbound the use this of port number or port range for
  53. # making outgoing queries, using an outgoing interface.
  54. # Use this to make sure unbound does not grab a UDP port that some
  55. # other server on this computer needs. The default is to avoid
  56. # IANA-assigned port numbers.
  57. # If multiple outgoing-port-permit and outgoing-port-avoid options
  58. # are present, they are processed in order.
  59. # outgoing-port-avoid: "3200-3208"
  60. # number of outgoing simultaneous tcp buffers to hold per thread.
  61. # outgoing-num-tcp: 10
  62. # number of incoming simultaneous tcp buffers to hold per thread.
  63. # incoming-num-tcp: 10
  64. # buffer size for UDP port 53 incoming (SO_RCVBUF socket option).
  65. # 0 is system default. Use 4m to catch query spikes for busy servers.
  66. so-rcvbuf: {{SO_RCVBUFF}}
  67. # buffer size for UDP port 53 outgoing (SO_SNDBUF socket option).
  68. # 0 is system default. Use 4m to handle spikes on very busy servers.
  69. so-sndbuf: {{SO_SNDBUF}}
  70. # use SO_REUSEPORT to distribute queries over threads.
  71. so-reuseport: {{SO_REUSEPORT}}
  72. # use IP_TRANSPARENT so the interface: addresses can be non-local
  73. # and you can config non-existing IPs that are going to work later on
  74. # ip-transparent: no
  75. # EDNS reassembly buffer to advertise to UDP peers (the actual buffer
  76. # is set with msg-buffer-size). 1480 can solve fragmentation (timeouts).
  77. edns-buffer-size: {{EDNS_BUFFER_SIZE}}
  78. # Maximum UDP response size (not applied to TCP response).
  79. # Suggested values are 512 to 4096. Default is 4096. 65536 disables it.
  80. # max-udp-size: 4096
  81. # buffer size for handling DNS data. No messages larger than this
  82. # size can be sent or received, by UDP or TCP. In bytes.
  83. # msg-buffer-size: 65552
  84. # the amount of memory to use for the message cache.
  85. # plain value in bytes or you can append k, m or G. default is "4Mb".
  86. msg-cache-size: {{MSG_CACHE_SIZE}}
  87. # the number of slabs to use for the message cache.
  88. # the number of slabs must be a power of 2.
  89. # more slabs reduce lock contention, but fragment memory usage.
  90. # msg-cache-slabs: 4
  91. # the number of queries that a thread gets to service.
  92. # num-queries-per-thread: 1024
  93. # if very busy, 50% queries run to completion, 50% get timeout in msec
  94. # jostle-timeout: 200
  95. # msec to wait before close of port on timeout UDP. 0 disables.
  96. # delay-close: 0
  97. # the amount of memory to use for the RRset cache.
  98. # plain value in bytes or you can append k, m or G. default is "4Mb".
  99. rrset-cache-size: {{RRSET_CACHE_SIZE}}
  100. # the number of slabs to use for the RRset cache.
  101. # the number of slabs must be a power of 2.
  102. # more slabs reduce lock contention, but fragment memory usage.
  103. # rrset-cache-slabs: 4
  104. # the time to live (TTL) value lower bound, in seconds. Default 0.
  105. # If more than an hour could easily give trouble due to stale data.
  106. cache-min-ttl: {{CACHE_MIN_TTL}}
  107. # the time to live (TTL) value cap for RRsets and messages in the
  108. # cache. Items are not cached for longer. In seconds.
  109. cache-max-ttl: {{CACHE_MAX_TTL}}
  110. # the time to live (TTL) value cap for negative responses in the cache
  111. cache-max-negative-ttl: {{CACHE_MAX_NEGATIVE_TTL}}
  112. # the time to live (TTL) value for cached roundtrip times, lameness and
  113. # EDNS version information for hosts. In seconds.
  114. # infra-host-ttl: 900
  115. # minimum wait time for responses, increase if uplink is long. In msec.
  116. # infra-cache-min-rtt: 50
  117. # the number of slabs to use for the Infrastructure cache.
  118. # the number of slabs must be a power of 2.
  119. # more slabs reduce lock contention, but fragment memory usage.
  120. # infra-cache-slabs: 4
  121. # the maximum number of hosts that are cached (roundtrip, EDNS, lame).
  122. # infra-cache-numhosts: 10000
  123. # Enable IPv4, "yes" or "no".
  124. do-ip4: {{DO_IPV4}}
  125. # Enable IPv6, "yes" or "no".
  126. do-ip6: {{DO_IPV6}}
  127. # Enable UDP, "yes" or "no".
  128. do-udp: {{DO_UDP}}
  129. # Enable TCP, "yes" or "no".
  130. do-tcp: {{DO_TCP}}
  131. # upstream connections use TCP only (and no UDP), "yes" or "no"
  132. # useful for tunneling scenarios, default no.
  133. # tcp-upstream: no
  134. # Detach from the terminal, run in background, "yes" or "no".
  135. do-daemonize: no
  136. # control which clients are allowed to make (recursive) queries
  137. # to this server. Specify classless netblocks with /size and action.
  138. # By default everything is refused, except for localhost.
  139. # Choose deny (drop message), refuse (polite error reply),
  140. # allow (recursive ok), allow_snoop (recursive and nonrecursive ok)
  141. # deny_non_local (drop queries unless can be answered from local-data)
  142. # refuse_non_local (like deny_non_local but polite error reply).
  143. # access-control: 0.0.0.0/0 refuse
  144. # access-control: 127.0.0.0/8 allow
  145. # access-control: ::0/0 refuse
  146. # access-control: ::1 allow
  147. # access-control: ::ffff:127.0.0.1 allow
  148. access-control: 0.0.0.0/0 allow
  149. # if given, a chroot(2) is done to the given directory.
  150. # i.e. you can chroot to the working directory, for example,
  151. # for extra security, but make sure all files are in that directory.
  152. #
  153. # If chroot is enabled, you should pass the configfile (from the
  154. # commandline) as a full path from the original root. After the
  155. # chroot has been performed the now defunct portion of the config
  156. # file path is removed to be able to reread the config after a reload.
  157. #
  158. # All other file paths (working dir, logfile, roothints, and
  159. # key files) can be specified in several ways:
  160. # o as an absolute path relative to the new root.
  161. # o as a relative path to the working directory.
  162. # o as an absolute path relative to the original root.
  163. # In the last case the path is adjusted to remove the unused portion.
  164. #
  165. # The pid file can be absolute and outside of the chroot, it is
  166. # written just prior to performing the chroot and dropping permissions.
  167. #
  168. # Additionally, unbound may need to access /dev/random (for entropy).
  169. # How to do this is specific to your OS.
  170. #
  171. # If you give "" no chroot is performed. The path must not end in a /.
  172. # chroot: "/etc/unbound"
  173. # if given, user privileges are dropped (after binding port),
  174. # and the given username is assumed. Default is user "unbound".
  175. # If you give "" no privileges are dropped.
  176. username: "unbound"
  177. # the working directory. The relative files in this config are
  178. # relative to this directory. If you give "" the working directory
  179. # is not changed.
  180. # directory: "/etc/unbound"
  181. # the log file, "" means log to stderr.
  182. # Use of this option sets use-syslog to "no".
  183. logfile: ""
  184. # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to
  185. # log to, with identity "unbound". If yes, it overrides the logfile.
  186. use-syslog: no
  187. # print UTC timestamp in ascii to logfile, default is epoch in seconds.
  188. # log-time-ascii: no
  189. # print one line with time, IP, name, type, class for every query.
  190. # log-queries: no
  191. # the pid file. Can be an absolute path outside of chroot/work dir.
  192. # pidfile: "/etc/unbound/unbound.pid"
  193. # file to read root hints from.
  194. # get one from ftp://FTP.INTERNIC.NET/domain/named.cache
  195. root-hints: "/etc/unbound/root.hints"
  196. # enable to not answer id.server and hostname.bind queries.
  197. hide-identity: {{HIDE_IDENTITY}}
  198. # enable to not answer version.server and version.bind queries.
  199. hide-version: {{HIDE_VERSION}}
  200. # the identity to report. Leave "" or default to return hostname.
  201. # identity: ""
  202. # the version to report. Leave "" or default to return package version.
  203. # version: ""
  204. # the target fetch policy.
  205. # series of integers describing the policy per dependency depth.
  206. # The number of values in the list determines the maximum dependency
  207. # depth the recursor will pursue before giving up. Each integer means:
  208. # -1 : fetch all targets opportunistically,
  209. # 0: fetch on demand,
  210. # positive value: fetch that many targets opportunistically.
  211. # Enclose the list of numbers between quotes ("").
  212. # target-fetch-policy: "3 2 1 0 0"
  213. # Harden against very small EDNS buffer sizes.
  214. # harden-short-bufsize: no
  215. # Harden against unseemly large queries.
  216. # harden-large-queries: no
  217. # Harden against out of zone rrsets, to avoid spoofing attempts.
  218. # harden-glue: yes
  219. # Harden against receiving dnssec-stripped data. If you turn it
  220. # off, failing to validate dnskey data for a trustanchor will
  221. # trigger insecure mode for that zone (like without a trustanchor).
  222. # Default on, which insists on dnssec data for trust-anchored zones.
  223. # harden-dnssec-stripped: yes
  224. # Harden against queries that fall under dnssec-signed nxdomain names.
  225. # harden-below-nxdomain: no
  226. # Harden the referral path by performing additional queries for
  227. # infrastructure data. Validates the replies (if possible).
  228. # Default off, because the lookups burden the server. Experimental
  229. # implementation of draft-wijngaards-dnsext-resolver-side-mitigation.
  230. # harden-referral-path: no
  231. # Harden against algorithm downgrade when multiple algorithms are
  232. # advertised in the DS record. If no, allows the weakest algorithm
  233. # to validate the zone.
  234. # harden-algo-downgrade: yes
  235. # Use 0x20-encoded random bits in the query to foil spoof attempts.
  236. # This feature is an experimental implementation of draft dns-0x20.
  237. # use-caps-for-id: no
  238. # Domains (and domains in them) without support for dns-0x20 and
  239. # the fallback fails because they keep sending different answers.
  240. # caps-whitelist: "licdn.com"
  241. # Enforce privacy of these addresses. Strips them away from answers.
  242. # It may cause DNSSEC validation to additionally mark it as bogus.
  243. # Protects against 'DNS Rebinding' (uses browser as network proxy).
  244. # Only 'private-domain' and 'local-data' names are allowed to have
  245. # these private addresses. No default.
  246. # private-address: 10.0.0.0/8
  247. # private-address: 172.16.0.0/12
  248. # private-address: 192.168.0.0/16
  249. # private-address: 169.254.0.0/16
  250. # private-address: fd00::/8
  251. # private-address: fe80::/10
  252. # Allow the domain (and its subdomains) to contain private addresses.
  253. # local-data statements are allowed to contain private addresses too.
  254. # private-domain: "example.com"
  255. # If nonzero, unwanted replies are not only reported in statistics,
  256. # but also a running total is kept per thread. If it reaches the
  257. # threshold, a warning is printed and a defensive action is taken,
  258. # the cache is cleared to flush potential poison out of it.
  259. # A suggested value is 10000000, the default is 0 (turned off).
  260. # unwanted-reply-threshold: 0
  261. # Do not query the following addresses. No DNS queries are sent there.
  262. # List one address per entry. List classless netblocks with /size,
  263. # do-not-query-address: 127.0.0.1/8
  264. # do-not-query-address: ::1
  265. # if yes, the above default do-not-query-address entries are present.
  266. # if no, localhost can be queried (for testing and debugging).
  267. # do-not-query-localhost: yes
  268. # if yes, perform prefetching of almost expired message cache entries.
  269. # prefetch: no
  270. # if yes, perform key lookups adjacent to normal lookups.
  271. # prefetch-key: no
  272. # if yes, Unbound rotates RRSet order in response.
  273. # rrset-roundrobin: no
  274. # if yes, Unbound doesn't insert authority/additional sections
  275. # into response messages when those sections are not required.
  276. # minimal-responses: no
  277. # module configuration of the server. A string with identifiers
  278. # separated by spaces. Syntax: "[dns64] [validator] iterator"
  279. # module-config: "validator iterator"
  280. # File with trusted keys, kept uptodate using RFC5011 probes,
  281. # initial file like trust-anchor-file, then it stores metadata.
  282. # Use several entries, one per domain name, to track multiple zones.
  283. #
  284. # If you want to perform DNSSEC validation, run unbound-anchor before
  285. # you start unbound (i.e. in the system boot scripts). And enable:
  286. # Please note usage of unbound-anchor root anchor is at your own risk
  287. # and under the terms of our LICENSE (see that file in the source).
  288. # auto-trust-anchor-file: "/etc/unbound/root.key"
  289. # File with DLV trusted keys. Same format as trust-anchor-file.
  290. # There can be only one DLV configured, it is trusted from root down.
  291. # DLV is going to be decommissioned. Please do not use it any more.
  292. # dlv-anchor-file: "dlv.isc.org.key"
  293. # File with trusted keys for validation. Specify more than one file
  294. # with several entries, one file per entry.
  295. # Zone file format, with DS and DNSKEY entries.
  296. # Note this gets out of date, use auto-trust-anchor-file please.
  297. # trust-anchor-file: ""
  298. # Trusted key for validation. DS or DNSKEY. specify the RR on a
  299. # single line, surrounded by "". TTL is ignored. class is IN default.
  300. # Note this gets out of date, use auto-trust-anchor-file please.
  301. # (These examples are from August 2007 and may not be valid anymore).
  302. # trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ=="
  303. # trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A"
  304. # File with trusted keys for validation. Specify more than one file
  305. # with several entries, one file per entry. Like trust-anchor-file
  306. # but has a different file format. Format is BIND-9 style format,
  307. # the trusted-keys { name flag proto algo "key"; }; clauses are read.
  308. # you need external update procedures to track changes in keys.
  309. # trusted-keys-file: ""
  310. # Ignore chain of trust. Domain is treated as insecure.
  311. # domain-insecure: "example.com"
  312. # Override the date for validation with a specific fixed date.
  313. # Do not set this unless you are debugging signature inception
  314. # and expiration. "" or "0" turns the feature off. -1 ignores date.
  315. # val-override-date: ""
  316. # The time to live for bogus data, rrsets and messages. This avoids
  317. # some of the revalidation, until the time interval expires. in secs.
  318. # val-bogus-ttl: 60
  319. # The signature inception and expiration dates are allowed to be off
  320. # by 10% of the signature lifetime (expir-incep) from our local clock.
  321. # This leeway is capped with a minimum and a maximum. In seconds.
  322. # val-sig-skew-min: 3600
  323. # val-sig-skew-max: 86400
  324. # Should additional section of secure message also be kept clean of
  325. # unsecure data. Useful to shield the users of this validator from
  326. # potential bogus data in the additional section. All unsigned data
  327. # in the additional section is removed from secure messages.
  328. # val-clean-additional: yes
  329. # Turn permissive mode on to permit bogus messages. Thus, messages
  330. # for which security checks failed will be returned to clients,
  331. # instead of SERVFAIL. It still performs the security checks, which
  332. # result in interesting log files and possibly the AD bit in
  333. # replies if the message is found secure. The default is off.
  334. # val-permissive-mode: no
  335. # Ignore the CD flag in incoming queries and refuse them bogus data.
  336. # Enable it if the only clients of unbound are legacy servers (w2008)
  337. # that set CD but cannot validate themselves.
  338. # ignore-cd-flag: no
  339. # Have the validator log failed validations for your diagnosis.
  340. # 0: off. 1: A line per failed user query. 2: With reason and bad IP.
  341. # val-log-level: 0
  342. # It is possible to configure NSEC3 maximum iteration counts per
  343. # keysize. Keep this table very short, as linear search is done.
  344. # A message with an NSEC3 with larger count is marked insecure.
  345. # List in ascending order the keysize and count values.
  346. # val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500"
  347. # instruct the auto-trust-anchor-file probing to add anchors after ttl.
  348. # add-holddown: 2592000 # 30 days
  349. # instruct the auto-trust-anchor-file probing to del anchors after ttl.
  350. # del-holddown: 2592000 # 30 days
  351. # auto-trust-anchor-file probing removes missing anchors after ttl.
  352. # If the value 0 is given, missing anchors are not removed.
  353. # keep-missing: 31622400 # 366 days
  354. # the amount of memory to use for the key cache.
  355. # plain value in bytes or you can append k, m or G. default is "4Mb".
  356. # key-cache-size: 4m
  357. # the number of slabs to use for the key cache.
  358. # the number of slabs must be a power of 2.
  359. # more slabs reduce lock contention, but fragment memory usage.
  360. # key-cache-slabs: 4
  361. # the amount of memory to use for the negative cache (used for DLV).
  362. # plain value in bytes or you can append k, m or G. default is "1Mb".
  363. # neg-cache-size: 1m
  364. # By default, for a number of zones a small default 'nothing here'
  365. # reply is built-in. Query traffic is thus blocked. If you
  366. # wish to serve such zone you can unblock them by uncommenting one
  367. # of the nodefault statements below.
  368. # You may also have to use domain-insecure: zone to make DNSSEC work,
  369. # unless you have your own trust anchors for this zone.
  370. # local-zone: "localhost." nodefault
  371. # local-zone: "127.in-addr.arpa." nodefault
  372. # local-zone: "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa." nodefault
  373. # local-zone: "10.in-addr.arpa." nodefault
  374. # local-zone: "16.172.in-addr.arpa." nodefault
  375. # local-zone: "17.172.in-addr.arpa." nodefault
  376. # local-zone: "18.172.in-addr.arpa." nodefault
  377. # local-zone: "19.172.in-addr.arpa." nodefault
  378. # local-zone: "20.172.in-addr.arpa." nodefault
  379. # local-zone: "21.172.in-addr.arpa." nodefault
  380. # local-zone: "22.172.in-addr.arpa." nodefault
  381. # local-zone: "23.172.in-addr.arpa." nodefault
  382. # local-zone: "24.172.in-addr.arpa." nodefault
  383. # local-zone: "25.172.in-addr.arpa." nodefault
  384. # local-zone: "26.172.in-addr.arpa." nodefault
  385. # local-zone: "27.172.in-addr.arpa." nodefault
  386. # local-zone: "28.172.in-addr.arpa." nodefault
  387. # local-zone: "29.172.in-addr.arpa." nodefault
  388. # local-zone: "30.172.in-addr.arpa." nodefault
  389. # local-zone: "31.172.in-addr.arpa." nodefault
  390. # local-zone: "168.192.in-addr.arpa." nodefault
  391. # local-zone: "0.in-addr.arpa." nodefault
  392. # local-zone: "254.169.in-addr.arpa." nodefault
  393. # local-zone: "2.0.192.in-addr.arpa." nodefault
  394. # local-zone: "100.51.198.in-addr.arpa." nodefault
  395. # local-zone: "113.0.203.in-addr.arpa." nodefault
  396. # local-zone: "255.255.255.255.in-addr.arpa." nodefault
  397. # local-zone: "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa." nodefault
  398. # local-zone: "d.f.ip6.arpa." nodefault
  399. # local-zone: "8.e.f.ip6.arpa." nodefault
  400. # local-zone: "9.e.f.ip6.arpa." nodefault
  401. # local-zone: "a.e.f.ip6.arpa." nodefault
  402. # local-zone: "b.e.f.ip6.arpa." nodefault
  403. # local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault
  404. # And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa.
  405. # if unbound is running service for the local host then it is useful
  406. # to perform lan-wide lookups to the upstream, and unblock the
  407. # long list of local-zones above. If this unbound is a dns server
  408. # for a network of computers, disabled is better and stops information
  409. # leakage of local lan information.
  410. # unblock-lan-zones: no
  411. # a number of locally served zones can be configured.
  412. # local-zone: <zone> <type>
  413. # local-data: "<resource record string>"
  414. # o deny serves local data (if any), else, drops queries.
  415. # o refuse serves local data (if any), else, replies with error.
  416. # o static serves local data, else, nxdomain or nodata answer.
  417. # o transparent gives local data, but resolves normally for other names
  418. # o redirect serves the zone data for any subdomain in the zone.
  419. # o nodefault can be used to normally resolve AS112 zones.
  420. # o typetransparent resolves normally for other types and other names
  421. # o inform resolves normally, but logs client IP address
  422. # o inform_deny drops queries and logs client IP address
  423. #
  424. # defaults are localhost address, reverse for 127.0.0.1 and ::1
  425. # and nxdomain for AS112 zones. If you configure one of these zones
  426. # the default content is omitted, or you can omit it with 'nodefault'.
  427. #
  428. # If you configure local-data without specifying local-zone, by
  429. # default a transparent local-zone is created for the data.
  430. #
  431. # You can add locally served data with
  432. # local-zone: "local." static
  433. # local-data: "mycomputer.local. IN A 192.0.2.51"
  434. # local-data: 'mytext.local TXT "content of text record"'
  435. #
  436. # You can override certain queries with
  437. # local-data: "adserver.example.com A 127.0.0.1"
  438. #
  439. # You can redirect a domain to a fixed address with
  440. # (this makes example.com, www.example.com, etc, all go to 192.0.2.3)
  441. # local-zone: "example.com" redirect
  442. # local-data: "example.com A 192.0.2.3"
  443. #
  444. # Shorthand to make PTR records, "IPv4 name" or "IPv6 name".
  445. # You can also add PTR records using local-data directly, but then
  446. # you need to do the reverse notation yourself.
  447. # local-data-ptr: "192.0.2.3 www.example.com"
  448. # service clients over SSL (on the TCP sockets), with plain DNS inside
  449. # the SSL stream. Give the certificate to use and private key.
  450. # default is "" (disabled). requires restart to take effect.
  451. # ssl-service-key: "path/to/privatekeyfile.key"
  452. # ssl-service-pem: "path/to/publiccertfile.pem"
  453. # ssl-port: 443
  454. # request upstream over SSL (with plain DNS inside the SSL stream).
  455. # Default is no. Can be turned on and off with unbound-control.
  456. # ssl-upstream: no
  457. # DNS64 prefix. Must be specified when DNS64 is use.
  458. # Enable dns64 in module-config. Used to synthesize IPv6 from IPv4.
  459. # dns64-prefix: 64:ff9b::0/96
  460. # ratelimit for uncached, new queries, this limits recursion effort.
  461. # ratelimiting is experimental, and may help against randomqueryflood.
  462. # if 0(default) it is disabled, otherwise state qps allowed per zone.
  463. # ratelimit: 0
  464. # ratelimits are tracked in a cache, size in bytes of cache (or k,m).
  465. # ratelimit-size: 4m
  466. # ratelimit cache slabs, reduces lock contention if equal to cpucount.
  467. # ratelimit-slabs: 4
  468. # 0 blocks when ratelimited, otherwise let 1/xth traffic through
  469. # ratelimit-factor: 10
  470. # override the ratelimit for a specific domain name.
  471. # give this setting multiple times to have multiple overrides.
  472. # ratelimit-for-domain: example.com 1000
  473. # override the ratelimits for all domains below a domain name
  474. # can give this multiple times, the name closest to the zone is used.
  475. # ratelimit-below-domain: example 1000
  476. include: /etc/unbound/local-data.conf
  477. # Python config section. To enable:
  478. # o use --with-pythonmodule to configure before compiling.
  479. # o list python in the module-config string (above) to enable.
  480. # o and give a python-script to run.
  481. python:
  482. # Script file to load
  483. # python-script: "/etc/unbound/ubmodule-tst.py"
  484. # Remote control config section.
  485. remote-control:
  486. # Enable remote control with unbound-control(8) here.
  487. # set up the keys and certificates with unbound-control-setup.
  488. control-enable: no
  489. # Set to no and use an absolute path as control-interface to use
  490. # a unix local named pipe for unbound-control.
  491. # control-use-cert: yes
  492. # what interfaces are listened to for remote control.
  493. # give 0.0.0.0 and ::0 to listen to all interfaces.
  494. # control-interface: 127.0.0.1
  495. # control-interface: ::1
  496. # port number for remote control operations.
  497. # control-port: 8953
  498. # unbound server key file.
  499. server-key-file: "/etc/unbound/unbound_server.key"
  500. # unbound server certificate file.
  501. server-cert-file: "/etc/unbound/unbound_server.pem"
  502. # unbound-control key file.
  503. control-key-file: "/etc/unbound/unbound_control.key"
  504. # unbound-control certificate file.
  505. control-cert-file: "/etc/unbound/unbound_control.pem"
  506. # Stub zones.
  507. # Create entries like below, to make all queries for 'example.com' and
  508. # 'example.org' go to the given list of nameservers. list zero or more
  509. # nameservers by hostname or by ipaddress. If you set stub-prime to yes,
  510. # the list is treated as priming hints (default is no).
  511. # With stub-first yes, it attempts without the stub if it fails.
  512. # stub-zone:
  513. # name: "example.com"
  514. # stub-addr: 192.0.2.68
  515. # stub-prime: no
  516. # stub-first: no
  517. # stub-zone:
  518. # name: "example.org"
  519. # stub-host: ns.example.com.
  520. # Forward zones
  521. # Create entries like below, to make all queries for 'example.com' and
  522. # 'example.org' go to the given list of servers. These servers have to handle
  523. # recursion to other nameservers. List zero or more nameservers by hostname
  524. # or by ipaddress. Use an entry with name "." to forward all queries.
  525. # If you enable forward-first, it attempts without the forward if it fails.
  526. # forward-zone:
  527. # name: "example.com"
  528. # forward-addr: 192.0.2.68
  529. # forward-addr: 192.0.2.73@5355 # forward to port 5355.
  530. # forward-first: no
  531. # forward-zone:
  532. # name: "example.org"
  533. # forward-host: fwd.example.com