bloginfo

Unbound Windows service.conf

Mar 18th, 2020 (edited)
800
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.36 KB | None | 0 0
  1. #
  2. # Example configuration file.
  3. #
  4. # See unbound.conf(5) man page, version 1.9.5.
  5. #
  6. # this is a comment.
  7.  
  8. #Use this to include other text into the file.
  9. #include: "otherfile.conf"
  10.  
  11. # The server clause sets the main parameters.
  12. server:
  13. include: "d:\config\unbound\blacklist.conf"
  14. # whitespace is not necessary, but looks cleaner.
  15.  
  16. # verbosity number, 0 is least verbose. 1 is default.
  17. verbosity: 0
  18. logfile: "E:\unbound.log"
  19. log-replies: yes
  20. log-time-ascii: yes
  21. log-queries: yes
  22.  
  23. # print statistics to the log (for every thread) every N seconds.
  24. # Set to "" or 0 to disable. Default is disabled.
  25. # statistics-interval: 0
  26.  
  27. # enable shm for stats, default no. if you enable also enable
  28. # statistics-interval, every time it also writes stats to the
  29. # shared memory segment keyed with shm-key.
  30. shm-enable: yes
  31.  
  32. # shm for stats uses this key, and key+1 for the shared mem segment.
  33. shm-key: 11777
  34.  
  35. # enable cumulative statistics, without clearing them after printing.
  36. # statistics-cumulative: no
  37.  
  38. # enable extended statistics (query types, answer codes, status)
  39. # printed from unbound-control. default off, because of speed.
  40. # extended-statistics: no
  41.  
  42. # number of threads to create. 1 disables threading.
  43. num-threads: 4
  44.  
  45. # specify the interfaces to answer queries from by ip-address.
  46. # The default is to listen to localhost (127.0.0.1 and ::1).
  47. # specify 0.0.0.0 and ::0 to bind to all available interfaces.
  48. # specify every interface[@port] on a new 'interface:' labelled line.
  49. # The listen interfaces are not changed on reload, only on restart.
  50. interface: 0.0.0.0
  51. interface: ::0
  52. # interface: 192.0.2.154@5003
  53. # interface: 2001:DB8::5
  54.  
  55. # enable this feature to copy the source address of queries to reply.
  56. # Socket options are not supported on all platforms. experimental.
  57. # interface-automatic: no
  58.  
  59. # port to answer queries from
  60. # port: 53
  61.  
  62. # specify the interfaces to send outgoing queries to authoritative
  63. # server from by ip-address. If none, the default (all) interface
  64. # is used. Specify every interface on a 'outgoing-interface:' line.
  65. outgoing-interface: 192.168.1.100
  66. outgoing-interface: fe80::202:b3ff:fead:7b39
  67. # outgoing-interface: 2001:DB8::6
  68.  
  69. # Specify a netblock to use remainder 64 bits as random bits for
  70. # upstream queries. Uses freebind option (Linux).
  71. # outgoing-interface: 2001:DB8::/64
  72. # Also (Linux:) ip -6 addr add 2001:db8::/64 dev lo
  73. # And: ip -6 route add local 2001:db8::/64 dev lo
  74. # And set prefer-ip6: yes to use the ip6 randomness from a netblock.
  75. # Set this to yes to prefer ipv6 upstream servers over ipv4.
  76. prefer-ip6: yes
  77.  
  78. # number of ports to allocate per thread, determines the size of the
  79. # port range that can be open simultaneously. About double the
  80. # num-queries-per-thread, or, use as many as the OS will allow you.
  81. # outgoing-range: 4096
  82.  
  83. # permit unbound to use this port number or port range for
  84. # making outgoing queries, using an outgoing interface.
  85. # outgoing-port-permit: 32768
  86.  
  87. # deny unbound the use this of port number or port range for
  88. # making outgoing queries, using an outgoing interface.
  89. # Use this to make sure unbound does not grab a UDP port that some
  90. # other server on this computer needs. The default is to avoid
  91. # IANA-assigned port numbers.
  92. # If multiple outgoing-port-permit and outgoing-port-avoid options
  93. # are present, they are processed in order.
  94. # outgoing-port-avoid: "3200-3208"
  95.  
  96. # number of outgoing simultaneous tcp buffers to hold per thread.
  97. # outgoing-num-tcp: 10
  98.  
  99. # number of incoming simultaneous tcp buffers to hold per thread.
  100. # incoming-num-tcp: 10
  101.  
  102. # buffer size for UDP port 53 incoming (SO_RCVBUF socket option).
  103. # 0 is system default. Use 4m to catch query spikes for busy servers.
  104. # so-rcvbuf: 0
  105.  
  106. # buffer size for UDP port 53 outgoing (SO_SNDBUF socket option).
  107. # 0 is system default. Use 4m to handle spikes on very busy servers.
  108. # so-sndbuf: 0
  109.  
  110. # use SO_REUSEPORT to distribute queries over threads.
  111. # at extreme load it could be better to turn it off to distribute even.
  112. # so-reuseport: yes
  113.  
  114. # use IP_TRANSPARENT so the interface: addresses can be non-local
  115. # and you can config non-existing IPs that are going to work later on
  116. # (uses IP_BINDANY on FreeBSD).
  117. # ip-transparent: no
  118.  
  119. # use IP_FREEBIND so the interface: addresses can be non-local
  120. # and you can bind to nonexisting IPs and interfaces that are down.
  121. # Linux only. On Linux you also have ip-transparent that is similar.
  122. # ip-freebind: no
  123.  
  124. # EDNS reassembly buffer to advertise to UDP peers (the actual buffer
  125. # is set with msg-buffer-size). 1472 can solve fragmentation (timeouts)
  126. # edns-buffer-size: 4096
  127.  
  128. # Maximum UDP response size (not applied to TCP response).
  129. # Suggested values are 512 to 4096. Default is 4096. 65536 disables it.
  130. # max-udp-size: 4096
  131.  
  132. # max memory to use for stream(tcp and tls) waiting result buffers.
  133. # stream-wait-size: 4m
  134.  
  135. # buffer size for handling DNS data. No messages larger than this
  136. # size can be sent or received, by UDP or TCP. In bytes.
  137. # msg-buffer-size: 65552
  138.  
  139. # the amount of memory to use for the message cache.
  140. # plain value in bytes or you can append k, m or G. default is "4Mb".
  141. msg-cache-size: 8m
  142.  
  143. # the number of slabs to use for the message cache.
  144. # the number of slabs must be a power of 2.
  145. # more slabs reduce lock contention, but fragment memory usage.
  146. # msg-cache-slabs: 4
  147.  
  148. # the number of queries that a thread gets to service.
  149. # num-queries-per-thread: 1024
  150.  
  151. # if very busy, 50% queries run to completion, 50% get timeout in msec
  152. # jostle-timeout: 200
  153.  
  154. # msec to wait before close of port on timeout UDP. 0 disables.
  155. # delay-close: 0
  156.  
  157. # msec for waiting for an unknown server to reply. Increase if you
  158. # are behind a slow satellite link, to eg. 1128.
  159. # unknown-server-time-limit: 376
  160.  
  161. # the amount of memory to use for the RRset cache.
  162. # plain value in bytes or you can append k, m or G. default is "4Mb".
  163. rrset-cache-size: 8m
  164.  
  165. # the number of slabs to use for the RRset cache.
  166. # the number of slabs must be a power of 2.
  167. # more slabs reduce lock contention, but fragment memory usage.
  168. # rrset-cache-slabs: 4
  169.  
  170. # the time to live (TTL) value lower bound, in seconds. Default 0.
  171. # If more than an hour could easily give trouble due to stale data.
  172. cache-min-ttl: 86400
  173.  
  174. # the time to live (TTL) value cap for RRsets and messages in the
  175. # cache. Items are not cached for longer. In seconds.
  176. cache-max-ttl: 86400
  177.  
  178. # the time to live (TTL) value cap for negative responses in the cache
  179. cache-max-negative-ttl: 14400
  180.  
  181. # the time to live (TTL) value for cached roundtrip times, lameness and
  182. # EDNS version information for hosts. In seconds.
  183. # infra-host-ttl: 900
  184.  
  185. # minimum wait time for responses, increase if uplink is long. In msec.
  186. # infra-cache-min-rtt: 50
  187.  
  188. # the number of slabs to use for the Infrastructure cache.
  189. # the number of slabs must be a power of 2.
  190. # more slabs reduce lock contention, but fragment memory usage.
  191. # infra-cache-slabs: 4
  192.  
  193. # the maximum number of hosts that are cached (roundtrip, EDNS, lame).
  194. # infra-cache-numhosts: 10000
  195.  
  196. # define a number of tags here, use with local-zone, access-control.
  197. # repeat the define-tag statement to add additional tags.
  198. # define-tag: "tag1 tag2 tag3"
  199.  
  200. # Enable IPv4, "yes" or "no".
  201. # do-ip4: yes
  202.  
  203. # Enable IPv6, "yes" or "no".
  204. # do-ip6: yes
  205.  
  206. # Enable UDP, "yes" or "no".
  207. # do-udp: yes
  208.  
  209. # Enable TCP, "yes" or "no".
  210. do-tcp: no
  211.  
  212. # upstream connections use TCP only (and no UDP), "yes" or "no"
  213. # useful for tunneling scenarios, default no.
  214. # tcp-upstream: no
  215.  
  216. # upstream connections also use UDP (even if do-udp is no).
  217. # useful if if you want UDP upstream, but don't provide UDP downstream.
  218. # udp-upstream-without-downstream: no
  219.  
  220. # Maximum segment size (MSS) of TCP socket on which the server
  221. # responds to queries. Default is 0, system default MSS.
  222. # tcp-mss: 0
  223.  
  224. # Maximum segment size (MSS) of TCP socket for outgoing queries.
  225. # Default is 0, system default MSS.
  226. # outgoing-tcp-mss: 0
  227.  
  228. # Idle TCP timeout, connection closed in milliseconds
  229. # tcp-idle-timeout: 30000
  230.  
  231. # Enable EDNS TCP keepalive option.
  232. # edns-tcp-keepalive: no
  233.  
  234. # Timeout for EDNS TCP keepalive, in msec.
  235. # edns-tcp-keepalive-timeout: 120000
  236.  
  237. # Use systemd socket activation for UDP, TCP, and control sockets.
  238. # use-systemd: no
  239.  
  240. # Detach from the terminal, run in background, "yes" or "no".
  241. # Set the value to "no" when unbound runs as systemd service.
  242. # do-daemonize: yes
  243.  
  244. # control which clients are allowed to make (recursive) queries
  245. # to this server. Specify classless netblocks with /size and action.
  246. # By default everything is refused, except for localhost.
  247. # Choose deny (drop message), refuse (polite error reply),
  248. # allow (recursive ok), allow_setrd (recursive ok, rd bit is forced on),
  249. # allow_snoop (recursive and nonrecursive ok)
  250. # deny_non_local (drop queries unless can be answered from local-data)
  251. # refuse_non_local (like deny_non_local but polite error reply).
  252. access-control: fe80::/64 allow
  253. access-control: 192.168.1.0/24 allow
  254. # access-control: 127.0.0.0/8 allow
  255. # access-control: ::0/0 refuse
  256. # access-control: ::1 allow
  257. # access-control: ::ffff:127.0.0.1 allow
  258.  
  259. # tag access-control with list of tags (in "" with spaces between)
  260. # Clients using this access control element use localzones that
  261. # are tagged with one of these tags.
  262. # access-control-tag: 192.0.2.0/24 "tag2 tag3"
  263.  
  264. # set action for particular tag for given access control element
  265. # if you have multiple tag values, the tag used to lookup the action
  266. # is the first tag match between access-control-tag and local-zone-tag
  267. # where "first" comes from the order of the define-tag values.
  268. # access-control-tag-action: 192.0.2.0/24 tag3 refuse
  269.  
  270. # set redirect data for particular tag for access control element
  271. # access-control-tag-data: 192.0.2.0/24 tag2 "A 127.0.0.1"
  272.  
  273. # Set view for access control element
  274. # access-control-view: 192.0.2.0/24 viewname
  275.  
  276. # if given, a chroot(2) is done to the given directory.
  277. # i.e. you can chroot to the working directory, for example,
  278. # for extra security, but make sure all files are in that directory.
  279. #
  280. # If chroot is enabled, you should pass the configfile (from the
  281. # commandline) as a full path from the original root. After the
  282. # chroot has been performed the now defunct portion of the config
  283. # file path is removed to be able to reread the config after a reload.
  284. #
  285. # All other file paths (working dir, logfile, roothints, and
  286. # key files) can be specified in several ways:
  287. # o as an absolute path relative to the new root.
  288. # o as a relative path to the working directory.
  289. # o as an absolute path relative to the original root.
  290. # In the last case the path is adjusted to remove the unused portion.
  291. #
  292. # The pid file can be absolute and outside of the chroot, it is
  293. # written just prior to performing the chroot and dropping permissions.
  294. #
  295. # Additionally, unbound may need to access /dev/random (for entropy).
  296. # How to do this is specific to your OS.
  297. #
  298. # If you give "" no chroot is performed. The path must not end in a /.
  299. # chroot: ""
  300.  
  301. # if given, user privileges are dropped (after binding port),
  302. # and the given username is assumed. Default is user "unbound".
  303. # If you give "" no privileges are dropped.
  304. # username: "unbound"
  305.  
  306. # the working directory. The relative files in this config are
  307. # relative to this directory. If you give "" the working directory
  308. # is not changed.
  309. # If you give a server: directory: dir before include: file statements
  310. # then those includes can be relative to the working directory.
  311. # directory: ""
  312.  
  313. # the log file, "" means log to stderr.
  314. # Use of this option sets use-syslog to "no".
  315. # logfile: ""
  316.  
  317. # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to
  318. # log to. If yes, it overrides the logfile.
  319. # use-syslog: yes
  320.  
  321. # Log identity to report. if empty, defaults to the name of argv[0]
  322. # (usually "unbound").
  323. # log-identity: ""
  324.  
  325. # print UTC timestamp in ascii to logfile, default is epoch in seconds.
  326. # log-time-ascii: no
  327.  
  328. # print one line with time, IP, name, type, class for every query.
  329. # log-queries: no
  330.  
  331. # print one line per reply, with time, IP, name, type, class, rcode,
  332. # timetoresolve, fromcache and responsesize.
  333. # log-replies: no
  334.  
  335. # log with tag 'query' and 'reply' instead of 'info' for
  336. # filtering log-queries and log-replies from the log.
  337. # log-tag-queryreply: no
  338.  
  339. # log the local-zone actions, like local-zone type inform is enabled
  340. # also for the other local zone types.
  341. # log-local-actions: no
  342.  
  343. # print log lines that say why queries return SERVFAIL to clients.
  344. # log-servfail: no
  345.  
  346. # the pid file. Can be an absolute path outside of chroot/work dir.
  347. # pidfile: ""
  348.  
  349. # file to read root hints from.
  350. # get one from https://www.internic.net/domain/named.cache
  351. # root-hints: ""
  352.  
  353. # enable to not answer id.server and hostname.bind queries.
  354. # hide-identity: no
  355.  
  356. # enable to not answer version.server and version.bind queries.
  357. # hide-version: no
  358.  
  359. # enable to not answer trustanchor.unbound queries.
  360. # hide-trustanchor: no
  361.  
  362. # the identity to report. Leave "" or default to return hostname.
  363. # identity: ""
  364.  
  365. # the version to report. Leave "" or default to return package version.
  366. # version: ""
  367.  
  368. # the target fetch policy.
  369. # series of integers describing the policy per dependency depth.
  370. # The number of values in the list determines the maximum dependency
  371. # depth the recursor will pursue before giving up. Each integer means:
  372. # -1 : fetch all targets opportunistically,
  373. # 0: fetch on demand,
  374. # positive value: fetch that many targets opportunistically.
  375. # Enclose the list of numbers between quotes ("").
  376. # target-fetch-policy: "3 2 1 0 0"
  377.  
  378. # Harden against very small EDNS buffer sizes.
  379. # harden-short-bufsize: no
  380.  
  381. # Harden against unseemly large queries.
  382. # harden-large-queries: no
  383.  
  384. # Harden against out of zone rrsets, to avoid spoofing attempts.
  385. # harden-glue: yes
  386.  
  387. # Harden against receiving dnssec-stripped data. If you turn it
  388. # off, failing to validate dnskey data for a trustanchor will
  389. # trigger insecure mode for that zone (like without a trustanchor).
  390. # Default on, which insists on dnssec data for trust-anchored zones.
  391. # harden-dnssec-stripped: yes
  392.  
  393. # Harden against queries that fall under dnssec-signed nxdomain names.
  394. # harden-below-nxdomain: yes
  395.  
  396. # Harden the referral path by performing additional queries for
  397. # infrastructure data. Validates the replies (if possible).
  398. # Default off, because the lookups burden the server. Experimental
  399. # implementation of draft-wijngaards-dnsext-resolver-side-mitigation.
  400. # harden-referral-path: no
  401.  
  402. # Harden against algorithm downgrade when multiple algorithms are
  403. # advertised in the DS record. If no, allows the weakest algorithm
  404. # to validate the zone.
  405. # harden-algo-downgrade: no
  406.  
  407. # Sent minimum amount of information to upstream servers to enhance
  408. # privacy. Only sent minimum required labels of the QNAME and set QTYPE
  409. # to A when possible.
  410. # qname-minimisation: yes
  411.  
  412. # QNAME minimisation in strict mode. Do not fall-back to sending full
  413. # QNAME to potentially broken nameservers. A lot of domains will not be
  414. # resolvable when this option in enabled.
  415. # This option only has effect when qname-minimisation is enabled.
  416. # qname-minimisation-strict: no
  417.  
  418. # Aggressive NSEC uses the DNSSEC NSEC chain to synthesize NXDOMAIN
  419. # and other denials, using information from previous NXDOMAINs answers.
  420. # aggressive-nsec: no
  421.  
  422. # Use 0x20-encoded random bits in the query to foil spoof attempts.
  423. # This feature is an experimental implementation of draft dns-0x20.
  424. # use-caps-for-id: no
  425.  
  426. # Domains (and domains in them) without support for dns-0x20 and
  427. # the fallback fails because they keep sending different answers.
  428. # caps-whitelist: "licdn.com"
  429. # caps-whitelist: "senderbase.org"
  430.  
  431. # Enforce privacy of these addresses. Strips them away from answers.
  432. # It may cause DNSSEC validation to additionally mark it as bogus.
  433. # Protects against 'DNS Rebinding' (uses browser as network proxy).
  434. # Only 'private-domain' and 'local-data' names are allowed to have
  435. # these private addresses. No default.
  436. # private-address: 10.0.0.0/8
  437. # private-address: 172.16.0.0/12
  438. # private-address: 192.168.0.0/16
  439. # private-address: 169.254.0.0/16
  440. # private-address: fd00::/8
  441. # private-address: fe80::/10
  442. # private-address: ::ffff:0:0/96
  443.  
  444. # Allow the domain (and its subdomains) to contain private addresses.
  445. # local-data statements are allowed to contain private addresses too.
  446. # private-domain: "example.com"
  447.  
  448. # If nonzero, unwanted replies are not only reported in statistics,
  449. # but also a running total is kept per thread. If it reaches the
  450. # threshold, a warning is printed and a defensive action is taken,
  451. # the cache is cleared to flush potential poison out of it.
  452. # A suggested value is 10000000, the default is 0 (turned off).
  453. # unwanted-reply-threshold: 0
  454.  
  455. # Do not query the following addresses. No DNS queries are sent there.
  456. # List one address per entry. List classless netblocks with /size,
  457. # do-not-query-address: 127.0.0.1/8
  458. # do-not-query-address: ::1
  459.  
  460. # if yes, the above default do-not-query-address entries are present.
  461. # if no, localhost can be queried (for testing and debugging).
  462. # do-not-query-localhost: yes
  463.  
  464. # if yes, perform prefetching of almost expired message cache entries.
  465. # prefetch: no
  466.  
  467. # if yes, perform key lookups adjacent to normal lookups.
  468. # prefetch-key: no
  469.  
  470. # deny queries of type ANY with an empty response.
  471. # deny-any: no
  472.  
  473. # if yes, Unbound rotates RRSet order in response.
  474. # rrset-roundrobin: no
  475.  
  476. # if yes, Unbound doesn't insert authority/additional sections
  477. # into response messages when those sections are not required.
  478. # minimal-responses: yes
  479.  
  480. # true to disable DNSSEC lameness check in iterator.
  481. # disable-dnssec-lame-check: no
  482.  
  483. # module configuration of the server. A string with identifiers
  484. # separated by spaces. Syntax: "[dns64] [validator] iterator"
  485. # most modules have to be listed at the beginning of the line,
  486. # except cachedb(just before iterator), and python (at the beginning,
  487. # or, just before the iterator).
  488. # module-config: "validator iterator"
  489.  
  490. # File with trusted keys, kept uptodate using RFC5011 probes,
  491. # initial file like trust-anchor-file, then it stores metadata.
  492. # Use several entries, one per domain name, to track multiple zones.
  493. #
  494. # If you want to perform DNSSEC validation, run unbound-anchor before
  495. # you start unbound (i.e. in the system boot scripts). And enable:
  496. # Please note usage of unbound-anchor root anchor is at your own risk
  497. # and under the terms of our LICENSE (see that file in the source).
  498. # auto-trust-anchor-file: "C:\Program Files\Unbound\root.key"
  499.  
  500. # trust anchor signaling sends a RFC8145 key tag query after priming.
  501. # trust-anchor-signaling: yes
  502.  
  503. # Root key trust anchor sentinel (draft-ietf-dnsop-kskroll-sentinel)
  504. # root-key-sentinel: yes
  505.  
  506. # File with DLV trusted keys. Same format as trust-anchor-file.
  507. # There can be only one DLV configured, it is trusted from root down.
  508. # DLV is going to be decommissioned. Please do not use it any more.
  509. # dlv-anchor-file: "dlv.isc.org.key"
  510.  
  511. # File with trusted keys for validation. Specify more than one file
  512. # with several entries, one file per entry.
  513. # Zone file format, with DS and DNSKEY entries.
  514. # Note this gets out of date, use auto-trust-anchor-file please.
  515. # trust-anchor-file: ""
  516.  
  517. # Trusted key for validation. DS or DNSKEY. specify the RR on a
  518. # single line, surrounded by "". TTL is ignored. class is IN default.
  519. # Note this gets out of date, use auto-trust-anchor-file please.
  520. # (These examples are from August 2007 and may not be valid anymore).
  521. # trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ=="
  522. # trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A"
  523.  
  524. # File with trusted keys for validation. Specify more than one file
  525. # with several entries, one file per entry. Like trust-anchor-file
  526. # but has a different file format. Format is BIND-9 style format,
  527. # the trusted-keys { name flag proto algo "key"; }; clauses are read.
  528. # you need external update procedures to track changes in keys.
  529. # trusted-keys-file: ""
  530.  
  531. # Ignore chain of trust. Domain is treated as insecure.
  532. # domain-insecure: "example.com"
  533.  
  534. # Override the date for validation with a specific fixed date.
  535. # Do not set this unless you are debugging signature inception
  536. # and expiration. "" or "0" turns the feature off. -1 ignores date.
  537. # val-override-date: ""
  538.  
  539. # The time to live for bogus data, rrsets and messages. This avoids
  540. # some of the revalidation, until the time interval expires. in secs.
  541. # val-bogus-ttl: 60
  542.  
  543. # The signature inception and expiration dates are allowed to be off
  544. # by 10% of the signature lifetime (expir-incep) from our local clock.
  545. # This leeway is capped with a minimum and a maximum. In seconds.
  546. # val-sig-skew-min: 3600
  547. # val-sig-skew-max: 86400
  548.  
  549. # Should additional section of secure message also be kept clean of
  550. # unsecure data. Useful to shield the users of this validator from
  551. # potential bogus data in the additional section. All unsigned data
  552. # in the additional section is removed from secure messages.
  553. # val-clean-additional: yes
  554.  
  555. # Turn permissive mode on to permit bogus messages. Thus, messages
  556. # for which security checks failed will be returned to clients,
  557. # instead of SERVFAIL. It still performs the security checks, which
  558. # result in interesting log files and possibly the AD bit in
  559. # replies if the message is found secure. The default is off.
  560. # val-permissive-mode: no
  561.  
  562. # Ignore the CD flag in incoming queries and refuse them bogus data.
  563. # Enable it if the only clients of unbound are legacy servers (w2008)
  564. # that set CD but cannot validate themselves.
  565. # ignore-cd-flag: no
  566.  
  567. # Serve expired responses from cache, with TTL 0 in the response,
  568. # and then attempt to fetch the data afresh.
  569. # serve-expired: no
  570. #
  571. # Limit serving of expired responses to configured seconds after
  572. # expiration. 0 disables the limit.
  573. # serve-expired-ttl: 0
  574. #
  575. # Set the TTL of expired records to the serve-expired-ttl value after a
  576. # failed attempt to retrieve the record from upstream. This makes sure
  577. # that the expired records will be served as long as there are queries
  578. # for it.
  579. # serve-expired-ttl-reset: no
  580.  
  581. # Have the validator log failed validations for your diagnosis.
  582. # 0: off. 1: A line per failed user query. 2: With reason and bad IP.
  583. # val-log-level: 0
  584.  
  585. # It is possible to configure NSEC3 maximum iteration counts per
  586. # keysize. Keep this table very short, as linear search is done.
  587. # A message with an NSEC3 with larger count is marked insecure.
  588. # List in ascending order the keysize and count values.
  589. # val-nsec3-keysize-iterations: "1024 150 2048 500 4096 2500"
  590.  
  591. # instruct the auto-trust-anchor-file probing to add anchors after ttl.
  592. # add-holddown: 2592000 # 30 days
  593.  
  594. # instruct the auto-trust-anchor-file probing to del anchors after ttl.
  595. # del-holddown: 2592000 # 30 days
  596.  
  597. # auto-trust-anchor-file probing removes missing anchors after ttl.
  598. # If the value 0 is given, missing anchors are not removed.
  599. # keep-missing: 31622400 # 366 days
  600.  
  601. # debug option that allows very small holddown times for key rollover,
  602. # otherwise the RFC mandates probe intervals must be at least 1 hour.
  603. # permit-small-holddown: no
  604.  
  605. # the amount of memory to use for the key cache.
  606. # plain value in bytes or you can append k, m or G. default is "4Mb".
  607. key-cache-size: 8m
  608.  
  609. # the number of slabs to use for the key cache.
  610. # the number of slabs must be a power of 2.
  611. # more slabs reduce lock contention, but fragment memory usage.
  612. # key-cache-slabs: 4
  613.  
  614. # the amount of memory to use for the negative cache (used for DLV).
  615. # plain value in bytes or you can append k, m or G. default is "1Mb".
  616. neg-cache-size: 8m
  617.  
  618. # By default, for a number of zones a small default 'nothing here'
  619. # reply is built-in. Query traffic is thus blocked. If you
  620. # wish to serve such zone you can unblock them by uncommenting one
  621. # of the nodefault statements below.
  622. # You may also have to use domain-insecure: zone to make DNSSEC work,
  623. # unless you have your own trust anchors for this zone.
  624. # local-zone: "localhost." nodefault
  625. # local-zone: "127.in-addr.arpa." nodefault
  626. # 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
  627. # local-zone: "onion." nodefault
  628. # local-zone: "test." nodefault
  629. # local-zone: "invalid." nodefault
  630. # local-zone: "10.in-addr.arpa." nodefault
  631. # local-zone: "16.172.in-addr.arpa." nodefault
  632. # local-zone: "17.172.in-addr.arpa." nodefault
  633. # local-zone: "18.172.in-addr.arpa." nodefault
  634. # local-zone: "19.172.in-addr.arpa." nodefault
  635. # local-zone: "20.172.in-addr.arpa." nodefault
  636. # local-zone: "21.172.in-addr.arpa." nodefault
  637. # local-zone: "22.172.in-addr.arpa." nodefault
  638. # local-zone: "23.172.in-addr.arpa." nodefault
  639. # local-zone: "24.172.in-addr.arpa." nodefault
  640. # local-zone: "25.172.in-addr.arpa." nodefault
  641. # local-zone: "26.172.in-addr.arpa." nodefault
  642. # local-zone: "27.172.in-addr.arpa." nodefault
  643. # local-zone: "28.172.in-addr.arpa." nodefault
  644. # local-zone: "29.172.in-addr.arpa." nodefault
  645. # local-zone: "30.172.in-addr.arpa." nodefault
  646. # local-zone: "31.172.in-addr.arpa." nodefault
  647. # local-zone: "168.192.in-addr.arpa." nodefault
  648. # local-zone: "0.in-addr.arpa." nodefault
  649. # local-zone: "254.169.in-addr.arpa." nodefault
  650. # local-zone: "2.0.192.in-addr.arpa." nodefault
  651. # local-zone: "100.51.198.in-addr.arpa." nodefault
  652. # local-zone: "113.0.203.in-addr.arpa." nodefault
  653. # local-zone: "255.255.255.255.in-addr.arpa." nodefault
  654. # 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
  655. # local-zone: "d.f.ip6.arpa." nodefault
  656. # local-zone: "8.e.f.ip6.arpa." nodefault
  657. # local-zone: "9.e.f.ip6.arpa." nodefault
  658. # local-zone: "a.e.f.ip6.arpa." nodefault
  659. # local-zone: "b.e.f.ip6.arpa." nodefault
  660. # local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault
  661. # And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa.
  662.  
  663. # Add example.com into ipset
  664. # local-zone: "example.com" ipset
  665.  
  666. # If unbound is running service for the local host then it is useful
  667. # to perform lan-wide lookups to the upstream, and unblock the
  668. # long list of local-zones above. If this unbound is a dns server
  669. # for a network of computers, disabled is better and stops information
  670. # leakage of local lan information.
  671. # unblock-lan-zones: no
  672.  
  673. # The insecure-lan-zones option disables validation for
  674. # these zones, as if they were all listed as domain-insecure.
  675. # insecure-lan-zones: no
  676.  
  677. # a number of locally served zones can be configured.
  678. # local-zone: <zone> <type>
  679. # local-data: "<resource record string>"
  680. # o deny serves local data (if any), else, drops queries.
  681. # o refuse serves local data (if any), else, replies with error.
  682. # o static serves local data, else, nxdomain or nodata answer.
  683. # o transparent gives local data, but resolves normally for other names
  684. # o redirect serves the zone data for any subdomain in the zone.
  685. # o nodefault can be used to normally resolve AS112 zones.
  686. # o typetransparent resolves normally for other types and other names
  687. # o inform acts like transparent, but logs client IP address
  688. # o inform_deny drops queries and logs client IP address
  689. # o inform_redirect redirects queries and logs client IP address
  690. # o always_transparent, always_refuse, always_nxdomain, resolve in
  691. # that way but ignore local data for that name
  692. # o noview breaks out of that view towards global local-zones.
  693. #
  694. # defaults are localhost address, reverse for 127.0.0.1 and ::1
  695. # and nxdomain for AS112 zones. If you configure one of these zones
  696. # the default content is omitted, or you can omit it with 'nodefault'.
  697. #
  698. # If you configure local-data without specifying local-zone, by
  699. # default a transparent local-zone is created for the data.
  700. #
  701. # You can add locally served data with
  702. # local-zone: "local." static
  703. # local-data: "mycomputer.local. IN A 192.0.2.51"
  704. # local-data: 'mytext.local TXT "content of text record"'
  705. #
  706. # You can override certain queries with
  707. # local-data: "adserver.example.com A 127.0.0.1"
  708. #
  709. # You can redirect a domain to a fixed address with
  710. # (this makes example.com, www.example.com, etc, all go to 192.0.2.3)
  711. # local-zone: "example.com" redirect
  712. # local-data: "example.com A 192.0.2.3"
  713. #
  714. # Shorthand to make PTR records, "IPv4 name" or "IPv6 name".
  715. # You can also add PTR records using local-data directly, but then
  716. # you need to do the reverse notation yourself.
  717. # local-data-ptr: "192.0.2.3 www.example.com"
  718.  
  719. # tag a localzone with a list of tag names (in "" with spaces between)
  720. # local-zone-tag: "example.com" "tag2 tag3"
  721.  
  722. # add a netblock specific override to a localzone, with zone type
  723. # local-zone-override: "example.com" 192.0.2.0/24 refuse
  724.  
  725. # service clients over TLS (on the TCP sockets), with plain DNS inside
  726. # the TLS stream. Give the certificate to use and private key.
  727. # default is "" (disabled). requires restart to take effect.
  728. # tls-service-key: "path/to/privatekeyfile.key"
  729. # tls-service-pem: "path/to/publiccertfile.pem"
  730. # tls-port: 853
  731.  
  732. # cipher setting for TLSv1.2
  733. # tls-ciphers: "DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256"
  734. # cipher setting for TLSv1.3
  735. # tls-ciphersuites: "TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_8_SHA256:TLS_AES_128_CCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256"
  736.  
  737. # Add the secret file for TLS Session Ticket.
  738. # Secret file must be 80 bytes of random data.
  739. # First key use to encrypt and decrypt TLS session tickets.
  740. # Other keys use to decrypt only.
  741. # requires restart to take effect.
  742. # tls-session-ticket-keys: "path/to/secret_file1"
  743. # tls-session-ticket-keys: "path/to/secret_file2"
  744.  
  745. # request upstream over TLS (with plain DNS inside the TLS stream).
  746. # Default is no. Can be turned on and off with unbound-control.
  747. # tls-upstream: no
  748.  
  749. # Certificates used to authenticate connections made upstream.
  750. # tls-cert-bundle: ""
  751.  
  752. # Add system certs to the cert bundle, from the Windows Cert Store
  753. # tls-win-cert: no
  754.  
  755. # Also serve tls on these port numbers (eg. 443, ...), by listing
  756. # tls-additional-port: portno for each of the port numbers.
  757.  
  758. # DNS64 prefix. Must be specified when DNS64 is use.
  759. # Enable dns64 in module-config. Used to synthesize IPv6 from IPv4.
  760. # dns64-prefix: 64:ff9b::0/96
  761.  
  762. # DNS64 ignore AAAA records for these domains and use A instead.
  763. # dns64-ignore-aaaa: "example.com"
  764.  
  765. # ratelimit for uncached, new queries, this limits recursion effort.
  766. # ratelimiting is experimental, and may help against randomqueryflood.
  767. # if 0(default) it is disabled, otherwise state qps allowed per zone.
  768. # ratelimit: 0
  769.  
  770. # ratelimits are tracked in a cache, size in bytes of cache (or k,m).
  771. # ratelimit-size: 4m
  772. # ratelimit cache slabs, reduces lock contention if equal to cpucount.
  773. # ratelimit-slabs: 4
  774.  
  775. # 0 blocks when ratelimited, otherwise let 1/xth traffic through
  776. # ratelimit-factor: 10
  777.  
  778. # override the ratelimit for a specific domain name.
  779. # give this setting multiple times to have multiple overrides.
  780. # ratelimit-for-domain: example.com 1000
  781. # override the ratelimits for all domains below a domain name
  782. # can give this multiple times, the name closest to the zone is used.
  783. # ratelimit-below-domain: com 1000
  784.  
  785. # global query ratelimit for all ip addresses.
  786. # feature is experimental.
  787. # if 0(default) it is disabled, otherwise states qps allowed per ip address
  788. # ip-ratelimit: 0
  789.  
  790. # ip ratelimits are tracked in a cache, size in bytes of cache (or k,m).
  791. # ip-ratelimit-size: 4m
  792. # ip ratelimit cache slabs, reduces lock contention if equal to cpucount.
  793. # ip-ratelimit-slabs: 4
  794.  
  795. # 0 blocks when ip is ratelimited, otherwise let 1/xth traffic through
  796. # ip-ratelimit-factor: 10
  797.  
  798. # Limit the number of connections simultaneous from a netblock
  799. # tcp-connection-limit: 192.0.2.0/24 12
  800.  
  801. # select from the fastest servers this many times out of 1000. 0 means
  802. # the fast server select is disabled. prefetches are not sped up.
  803. # fast-server-permil: 0
  804. # the number of servers that will be used in the fast server selection.
  805. # fast-server-num: 3
  806.  
  807. # Specific options for ipsecmod. unbound needs to be configured with
  808. # --enable-ipsecmod for these to take effect.
  809. #
  810. # Enable or disable ipsecmod (it still needs to be defined in
  811. # module-config above). Can be used when ipsecmod needs to be
  812. # enabled/disabled via remote-control(below).
  813. # ipsecmod-enabled: yes
  814. #
  815. # Path to executable external hook. It must be defined when ipsecmod is
  816. # listed in module-config (above).
  817. # ipsecmod-hook: "./my_executable"
  818. #
  819. # When enabled unbound will reply with SERVFAIL if the return value of
  820. # the ipsecmod-hook is not 0.
  821. # ipsecmod-strict: no
  822. #
  823. # Maximum time to live (TTL) for cached A/AAAA records with IPSECKEY.
  824. # ipsecmod-max-ttl: 3600
  825. #
  826. # Reply with A/AAAA even if the relevant IPSECKEY is bogus. Mainly used for
  827. # testing.
  828. # ipsecmod-ignore-bogus: no
  829. #
  830. # Domains for which ipsecmod will be triggered. If not defined (default)
  831. # all domains are treated as being whitelisted.
  832. # ipsecmod-whitelist: "example.com"
  833. # ipsecmod-whitelist: "nlnetlabs.nl"
  834.  
  835.  
  836. # Python config section. To enable:
  837. # o use --with-pythonmodule to configure before compiling.
  838. # o list python in the module-config string (above) to enable.
  839. # It can be at the start, it gets validated results, or just before
  840. # the iterator and process before DNSSEC validation.
  841. # o and give a python-script to run.
  842. python:
  843. # Script file to load
  844. # python-script: "/ubmodule-tst.py"
  845.  
  846. # Remote control config section.
  847. remote-control:
  848. # Enable remote control with unbound-control(8) here.
  849. # set up the keys and certificates with unbound-control-setup.
  850. # control-enable: no
  851.  
  852. # what interfaces are listened to for remote control.
  853. # give 0.0.0.0 and ::0 to listen to all interfaces.
  854. # set to an absolute path to use a unix local name pipe, certificates
  855. # are not used for that, so key and cert files need not be present.
  856. # control-interface: 127.0.0.1
  857. # control-interface: ::1
  858.  
  859. # port number for remote control operations.
  860. # control-port: 8953
  861.  
  862. # for localhost, you can disable use of TLS by setting this to "no"
  863. # For local sockets this option is ignored, and TLS is not used.
  864. # control-use-cert: "yes"
  865.  
  866. # unbound server key file.
  867. # server-key-file: "/unbound_server.key"
  868.  
  869. # unbound server certificate file.
  870. # server-cert-file: "/unbound_server.pem"
  871.  
  872. # unbound-control key file.
  873. # control-key-file: "/unbound_control.key"
  874.  
  875. # unbound-control certificate file.
  876. # control-cert-file: "/unbound_control.pem"
  877.  
  878. # Stub zones.
  879. # Create entries like below, to make all queries for 'example.com' and
  880. # 'example.org' go to the given list of nameservers. list zero or more
  881. # nameservers by hostname or by ipaddress. If you set stub-prime to yes,
  882. # the list is treated as priming hints (default is no).
  883. # With stub-first yes, it attempts without the stub if it fails.
  884. # Consider adding domain-insecure: name and local-zone: name nodefault
  885. # to the server: section if the stub is a locally served zone.
  886. # stub-zone:
  887. # name: "example.com"
  888. # stub-addr: 192.0.2.68
  889. # stub-prime: no
  890. # stub-first: no
  891. # stub-tls-upstream: no
  892. # stub-no-cache: no
  893. # stub-zone:
  894. # name: "example.org"
  895. # stub-host: ns.example.com.
  896.  
  897. # Forward zones
  898. # Create entries like below, to make all queries for 'example.com' and
  899. # 'example.org' go to the given list of servers. These servers have to handle
  900. # recursion to other nameservers. List zero or more nameservers by hostname
  901. # or by ipaddress. Use an entry with name "." to forward all queries.
  902. # If you enable forward-first, it attempts without the forward if it fails.
  903.  
  904.  
  905. forward-zone:
  906. name: "."
  907. forward-addr: 192.168.1.1
  908. # forward-addr: 192.0.2.73@5355 # forward to port 5355.
  909. # forward-first: no
  910. # forward-tls-upstream: no
  911. # forward-no-cache: no
  912. # forward-zone:
  913. # name: "example.org"
  914. # forward-host: fwd.example.com
  915.  
  916. # Authority zones
  917. # The data for these zones is kept locally, from a file or downloaded.
  918. # The data can be served to downstream clients, or used instead of the
  919. # upstream (which saves a lookup to the upstream). The first example
  920. # has a copy of the root for local usage. The second serves example.org
  921. # authoritatively. zonefile: reads from file (and writes to it if you also
  922. # download it), master: fetches with AXFR and IXFR, or url to zonefile.
  923. # With allow-notify: you can give additional (apart from masters) sources of
  924. # notifies.
  925. # auth-zone:
  926. # name: "."
  927. # master: 199.9.14.201 # b.root-servers.net
  928. # master: 192.33.4.12 # c.root-servers.net
  929. # master: 199.7.91.13 # d.root-servers.net
  930. # master: 192.5.5.241 # f.root-servers.net
  931. # master: 192.112.36.4 # g.root-servers.net
  932. # master: 193.0.14.129 # k.root-servers.net
  933. # master: 192.0.47.132 # xfr.cjr.dns.icann.org
  934. # master: 192.0.32.132 # xfr.lax.dns.icann.org
  935. # master: 2001:500:200::b # b.root-servers.net
  936. # master: 2001:500:2::c # c.root-servers.net
  937. # master: 2001:500:2d::d # d.root-servers.net
  938. # master: 2001:500:2f::f # f.root-servers.net
  939. # master: 2001:500:12::d0d # g.root-servers.net
  940. # master: 2001:7fd::1 # k.root-servers.net
  941. # master: 2620:0:2830:202::132 # xfr.cjr.dns.icann.org
  942. # master: 2620:0:2d0:202::132 # xfr.lax.dns.icann.org
  943. # fallback-enabled: yes
  944. # for-downstream: no
  945. # for-upstream: yes
  946. # auth-zone:
  947. # name: "example.org"
  948. # for-downstream: yes
  949. # for-upstream: yes
  950. # zonefile: "example.org.zone"
  951.  
  952. # Views
  953. # Create named views. Name must be unique. Map views to requests using
  954. # the access-control-view option. Views can contain zero or more local-zone
  955. # and local-data options. Options from matching views will override global
  956. # options. Global options will be used if no matching view is found.
  957. # With view-first yes, it will try to answer using the global local-zone and
  958. # local-data elements if there is no view specific match.
  959. # view:
  960. # name: "viewname"
  961. # local-zone: "example.com" redirect
  962. # local-data: "example.com A 192.0.2.3"
  963. # local-data-ptr: "192.0.2.3 www.example.com"
  964. # view-first: no
  965. # view:
  966. # name: "anotherview"
  967. # local-zone: "example.com" refuse
  968.  
  969. # DNSCrypt
  970. # Caveats:
  971. # 1. the keys/certs cannot be produced by unbound. You can use dnscrypt-wrapper
  972. # for this: https://github.com/cofyc/dnscrypt-wrapper/blob/master/README.md#usage
  973. # 2. dnscrypt channel attaches to an interface. you MUST set interfaces to
  974. # listen on `dnscrypt-port` with the follo0wing snippet:
  975. # server:
  976. # interface: 0.0.0.0@443
  977. # interface: ::0@443
  978. #
  979. # Finally, `dnscrypt` config has its own section.
  980. # dnscrypt:
  981. # dnscrypt-enable: yes
  982. # dnscrypt-port: 443
  983. # dnscrypt-provider: 2.dnscrypt-cert.example.com.
  984. # dnscrypt-secret-key: /path/unbound-conf/keys1/1.key
  985. # dnscrypt-secret-key: /path/unbound-conf/keys2/1.key
  986. # dnscrypt-provider-cert: /path/unbound-conf/keys1/1.cert
  987. # dnscrypt-provider-cert: /path/unbound-conf/keys2/1.cert
  988.  
  989. # CacheDB
  990. # Enable external backend DB as auxiliary cache. Specify the backend name
  991. # (default is "testframe", which has no use other than for debugging and
  992. # testing) and backend-specific options. The 'cachedb' module must be
  993. # included in module-config, just before the iterator module.
  994. # cachedb:
  995. # backend: "testframe"
  996. # # secret seed string to calculate hashed keys
  997. # secret-seed: "default"
  998. #
  999. # # For "redis" backend:
  1000. # # redis server's IP address or host name
  1001. # redis-server-host: 127.0.0.1
  1002. # # redis server's TCP port
  1003. # redis-server-port: 6379
  1004. # # timeout (in ms) for communication with the redis server
  1005. # redis-timeout: 100
  1006.  
  1007. # IPSet
  1008. # Add specify domain into set via ipset.
  1009. # Note: To enable ipset needs run unbound as root user.
  1010. # ipset:
  1011. # # set name for ip v4 addresses
  1012. # name-v4: "list-v4"
  1013. # # set name for ip v6 addresses
  1014. # name-v6: "list-v6"
  1015. #
Add Comment
Please, Sign In to add comment