Revision e92ee598
Added by Phil Davis about 10 years ago
usr/local/www/services_unbound_advanced.php | ||
---|---|---|
42 | 42 |
require_once("guiconfig.inc"); |
43 | 43 |
require_once("unbound.inc"); |
44 | 44 |
|
45 |
if(!is_array($config['unbound'])) { |
|
45 |
if (!is_array($config['unbound'])) {
|
|
46 | 46 |
$config['unbound'] = array(); |
47 | 47 |
} |
48 | 48 |
|
49 | 49 |
if (isset($config['unbound']['hideidentity'])) { |
50 | 50 |
$pconfig['hideidentity'] = true; |
51 | 51 |
} |
52 |
if (isset($config['unbound']['hideversion'])){ |
|
52 |
if (isset($config['unbound']['hideversion'])) {
|
|
53 | 53 |
$pconfig['hideversion'] = true; |
54 | 54 |
} |
55 | 55 |
if (isset($config['unbound']['prefetch'])) { |
... | ... | |
133 | 133 |
if (isset($_POST['dnssecstripped']) && !isset($config['unbound']['dnssec'])) { |
134 | 134 |
$input_errors[] = "Harden DNSSEC Data option can only be enabled if DNSSEC support is enabled."; |
135 | 135 |
} |
136 |
|
|
136 |
|
|
137 | 137 |
if (!$input_errors) { |
138 | 138 |
|
139 | 139 |
if (isset($_POST['hideidentity'])) { |
... | ... | |
184 | 184 |
unset($config['unbound']['use_caps']); |
185 | 185 |
} |
186 | 186 |
write_config("DNS Resolver configured."); |
187 |
|
|
187 |
|
|
188 | 188 |
mark_subsystem_dirty('unbound'); |
189 | 189 |
} |
190 | 190 |
} |
191 | 191 |
} |
192 | 192 |
|
193 | 193 |
$closehead = false; |
194 |
$pgtitle = array(gettext("Services"),gettext("DNS Resolver"),gettext("Advanced"));
|
|
194 |
$pgtitle = array(gettext("Services"), gettext("DNS Resolver"), gettext("Advanced"));
|
|
195 | 195 |
$shortcut_section = "resolver"; |
196 | 196 |
include_once("head.inc"); |
197 | 197 |
|
198 | 198 |
?> |
199 | 199 |
|
200 | 200 |
</head> |
201 |
|
|
201 |
|
|
202 | 202 |
<body> |
203 | 203 |
<?php include("fbegin.inc"); ?> |
204 | 204 |
<form action="services_unbound_advanced.php" method="post" name="iform" id="iform"> |
... | ... | |
266 | 266 |
<tr> |
267 | 267 |
<td width="22%" valign="top" class="vncell"><?=gettext("Message Cache Size");?></td> |
268 | 268 |
<td width="78%" class="vtable"> |
269 |
<select id="msgcachesize" name="msgcachesize">
|
|
269 |
<select id="msgcachesize" name="msgcachesize"> |
|
270 | 270 |
<?php |
271 | 271 |
foreach (array("4", "10", "20", "50", "100", "250", "512") as $size) : |
272 | 272 |
?> |
... | ... | |
276 | 276 |
<?php |
277 | 277 |
endforeach; |
278 | 278 |
?> |
279 |
</select><br />
|
|
280 |
<?=gettext("Size of the message cache. The message cache stores DNS rcodes and validation statuses. The RRSet cache will automatically be set to twice this amount. The RRSet cache contains the actual RR data. The default is 4 megabytes.");?>
|
|
279 |
</select><br /> |
|
280 |
<?=gettext("Size of the message cache. The message cache stores DNS rcodes and validation statuses. The RRSet cache will automatically be set to twice this amount. The RRSet cache contains the actual RR data. The default is 4 megabytes.");?> |
|
281 | 281 |
</td> |
282 | 282 |
</tr> |
283 | 283 |
<tr> |
284 | 284 |
<td width="22%" valign="top" class="vncell"><?=gettext("Outgoing TCP Buffers");?></td> |
285 | 285 |
<td width="78%" class="vtable"> |
286 |
<select id="outgoing_num_tcp" name="outgoing_num_tcp">
|
|
286 |
<select id="outgoing_num_tcp" name="outgoing_num_tcp"> |
|
287 | 287 |
<?php |
288 | 288 |
for ($num_tcp = 0; $num_tcp <= 50; $num_tcp += 10): |
289 | 289 |
?> |
... | ... | |
293 | 293 |
<?php |
294 | 294 |
endfor; |
295 | 295 |
?> |
296 |
</select><br />
|
|
297 |
<?=gettext("The number of outgoing TCP buffers to allocate per thread. The default value is 10. If 0 is selected then no TCP queries, to authoritative servers, are done.");?>
|
|
296 |
</select><br /> |
|
297 |
<?=gettext("The number of outgoing TCP buffers to allocate per thread. The default value is 10. If 0 is selected then no TCP queries, to authoritative servers, are done.");?> |
|
298 | 298 |
</td> |
299 | 299 |
</tr> |
300 | 300 |
<tr> |
301 | 301 |
<td width="22%" valign="top" class="vncell"><?=gettext("Incoming TCP Buffers");?></td> |
302 | 302 |
<td width="78%" class="vtable"> |
303 |
<select id="incoming_num_tcp" name="incoming_num_tcp">
|
|
303 |
<select id="incoming_num_tcp" name="incoming_num_tcp"> |
|
304 | 304 |
<?php |
305 | 305 |
for ($num_tcp = 0; $num_tcp <= 50; $num_tcp += 10): |
306 | 306 |
?> |
... | ... | |
310 | 310 |
<?php |
311 | 311 |
endfor; |
312 | 312 |
?> |
313 |
</select><br />
|
|
314 |
<?=gettext("The number of incoming TCP buffers to allocate per thread. The default value is 10. If 0 is selected then no TCP queries, from clients, are accepted.");?>
|
|
313 |
</select><br /> |
|
314 |
<?=gettext("The number of incoming TCP buffers to allocate per thread. The default value is 10. If 0 is selected then no TCP queries, from clients, are accepted.");?> |
|
315 | 315 |
</td> |
316 | 316 |
</tr> |
317 | 317 |
<tr> |
318 | 318 |
<td width="22%" valign="top" class="vncell"><?=gettext("EDNS Buffer Size");?></td> |
319 | 319 |
<td width="78%" class="vtable"> |
320 |
<select id="edns_buffer_size" name="edns_buffer_size">
|
|
320 |
<select id="edns_buffer_size" name="edns_buffer_size"> |
|
321 | 321 |
<?php |
322 | 322 |
foreach (array("512", "1480", "4096") as $size) : |
323 | 323 |
?> |
... | ... | |
327 | 327 |
<?php |
328 | 328 |
endforeach; |
329 | 329 |
?> |
330 |
</select><br />
|
|
331 |
<?=gettext("Number of bytes size to advertise as the EDNS reassembly buffer size. This is the value that is used in UDP datagrams sent to peers. RFC recommendation is 4096 (which is the default). If you have fragmentation reassemble problems, usually seen as timeouts, then a value of 1480 should help. The 512 value bypasses most MTU path problems, but it can generate an excessive amount of TCP fallback.");?>
|
|
330 |
</select><br /> |
|
331 |
<?=gettext("Number of bytes size to advertise as the EDNS reassembly buffer size. This is the value that is used in UDP datagrams sent to peers. RFC recommendation is 4096 (which is the default). If you have fragmentation reassemble problems, usually seen as timeouts, then a value of 1480 should help. The 512 value bypasses most MTU path problems, but it can generate an excessive amount of TCP fallback.");?> |
|
332 | 332 |
</td> |
333 | 333 |
</tr> |
334 | 334 |
<tr> |
335 | 335 |
<td width="22%" valign="top" class="vncell"><?=gettext("Number of queries per thread");?></td> |
336 | 336 |
<td width="78%" class="vtable"> |
337 |
<select id="num_queries_per_thread" name="num_queries_per_thread">
|
|
337 |
<select id="num_queries_per_thread" name="num_queries_per_thread"> |
|
338 | 338 |
<?php |
339 | 339 |
foreach (array("512", "1024", "2048") as $queries) : |
340 | 340 |
?> |
... | ... | |
344 | 344 |
<?php |
345 | 345 |
endforeach; |
346 | 346 |
?> |
347 |
</select><br />
|
|
348 |
<?=gettext("The number of queries that every thread will service simultaneously. If more queries arrive that need to be serviced, and no queries can be jostled, then these queries are dropped.");?>
|
|
347 |
</select><br /> |
|
348 |
<?=gettext("The number of queries that every thread will service simultaneously. If more queries arrive that need to be serviced, and no queries can be jostled, then these queries are dropped.");?> |
|
349 | 349 |
</td> |
350 | 350 |
</tr> |
351 | 351 |
<tr> |
352 | 352 |
<td width="22%" valign="top" class="vncell"><?=gettext("Jostle Timeout");?></td> |
353 | 353 |
<td width="78%" class="vtable"> |
354 |
<select id="jostle_timeout" name="jostle_timeout">
|
|
354 |
<select id="jostle_timeout" name="jostle_timeout"> |
|
355 | 355 |
<?php |
356 | 356 |
foreach (array("100", "200", "500", "1000") as $timeout) : |
357 | 357 |
?> |
... | ... | |
361 | 361 |
<?php |
362 | 362 |
endforeach; |
363 | 363 |
?> |
364 |
</select><br />
|
|
365 |
<?=gettext("This timeout is used for when the server is very busy. This protects against denial of service by slow queries or high query rates. The default value is 200 milliseconds.");?>
|
|
364 |
</select><br /> |
|
365 |
<?=gettext("This timeout is used for when the server is very busy. This protects against denial of service by slow queries or high query rates. The default value is 200 milliseconds.");?> |
|
366 | 366 |
</td> |
367 | 367 |
</tr> |
368 | 368 |
<tr> |
369 | 369 |
<td width="22%" valign="top" class="vncell"><?=gettext("Maximum TTL for RRsets and messages");?></td> |
370 | 370 |
<td width="78%" class="vtable"> |
371 |
<input type="text" id="cache_max_ttl" name="cache_max_ttl" size="5" value="<?php if(isset($pconfig['cache_max_ttl'])) echo $pconfig['cache_max_ttl']; ?>" /><br />
|
|
372 |
<?=gettext("Configure a maximum Time to live for RRsets and messages in the cache. The default is 86400 seconds (1 day). When the internal TTL expires the cache item is expired. This can be configured to force the resolver to query for data more often and not trust (very large) TTL values.");?>
|
|
371 |
<input type="text" id="cache_max_ttl" name="cache_max_ttl" size="5" value="<?php if (isset($pconfig['cache_max_ttl'])) echo $pconfig['cache_max_ttl']; ?>" /><br />
|
|
372 |
<?=gettext("Configure a maximum Time to live for RRsets and messages in the cache. The default is 86400 seconds (1 day). When the internal TTL expires the cache item is expired. This can be configured to force the resolver to query for data more often and not trust (very large) TTL values.");?> |
|
373 | 373 |
</td> |
374 | 374 |
</tr> |
375 | 375 |
<tr> |
376 | 376 |
<td width="22%" valign="top" class="vncell"><?=gettext("Minimum TTL for RRsets and messages");?></td> |
377 | 377 |
<td width="78%" class="vtable"> |
378 |
<input type="text" id="cache_min_ttl" name="cache_min_ttl" size="5" value="<?php if(isset($pconfig['cache_min_ttl'])) echo $pconfig['cache_min_ttl']; ?>" /><br />
|
|
379 |
<?=gettext("Configure a minimum Time to live for RRsets and messages in the cache. The default is 0 seconds. If the minimum value kicks in, the data is cached for longer than the domain owner intended, and thus less queries are made to look up the data. The 0 value ensures the data in the cache is as the domain owner intended. High values can lead to trouble as the data in the cache might not match up with the actual data anymore.");?>
|
|
378 |
<input type="text" id="cache_min_ttl" name="cache_min_ttl" size="5" value="<?php if (isset($pconfig['cache_min_ttl'])) echo $pconfig['cache_min_ttl']; ?>" /><br />
|
|
379 |
<?=gettext("Configure a minimum Time to live for RRsets and messages in the cache. The default is 0 seconds. If the minimum value kicks in, the data is cached for longer than the domain owner intended, and thus less queries are made to look up the data. The 0 value ensures the data in the cache is as the domain owner intended. High values can lead to trouble as the data in the cache might not match up with the actual data anymore.");?> |
|
380 | 380 |
</td> |
381 | 381 |
</tr> |
382 | 382 |
<tr> |
383 | 383 |
<td width="22%" valign="top" class="vncell"><?=gettext("TTL for Host cache entries");?></td> |
384 | 384 |
<td width="78%" class="vtable"> |
385 |
<select id="infra_host_ttl" name="infra_host_ttl">
|
|
386 |
<option value="60" <?php if ($pconfig['infra_host_ttl'] == "60") echo "selected=\"selected\""; ?>>1 minute</option>
|
|
387 |
<option value="120" <?php if ($pconfig['infra_host_ttl'] == "120") echo "selected=\"selected\""; ?>>2 minutes</option>
|
|
388 |
<option value="300" <?php if ($pconfig['infra_host_ttl'] == "300") echo "selected=\"selected\""; ?>>5 minutes</option>
|
|
389 |
<option value="600" <?php if ($pconfig['infra_host_ttl'] == "600") echo "selected=\"selected\""; ?>>10 minutes</option>
|
|
390 |
<option value="900" <?php if ($pconfig['infra_host_ttl'] == "900") echo "selected=\"selected\""; ?>>15 minutes</option>
|
|
391 |
</select><br />
|
|
392 |
<?=gettext("Time to live for entries in the host cache. The host cache contains roundtrip timing, lameness and EDNS support information. The default is 15 minutes.");?>
|
|
385 |
<select id="infra_host_ttl" name="infra_host_ttl"> |
|
386 |
<option value="60" <?php if ($pconfig['infra_host_ttl'] == "60") echo "selected=\"selected\""; ?>>1 minute</option> |
|
387 |
<option value="120" <?php if ($pconfig['infra_host_ttl'] == "120") echo "selected=\"selected\""; ?>>2 minutes</option> |
|
388 |
<option value="300" <?php if ($pconfig['infra_host_ttl'] == "300") echo "selected=\"selected\""; ?>>5 minutes</option> |
|
389 |
<option value="600" <?php if ($pconfig['infra_host_ttl'] == "600") echo "selected=\"selected\""; ?>>10 minutes</option> |
|
390 |
<option value="900" <?php if ($pconfig['infra_host_ttl'] == "900") echo "selected=\"selected\""; ?>>15 minutes</option> |
|
391 |
</select><br /> |
|
392 |
<?=gettext("Time to live for entries in the host cache. The host cache contains roundtrip timing, lameness and EDNS support information. The default is 15 minutes.");?> |
|
393 | 393 |
</td> |
394 | 394 |
</tr> |
395 | 395 |
<tr> |
396 | 396 |
<td width="22%" valign="top" class="vncell"><?=gettext("Number of Hosts to cache");?></td> |
397 | 397 |
<td width="78%" class="vtable"> |
398 |
<select id="infra_cache_numhosts" name="infra_cache_numhosts">
|
|
399 |
<option value="1000" <?php if ($pconfig['infra_cache_numhosts'] == "1000") echo "selected=\"selected\""; ?>>1000</option>
|
|
400 |
<option value="5000" <?php if ($pconfig['infra_cache_numhosts'] == "5000") echo "selected=\"selected\""; ?>>5000</option>
|
|
401 |
<option value="10000" <?php if ($pconfig['infra_cache_numhosts'] == "10000") echo "selected=\"selected\""; ?>>10 000</option>
|
|
402 |
<option value="20000" <?php if ($pconfig['infra_cache_numhosts'] == "20000") echo "selected=\"selected\""; ?>>20 000</option>
|
|
403 |
<option value="50000" <?php if ($pconfig['infra_cache_numhosts'] == "50000") echo "selected=\"selected\""; ?>>50 000</option>
|
|
404 |
</select><br />
|
|
405 |
<?=gettext("Number of hosts for which information is cached. The default is 10,000.");?>
|
|
398 |
<select id="infra_cache_numhosts" name="infra_cache_numhosts"> |
|
399 |
<option value="1000" <?php if ($pconfig['infra_cache_numhosts'] == "1000") echo "selected=\"selected\""; ?>>1000</option> |
|
400 |
<option value="5000" <?php if ($pconfig['infra_cache_numhosts'] == "5000") echo "selected=\"selected\""; ?>>5000</option> |
|
401 |
<option value="10000" <?php if ($pconfig['infra_cache_numhosts'] == "10000") echo "selected=\"selected\""; ?>>10 000</option> |
|
402 |
<option value="20000" <?php if ($pconfig['infra_cache_numhosts'] == "20000") echo "selected=\"selected\""; ?>>20 000</option> |
|
403 |
<option value="50000" <?php if ($pconfig['infra_cache_numhosts'] == "50000") echo "selected=\"selected\""; ?>>50 000</option> |
|
404 |
</select><br /> |
|
405 |
<?=gettext("Number of hosts for which information is cached. The default is 10,000.");?> |
|
406 | 406 |
</td> |
407 | 407 |
</tr> |
408 | 408 |
<tr> |
409 | 409 |
<td width="22%" valign="top" class="vncell"><?=gettext("Unwanted Reply Threshold");?></td> |
410 | 410 |
<td width="78%" class="vtable"> |
411 |
<select id="unwanted_reply_threshold" name="unwanted_reply_threshold">
|
|
412 |
<option value="disabled" <?php if ($pconfig['unwanted_reply_threshold'] == "disabled") echo "selected=\"selected\""; ?>>disabled</option>
|
|
413 |
<option value="5000000" <?php if ($pconfig['unwanted_reply_threshold'] == "5000000") echo "selected=\"selected\""; ?>>5 million</option>
|
|
414 |
<option value="10000000" <?php if ($pconfig['unwanted_reply_threshold'] == "10000000") echo "selected=\"selected\""; ?>>10 million</option>
|
|
415 |
<option value="20000000" <?php if ($pconfig['unwanted_reply_threshold'] == "20000000") echo "selected=\"selected\""; ?>>20 million</option>
|
|
416 |
<option value="40000000" <?php if ($pconfig['unwanted_reply_threshold'] == "40000000") echo "selected=\"selected\""; ?>>40 million</option>
|
|
417 |
<option value="50000000" <?php if ($pconfig['unwanted_reply_threshold'] == "50000000") echo "selected=\"selected\""; ?>>50 million</option>
|
|
418 |
</select><br />
|
|
419 |
<?=gettext("If enabled, a total number of unwanted replies is kept track of in every thread. When it reaches the threshold, a defensive action is taken and a warning is printed to the log file. This defensive action is to clear the RRSet and message caches, hopefully flushing away any poison. The default is disabled, but if enabled a value of 10 million is suggested.");?>
|
|
411 |
<select id="unwanted_reply_threshold" name="unwanted_reply_threshold"> |
|
412 |
<option value="disabled" <?php if ($pconfig['unwanted_reply_threshold'] == "disabled") echo "selected=\"selected\""; ?>>disabled</option> |
|
413 |
<option value="5000000" <?php if ($pconfig['unwanted_reply_threshold'] == "5000000") echo "selected=\"selected\""; ?>>5 million</option> |
|
414 |
<option value="10000000" <?php if ($pconfig['unwanted_reply_threshold'] == "10000000") echo "selected=\"selected\""; ?>>10 million</option> |
|
415 |
<option value="20000000" <?php if ($pconfig['unwanted_reply_threshold'] == "20000000") echo "selected=\"selected\""; ?>>20 million</option> |
|
416 |
<option value="40000000" <?php if ($pconfig['unwanted_reply_threshold'] == "40000000") echo "selected=\"selected\""; ?>>40 million</option> |
|
417 |
<option value="50000000" <?php if ($pconfig['unwanted_reply_threshold'] == "50000000") echo "selected=\"selected\""; ?>>50 million</option> |
|
418 |
</select><br /> |
|
419 |
<?=gettext("If enabled, a total number of unwanted replies is kept track of in every thread. When it reaches the threshold, a defensive action is taken and a warning is printed to the log file. This defensive action is to clear the RRSet and message caches, hopefully flushing away any poison. The default is disabled, but if enabled a value of 10 million is suggested.");?> |
|
420 | 420 |
</td> |
421 | 421 |
</tr> |
422 | 422 |
<tr> |
423 | 423 |
<td width="22%" valign="top" class="vncell"><?=gettext("Log level verbosity");?></td> |
424 | 424 |
<td width="78%" class="vtable"> |
425 |
<select id="log_verbosity" name="log_verbosity">
|
|
425 |
<select id="log_verbosity" name="log_verbosity"> |
|
426 | 426 |
<?php |
427 | 427 |
for ($level = 0; $level <= 5; $level++): |
428 | 428 |
?> |
... | ... | |
432 | 432 |
<?php |
433 | 433 |
endfor; |
434 | 434 |
?> |
435 |
</select><br />
|
|
436 |
<?=gettext("Select the log verbosity.");?>
|
|
435 |
</select><br /> |
|
436 |
<?=gettext("Select the log verbosity.");?> |
|
437 | 437 |
</td> |
438 | 438 |
</tr> |
439 | 439 |
<tr> |
Also available in: Unified diff
Code style services unbound