source: hybrid/branches/releng-10/nanobsd/files/var/unbound/unbound.conf@ 12935

Last change on this file since 12935 was 12935, checked in by huub, 10 years ago

deze versie van unbound.conf zou moeten werken ook met Google 8.8.8.8

File size: 10.7 KB
Line 
1## Authoritative, validating, recursive caching DNS
2## unbound.conf -- https://calomel.org
3#
4server:
5
6 directory: /var/unbound
7 username: unbound
8 chroot: /var/unbound
9 logfile: /var/unbound/unbound.log
10 pidfile: /var/run/unbound.pid
11 auto-trust-anchor-file: /var/unbound/root.key
12
13 # log verbosity
14 verbosity: 1
15
16 # specify the interfaces to answer queries from by ip-address. The default
17 # is to listen to localhost (127.0.0.1 and ::1). specify 0.0.0.0 and ::0 to
18 # bind to all available interfaces. specify every interface[@port] on a new
19 # 'interface:' labeled line. The listen interfaces are not changed on
20 # reload, only on restart.
21 interface: 0.0.0.0
22
23 # port to answer queries from
24 port: 53
25
26 # Enable IPv4, "yes" or "no".
27 do-ip4: yes
28
29 # Enable IPv6, "yes" or "no".
30 do-ip6: no
31
32 # Enable UDP, "yes" or "no".
33 do-udp: yes
34
35 # Enable TCP, "yes" or "no". If TCP is not needed, Unbound is actually
36 # quicker to resolve as the functions related to TCP checks are not done.i
37 # NOTE: you may need tcp enabled to get the DNSSEC results from *.edu domains
38 # due to their size.
39 do-tcp: yes
40
41 # control which client ips are allowed to make (recursive) queries to this
42 # server. Specify classless netblocks with /size and action. By default
43 # everything is refused, except for localhost. Choose deny (drop message),
44 # refuse (polite error reply), allow (recursive ok), allow_snoop (recursive
45 # and nonrecursive ok)
46 access-control: 127.0.0.0/8 allow
47 access-control: 172.16.0.0/12 allow
48
49 # Read the root hints from this file. Default is nothing, using built in
50 # hints for the IN class. The file has the format of zone files, with root
51 # nameserver names and addresses only. The default may become outdated,
52 # when servers change, therefore it is good practice to use a root-hints
53 # file. get one from ftp://FTP.INTERNIC.NET/domain/named.cache
54 root-hints: "/var/unbound/root.hints"
55
56 # enable to not answer id.server and hostname.bind queries.
57 hide-identity: yes
58
59 # enable to not answer version.server and version.bind queries.
60 hide-version: yes
61
62 # Will trust glue only if it is within the servers authority.
63 # Harden against out of zone rrsets, to avoid spoofing attempts.
64 # Hardening queries multiple name servers for the same data to make
65 # spoofing significantly harder and does not mandate dnssec.
66 harden-glue: yes
67
68 # Require DNSSEC data for trust-anchored zones, if such data is absent, the
69 # zone becomes bogus. Harden against receiving dnssec-stripped data. If you
70 # turn it off, failing to validate dnskey data for a trustanchor will trigger
71 # insecure mode for that zone (like without a trustanchor). Default on,
72 # which insists on dnssec data for trust-anchored zones.
73 harden-dnssec-stripped: yes
74
75 # Use 0x20-encoded random bits in the query to foil spoof attempts.
76 # http://tools.ietf.org/html/draft-vixie-dnsext-dns0x20-00
77 # While upper and lower case letters are allowed in domain names, no significance
78 # is attached to the case. That is, two names with the same spelling but
79 # different case are to be treated as if identical. This means calomel.org is the
80 # same as CaLoMeL.Org which is the same as CALOMEL.ORG.
81 use-caps-for-id: yes
82
83 # the time to live (TTL) value lower bound, in seconds. Default 0.
84 # If more than an hour could easily give trouble due to stale data.
85 cache-min-ttl: 3600
86
87 # the time to live (TTL) value cap for RRsets and messages in the
88 # cache. Items are not cached for longer. In seconds.
89 cache-max-ttl: 86400
90
91 # perform prefetching of close to expired message cache entries. If a client
92 # requests the dns lookup and the TTL of the cached hostname is going to
93 # expire in less than 10% of its TTL, unbound will (1st) return the ip of the
94 # host to the client and (2nd) pre-fetch the dns request from the remote dns
95 # server. This method has been shown to increase the amount of cached hits by
96 # local clients by 10% on average.
97 prefetch: yes
98
99 # number of threads to create. 1 disables threading. This should equal the number
100 # of CPU cores in the machine. Our example machine has 4 CPU cores.
101 num-threads: 1
102
103
104 ## Unbound Optimization and Speed Tweaks ###
105
106 # the number of slabs to use for cache and must be a power of 2 times the
107 # number of num-threads set above. more slabs reduce lock contention, but
108 # fragment memory usage.
109 msg-cache-slabs: 8
110 rrset-cache-slabs: 8
111 infra-cache-slabs: 8
112 key-cache-slabs: 8
113
114 # Increase the memory size of the cache. Use roughly twice as much rrset cache
115 # memory as you use msg cache memory. Due to malloc overhead, the total memory
116 # usage is likely to rise to double (or 2.5x) the total cache memory. The test
117 # box has 4gig of ram so 256meg for rrset allows a lot of room for cacheed objects.
118 rrset-cache-size: 64m
119 msg-cache-size: 32m
120
121 # buffer size for UDP port 53 incoming (SO_RCVBUF socket option). This sets
122 # the kernel buffer larger so that no messages are lost in spikes in the traffic.
123 so-rcvbuf: 1m
124
125 ## Unbound Optimization and Speed Tweaks ###
126
127
128 # Enforce privacy of these addresses. Strips them away from answers. It may
129 # cause DNSSEC validation to additionally mark it as bogus. Protects against
130 # 'DNS Rebinding' (uses browser as network proxy). Only 'private-domain' and
131 # 'local-data' names are allowed to have these private addresses. No default.
132 private-address: 10.0.0.0/8
133 private-address: 172.16.0.0/12
134 private-address: 10.0.0.0/16
135 private-address: 192.254.0.0/16
136
137 # Allow the domain (and its subdomains) to contain private addresses.
138 # local-data statements are allowed to contain private addresses too.
139 private-domain: "wleiden.net"
140
141 # If nonzero, unwanted replies are not only reported in statistics, but also
142 # a running total is kept per thread. If it reaches the threshold, a warning
143 # is printed and a defensive action is taken, the cache is cleared to flush
144 # potential poison out of it. A suggested value is 10000000, the default is
145 # 0 (turned off). We think 10K is a good value.
146 unwanted-reply-threshold: 10000
147
148 # IMPORTANT FOR TESTING: If you are testing and setup NSD or BIND on
149 # localhost you will want to allow the resolver to send queries to localhost.
150 # Make sure to set do-not-query-localhost: yes . If yes, the above default
151 # do-not-query-address entries are present. if no, localhost can be queried
152 # (for testing and debugging).
153 do-not-query-localhost: no
154
155 # File with trusted keys, kept up to date using RFC5011 probes, initial file
156 # like trust-anchor-file, then it stores metadata. Use several entries, one
157 # per domain name, to track multiple zones. If you use forward-zone below to
158 # query the Google DNS servers you MUST comment out this option or all DNS
159 # queries will fail.
160 # auto-trust-anchor-file: "/var/unbound/etc/root.key"
161
162 # Should additional section of secure message also be kept clean of unsecure
163 # data. Useful to shield the users of this validator from potential bogus
164 # data in the additional section. All unsigned data in the additional section
165 # is removed from secure messages.
166 val-clean-additional: yes
167
168 # Blocking Ad Server domains. Google's AdSense, DoubleClick and Yahoo
169 # account for a 70 percent share of all advertising traffic. Block them.
170 local-zone: "doubleclick.net" redirect
171 local-data: "doubleclick.net A 127.0.0.1"
172 local-zone: "googlesyndication.com" redirect
173 local-data: "googlesyndication.com A 127.0.0.1"
174 local-zone: "googleadservices.com" redirect
175 local-data: "googleadservices.com A 127.0.0.1"
176 local-zone: "google-analytics.com" redirect
177 local-data: "google-analytics.com A 127.0.0.1"
178 local-zone: "ads.youtube.com" redirect
179 local-data: "ads.youtube.com A 127.0.0.1"
180 local-zone: "adserver.yahoo.com" redirect
181 local-data: "adserver.yahoo.com A 127.0.0.1"
182
183
184 # Unbound will not load if you specify the same local-zone and local-data
185 # servers in the main configuration as well as in this "include:" file. We
186 # suggest commenting out any of the local-zone and local-data lines above if
187 # you suspect they could be included in the unbound_ad_servers servers file.
188 #include: "/usr/local/etc/unbound/unbound_ad_servers"
189
190 # locally served zones can be configured for the machines on the LAN.
191
192 local-zone: "wleiden.net" static
193
194# local-data: "firewall.home.lan. IN A 10.0.0.1"
195# local-data: "laptop.home.lan. IN A 10.0.0.2"
196# local-data: "xboxone.home.lan. IN A 10.0.0.3"
197# local-data: "ps4.home.lan. IN A 10.0.0.4"
198# local-data: "dhcp5.home.lan. IN A 10.0.0.5"
199# local-data: "dhcp6.home.lan. IN A 10.0.0.6"
200# local-data: "dhcp7.home.lan. IN A 10.0.0.7"
201
202# local-data-ptr: "10.0.0.1 firewall.home.lan"
203# local-data-ptr: "10.0.0.2 laptop.home.lan"
204# local-data-ptr: "10.0.0.3 xboxone.home.lan"
205# local-data-ptr: "10.0.0.4 ps4.home.lan"
206# local-data-ptr: "10.0.0.5 dhcp5.home.lan"
207# local-data-ptr: "10.0.0.6 dhcp6.home.lan"
208# local-data-ptr: "10.0.0.7 dhcp7.home.lan"
209
210 # Unbound can query your NSD or BIND server for private domain queries too.
211 # On our NSD page we have NSD configured to serve the private domain,
212 # "home.lan". Here we can tell Unbound to connect to the NSD server when it
213 # needs to resolve a *.home.lan hostname or IP.
214 #
215 # private-domain: "home.lan"
216 # local-zone: "0.0.10.in-addr.arpa." nodefault
217 # stub-zone:
218 # name: "home.lan"
219 # stub-addr: 10.0.0.111@53
220
221#
222# include: stub-zone ?????
223#
224
225
226 # If you have an internal or private DNS names the external DNS servers can
227 # not resolve, then you can assign domain name strings to be redirected to a
228 # seperate dns server. For example, our comapny has the domain
229 # organization.com and the domain name internal.organization.com can not be
230 # resolved by Google's public DNS, but can be resolved by our private DNS
231 # server located at 1.1.1.1. The following tells Unbound that any
232 # organization.com domain, i.e. *.organization.com be dns resolved by 1.1.1.1
233 # instead of the public dns servers.
234 #
235 # forward-zone:
236 # name: "organization.com"
237 # forward-addr: 1.1.1.1 # Internal or private DNS
238
239 # Use the following forward-zone to forward all queries to Google DNS,
240 # OpenDNS.com or your local ISP's dns servers for example. To test resolution
241 # speeds use "drill calomel.org @8.8.8.8" and look for the "Query time:" in
242 # milliseconds.
243 #
244 forward-zone:
245 name: "."
246 forward-addr: 8.8.8.8 # Google Public DNS
247 forward-addr: 74.82.42.42 # Hurricane Electric
248 forward-addr: 4.2.2.4 # Level3 Verizon
249
250#
251# include:forward-zone ?????
252#
253#
254## Authoritative, validating, recursive caching DNS
255## unbound.conf -- https://calomel.org
256
Note: See TracBrowser for help on using the repository browser.