Advertisement
Guest User

Untitled

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