Project

General

Profile

« Previous | Next » 

Revision 2783e408

Added by Renato Botelho almost 11 years ago

Revert "Indent better"

This reverts commit a431bfc9e698c753d9a54218af9076184deb6251.

View differences:

usr/local/www/services_unbound_advanced.php
42 42
require_once("unbound.inc");
43 43

  
44 44
if(!is_array($config['unbound'])) {
45
    $config['unbound'] = array();
45
	$config['unbound'] = array();
46 46
}
47 47

  
48 48
if (isset($config['unbound']['hideidentity'])) {
49
    $pconfig['hideidentity'] = true;
49
	$pconfig['hideidentity'] = true;
50 50
}
51 51
if (isset($config['unbound']['hideversion'])){
52
    $pconfig['hideversion'] = true;
52
	$pconfig['hideversion'] = true;
53 53
}
54 54
if (isset($config['unbound']['prefetch'])) {
55
    $pconfig['prefetch'] = true;
55
	$pconfig['prefetch'] = true;
56 56
}
57 57
if (isset($config['unbound']['prefetchkey'])) {
58
    $pconfig['prefetchkey'] = true;
58
	$pconfig['prefetchkey'] = true;
59 59
}
60 60
if (isset($config['unbound']['hardenglue'])) {
61
    $pconfig['hardenglue'] = true;
61
	$pconfig['hardenglue'] = true;
62 62
}
63 63
if (isset($config['unbound']['dnssecstripped'])) {
64
    $pconfig['dnssecstripped'] = true;
64
	$pconfig['dnssecstripped'] = true;
65 65
}
66 66

  
67 67
$pconfig['msgcachesize'] = $config['unbound']['msgcachesize'];
......
79 79
$pconfig['log_verbosity'] = isset($config['unbound']['log_verbosity']) ? $config['unbound']['log_verbosity'] : "1";
80 80

  
81 81
if ($_POST) {
82
    $pconfig = $_POST;
82
	$pconfig = $_POST;
83 83

  
84
    if ($_POST['apply']) {
85
        $retval = services_unbound_configure();
86
        $savemsg = get_std_save_message($retval);
87
        if ($retval == 0) {
88
            clear_subsystem_dirty('unbound');
84
	if ($_POST['apply']) {
85
		$retval = services_unbound_configure();
86
		$savemsg = get_std_save_message($retval);
87
		if ($retval == 0) {
88
			clear_subsystem_dirty('unbound');
89 89
        }
90
    } else {
91
        if (isset($_POST['hideidentity'])) {
92
            $config['unbound']['hideidentity'] = true;
90
	} else {
91
		if (isset($_POST['hideidentity'])) {
92
			$config['unbound']['hideidentity'] = true;
93 93
        } else {
94
            unset($config['unbound']['hideidentity']);
94
			unset($config['unbound']['hideidentity']);
95 95
        }
96
        if (isset($_POST['hideversion'])) {
97
            $config['unbound']['hideversion'] = true;
96
		if (isset($_POST['hideversion'])) {
97
			$config['unbound']['hideversion'] = true;
98 98
        } else {
99
            unset($config['unbound']['hideversion']);
99
			unset($config['unbound']['hideversion']);
100 100
        }
101
        if (isset($_POST['prefetch'])) {
102
            $config['unbound']['prefetch'] = true;
101
		if (isset($_POST['prefetch'])) {
102
			$config['unbound']['prefetch'] = true;
103 103
        } else {
104
            unset($config['unbound']['prefetch']);
104
			unset($config['unbound']['prefetch']);
105 105
        }
106
        if (isset($_POST['prefetchkey'])) {
107
            $config['unbound']['prefetchkey'] = true;
106
		if (isset($_POST['prefetchkey'])) {
107
			$config['unbound']['prefetchkey'] = true;
108 108
        } else {
109
            unset($config['unbound']['prefetchkey']);
109
			unset($config['unbound']['prefetchkey']);
110 110
        }
111
        if (isset($_POST['hardenglue'])) {
112
            $config['unbound']['hardenglue'] = true;
111
		if (isset($_POST['hardenglue'])) {
112
			$config['unbound']['hardenglue'] = true;
113 113
        } else {
114
            unset($config['unbound']['hardenglue']);
114
			unset($config['unbound']['hardenglue']);
115 115
        }
116
        if (isset($_POST['dnssecstripped'])) {
117
            $config['unbound']['dnssecstripped'] = true;
116
		if (isset($_POST['dnssecstripped'])) {
117
			$config['unbound']['dnssecstripped'] = true;
118 118
        } else {
119
            unset($config['unbound']['dnssecstripped']);
119
			unset($config['unbound']['dnssecstripped']);
120 120
        }
121
        $config['unbound']['msgcachesize'] = $_POST['msgcachesize'];
122
        $config['unbound']['outgoing_num_tcp'] = $_POST['outgoing_num_tcp'];
123
        $config['unbound']['incoming_num_tcp'] = $_POST['incoming_num_tcp'];
124
        $config['unbound']['edns_buffer_size'] = $_POST['edns_buffer_size'];
125
        $config['unbound']['num_queries_per_thread'] = $_POST['num_queries_per_thread'];
126
        $config['unbound']['jostle_timeout'] = $_POST['jostle_timeout'];
127
        $config['unbound']['cache_max_ttl'] = $_POST['cache_max_ttl'];
128
        $config['unbound']['cache_min_ttl'] = $_POST['cache_min_ttl'];
129
        $config['unbound']['infra_host_ttl'] = $_POST['infra_host_ttl'];
130
        $config['unbound']['infra_lame_ttl'] = $_POST['infra_lame_ttl'];
131
        $config['unbound']['infra_cache_numhosts'] = $_POST['infra_cache_numhosts'];
132
        $config['unbound']['unwanted_reply_threshold'] = $_POST['unwanted_reply_threshold'];
133
        $config['unbound']['log_verbosity'] = $_POST['log_verbosity'];
134
        write_config("DNS Resolver configured.");
121
		$config['unbound']['msgcachesize'] = $_POST['msgcachesize'];
122
		$config['unbound']['outgoing_num_tcp'] = $_POST['outgoing_num_tcp'];
123
		$config['unbound']['incoming_num_tcp'] = $_POST['incoming_num_tcp'];
124
		$config['unbound']['edns_buffer_size'] = $_POST['edns_buffer_size'];
125
		$config['unbound']['num_queries_per_thread'] = $_POST['num_queries_per_thread'];
126
		$config['unbound']['jostle_timeout'] = $_POST['jostle_timeout'];
127
		$config['unbound']['cache_max_ttl'] = $_POST['cache_max_ttl'];
128
		$config['unbound']['cache_min_ttl'] = $_POST['cache_min_ttl'];
129
		$config['unbound']['infra_host_ttl'] = $_POST['infra_host_ttl'];
130
		$config['unbound']['infra_lame_ttl'] = $_POST['infra_lame_ttl'];
131
		$config['unbound']['infra_cache_numhosts'] = $_POST['infra_cache_numhosts'];
132
		$config['unbound']['unwanted_reply_threshold'] = $_POST['unwanted_reply_threshold'];
133
		$config['unbound']['log_verbosity'] = $_POST['log_verbosity'];
134
		write_config("DNS Resolver configured.");
135 135

  
136
        mark_subsystem_dirty('unbound');
137
    }
136
		mark_subsystem_dirty('unbound');
137
	}
138 138
}
139 139

  
140 140
$closehead = false;
......
144 144
?>
145 145

  
146 146
</head>
147

  
147
	
148 148
<body>
149 149
<?php include("fbegin.inc"); ?>
150 150
<form action="services_unbound_advanced.php" method="post" name="iform" id="iform">
151 151
<?php if ($input_errors) print_input_errors($input_errors); ?>
152 152
<?php if ($savemsg) print_info_box($savemsg); ?>
153 153
<?php if (is_subsystem_dirty('unbound')): ?><br/>
154
    <?php print_info_box_np(gettext("The configuration of the DNS Resolver, has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
154
<?php print_info_box_np(gettext("The configuration of the DNS Resolver, has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?><br />
155 155
<?php endif; ?>
156 156
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="services unbound advanced">
157
<tbody>
158
<tr>
159
    <td class="tabnavtbl">
160
        <?php
161
        $tab_array = array();
162
        $tab_array[] = array(gettext("General settings"), false, "services_unbound.php");
163
        $tab_array[] = array(gettext("Advanced settings"), true, "services_unbound_advanced.php");
164
        $tab_array[] = array(gettext("Access Lists"), false, "/services_unbound_acls.php");
165
        display_top_tabs($tab_array, true);
166
        ?>
167
    </td>
168
</tr>
169
<tr>
170
<td id="mainarea">
171
<div class="tabcont">
172
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
173
<tbody>
174
<tr>
175
    <td colspan="2" valign="top" class="listtopic"><?=gettext("Advanced Resolver Options");?></td>
176
</tr>
177
<tr>
178
    <td width="22%" valign="top" class="vncell"><?=gettext("Hide Identity");?></td>
179
    <td width="78%" class="vtable">
180
        <p><input name="hideidentity" type="checkbox" id="hideidentity" value="yes" <?php if (isset($pconfig['hideidentity'])) echo "checked=\"checked\"";?> /><br />
181
            <?=gettext("If enabled, id.server and hostname.bind queries are refused.");?></p>
182
    </td>
183
</tr>
184
<tr>
185
    <td width="22%" valign="top" class="vncell"><?=gettext("Hide Version");?></td>
186
    <td width="78%" class="vtable">
187
        <p><input name="hideversion" type="checkbox" id="hideversion" value="yes" <?php if (isset($pconfig['hideversion'])) echo "checked=\"checked\"";?> /><br />
188
            <?=gettext("If enabled, version.server and version.bind queries are refused.");?></p>
189
    </td>
190
</tr>
191
<tr>
192
    <td width="22%" valign="top" class="vncell"><?=gettext("Prefetch Support");?></td>
193
    <td width="78%" class="vtable">
194
        <p><input name="prefetch" type="checkbox" id="prefetch" value="yes" <?php if (isset($pconfig['prefetch'])) echo "checked=\"checked\"";?> /><br />
195
            <?=gettext("Message cache elements are prefetched before they expire to help keep the cache up to date. When enabled, this option can cause an increase of around 10% more DNS traffic and load on the server, but frequently requested items will not expire from the cache.");?></p>
196
    </td>
197
</tr>
198
<tr>
199
    <td width="22%" valign="top" class="vncell"><?=gettext("Prefetch DNS Key Support");?></td>
200
    <td width="78%" class="vtable">
201
        <p><input name="prefetchkey" type="checkbox" id="prefetchkey" value="yes" <?php if (isset($pconfig['prefetchkey'])) echo "checked=\"checked\"";?> /><br />
202
            <?=sprintf(gettext("DNSKEY's are fetched earlier in the validation process when a %sDelegation signer%s is encountered. This helps lower the latency of requests but does utilize a little more CPU."), "<a href='http://en.wikipedia.org/wiki/List_of_DNS_record_types'>", "</a>");?></p>
203
    </td>
204
</tr>
205
<tr>
206
    <td width="22%" valign="top" class="vncell"><?=gettext("Harden Glue");?></td>
207
    <td width="78%" class="vtable">
208
        <p><input name="hardenglue" type="checkbox" id="hardenglue" value="yes" <?php if (isset($pconfig['hardenglue'])) echo "checked=\"checked\"";?> /><br />
209
            <?=gettext("Only trust glue if it is within the servers authority.");?></p>
210
    </td>
211
</tr>
212
<tr>
213
    <td width="22%" valign="top" class="vncell"><?=gettext("Harden DNSSEC data");?></td>
214
    <td width="78%" class="vtable">
215
        <p><input name="dnssecstripped" type="checkbox" id="dnssecstripped" value="yes" <?php if (isset($pconfig['dnssecstripped'])) echo "checked=\"checked\"";?> /><br />
216
            <?=gettext("DNSSEC data is required for trust-anchored zones. If such data is absent, the zone becomes bogus. If this is disabled and no DNSSEC data is received, then the zone is made insecure.");?></p>
217
    </td>
218
</tr>
219
<tr>
220
    <td width="22%" valign="top" class="vncell"><?=gettext("Message Cache Size");?></td>
221
    <td width="78%" class="vtable">
222
        <p>
223
            <select id="msgcachesize" name="msgcachesize">
224
                <?php
225
                foreach (array("4", "10", "20", "50", "100", "250", "512") as $size) :
226
                    ?>
227
                    <option value="<?php echo $size; ?>" <?php if ($pconfig['msgcachesize'] == "{$size}") echo "selected=\"selected\""; ?>>
228
                        <?php echo $size; ?>MB
229
                    </option>
230
                <?php
231
                endforeach;
232
                ?>
233
            </select><br />
234
            <?=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.");?>
235
        </p>
236
    </td>
237
</tr>
238
<tr>
239
    <td width="22%" valign="top" class="vncell"><?=gettext("Outgoing TCP Buffers");?></td>
240
    <td width="78%" class="vtable">
241
        <p>
242
            <select id="outgoing_num_tcp" name="outgoing_num_tcp">
243
                <?php
244
                for ($num_tcp = 0; $num_tcp <= 50; $num_tcp += 10):
245
                    ?>
246
                    <option value="<?php echo $num_tcp; ?>" <?php if ($pconfig['outgoing_num_tcp'] == "{$num_tcp}") echo "selected=\"selected\""; ?>>
247
                        <?php echo $num_tcp; ?>
248
                    </option>
249
                <?php
250
                endfor;
251
                ?>
252
            </select><br />
253
            <?=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.");?>
254
        </p>
255
    </td>
256
</tr>
257
<tr>
258
    <td width="22%" valign="top" class="vncell"><?=gettext("Incoming TCP Buffers");?></td>
259
    <td width="78%" class="vtable">
260
        <p>
261
            <select id="incoming_num_tcp" name="incoming_num_tcp">
262
                <?php
263
                for ($num_tcp = 0; $num_tcp <= 50; $num_tcp += 10):
264
                    ?>
265
                    <option value="<?php echo $num_tcp; ?>" <?php if ($pconfig['incoming_num_tcp'] == "{$num_tcp}") echo "selected=\"selected\""; ?>>
266
                        <?php echo $num_tcp; ?>
267
                    </option>
268
                <?php
269
                endfor;
270
                ?>
271
            </select><br />
272
            <?=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.");?>
273
        </p>
274
    </td>
275
</tr>
276
<tr>
277
    <td width="22%" valign="top" class="vncell"><?=gettext("EDNS Buffer Size");?></td>
278
    <td width="78%" class="vtable">
279
        <p>
280
            <select id="edns_buffer_size" name="edns_buffer_size">
281
                <?php
282
                foreach (array("512", "1480", "4096") as $size) :
283
                    ?>
284
                    <option value="<?php echo $size; ?>" <?php if ($pconfig['edns_buffer_size'] == "{$size}") echo "selected=\"selected\""; ?>>
285
                        <?php echo $size; ?>
286
                    </option>
287
                <?php
288
                endforeach;
289
                ?>
290
            </select><br />
291
            <?=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.");?>
292
        </p>
293
    </td>
294
</tr>
295
<tr>
296
    <td width="22%" valign="top" class="vncell"><?=gettext("Number of queries per thread");?></td>
297
    <td width="78%" class="vtable">
298
        <p>
299
            <select id="num_queries_per_thread" name="num_queries_per_thread">
300
                <?php
301
                foreach (array("512", "1024", "2048") as $queries) :
302
                    ?>
303
                    <option value="<?php echo $queries; ?>" <?php if ($pconfig['num_queries_per_thread'] == "{$queries}") echo "selected=\"selected\""; ?>>
304
                        <?php echo $queries; ?>
305
                    </option>
306
                <?php
307
                endforeach;
308
                ?>
309
            </select><br />
310
            <?=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.");?>
311
        </p>
312
    </td>
313
</tr>
314
<tr>
315
    <td width="22%" valign="top" class="vncell"><?=gettext("Jostle Timeout");?></td>
316
    <td width="78%" class="vtable">
317
        <p>
318
            <select id="jostle_timeout" name="jostle_timeout">
319
                <?php
320
                foreach (array("100", "200", "500", "1000") as $timeout) :
321
                    ?>
322
                    <option value="<?php echo $timeout; ?>" <?php if ($pconfig['jostle_timeout'] == "{$timeout}") echo "selected=\"selected\""; ?>>
323
                        <?php echo $timeout; ?>
324
                    </option>
325
                <?php
326
                endforeach;
327
                ?>
328
            </select><br />
329
            <?=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.");?>
330
        </p>
331
    </td>
332
</tr>
333
<tr>
334
    <td width="22%" valign="top" class="vncell"><?=gettext("Maximum TTL for RRsets and messages");?></td>
335
    <td width="78%" class="vtable">
336
        <p>
337
            <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 />
338
            <?=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.");?>
339
        </p>
340
    </td>
341
</tr>
342
<tr>
343
    <td width="22%" valign="top" class="vncell"><?=gettext("Minimum TTL for RRsets and messages");?></td>
344
    <td width="78%" class="vtable">
345
        <p>
346
            <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 />
347
            <?=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.");?>
348
        </p>
349
    </td>
350
</tr>
351
<tr>
352
    <td width="22%" valign="top" class="vncell"><?=gettext("TTL for Host cache entries");?></td>
353
    <td width="78%" class="vtable">
354
        <p>
355
            <select id="infra_host_ttl" name="infra_host_ttl">
356
                <option value="60"  <?php if ($pconfig['infra_host_ttl'] == "60")  echo "selected=\"selected\""; ?>>1 minute</option>
357
                <option value="120" <?php if ($pconfig['infra_host_ttl'] == "120") echo "selected=\"selected\""; ?>>2 minutes</option>
358
                <option value="300" <?php if ($pconfig['infra_host_ttl'] == "300") echo "selected=\"selected\""; ?>>5 minutes</option>
359
                <option value="600" <?php if ($pconfig['infra_host_ttl'] == "600") echo "selected=\"selected\""; ?>>10 minutes</option>
360
                <option value="900" <?php if ($pconfig['infra_host_ttl'] == "900") echo "selected=\"selected\""; ?>>15 minutes</option>
361
            </select><br />
362
            <?=gettext("Time to live for entries in the host cache. The host cache contains roundtrip timing and EDNS support information. The default is 15 minutes.");?>
363
        </p>
364
    </td>
365
</tr>
366
<tr>
367
    <td width="22%" valign="top" class="vncell"><?=gettext("TTL for lame delegation");?></td>
368
    <td width="78%" class="vtable">
369
        <p>
370
            <select id="infra_lame_ttl" name="infra_lame_ttl">
371
                <option value="60"  <?php if ($pconfig['infra_lame_ttl'] == "60")  echo "selected=\"selected\""; ?>>1 minute</option>
372
                <option value="120" <?php if ($pconfig['infra_lame_ttl'] == "120") echo "selected=\"selected\""; ?>>2 minutes</option>
373
                <option value="300" <?php if ($pconfig['infra_lame_ttl'] == "300") echo "selected=\"selected\""; ?>>5 minutes</option>
374
                <option value="600" <?php if ($pconfig['infra_lame_ttl'] == "600") echo "selected=\"selected\""; ?>>10 minutes</option>
375
                <option value="900" <?php if ($pconfig['infra_lame_ttl'] == "900") echo "selected=\"selected\""; ?>>15 minutes</option>
376
            </select><br />
377
            <?=gettext("Time to live for when a delegation is considered to be lame. The default is 15 minutes.");?>
378
        </p>
379
    </td>
380
</tr>
381
<tr>
382
    <td width="22%" valign="top" class="vncell"><?=gettext("Number of Hosts to cache");?></td>
383
    <td width="78%" class="vtable">
384
        <p>
385
            <select id="infra_cache_numhosts" name="infra_cache_numhosts">
386
                <option value="1000"  <?php if ($pconfig['infra_cache_numhosts'] == "1000")  echo "selected=\"selected\""; ?>>1000</option>
387
                <option value="5000"  <?php if ($pconfig['infra_cache_numhosts'] == "5000")  echo "selected=\"selected\""; ?>>5000</option>
388
                <option value="10000" <?php if ($pconfig['infra_cache_numhosts'] == "10000") echo "selected=\"selected\""; ?>>10 000</option>
389
                <option value="20000" <?php if ($pconfig['infra_cache_numhosts'] == "20000") echo "selected=\"selected\""; ?>>20 000</option>
390
                <option value="50000" <?php if ($pconfig['infra_cache_numhosts'] == "50000") echo "selected=\"selected\""; ?>>50 000</option>
391
            </select><br />
392
            <?=gettext("Number of hosts for which information is cached. The default is 10,000.");?>
393
        </p>
394
    </td>
395
</tr>
396
<tr>
397
    <td width="22%" valign="top" class="vncell"><?=gettext("Unwanted Reply Threshold");?></td>
398
    <td width="78%" class="vtable">
399
        <p>
400
            <select id="unwanted_reply_threshold" name="unwanted_reply_threshold">
401
                <option value="disabled" <?php if ($pconfig['unwanted_reply_threshold'] == "disabled") echo "selected=\"selected\""; ?>>disabled</option>
402
                <option value="5000000"  <?php if ($pconfig['unwanted_reply_threshold'] == "5000000")  echo "selected=\"selected\""; ?>>5 million</option>
403
                <option value="10000000" <?php if ($pconfig['unwanted_reply_threshold'] == "10000000") echo "selected=\"selected\""; ?>>10 million</option>
404
                <option value="20000000" <?php if ($pconfig['unwanted_reply_threshold'] == "20000000") echo "selected=\"selected\""; ?>>20 million</option>
405
                <option value="40000000" <?php if ($pconfig['unwanted_reply_threshold'] == "40000000") echo "selected=\"selected\""; ?>>40 million</option>
406
                <option value="50000000" <?php if ($pconfig['unwanted_reply_threshold'] == "50000000") echo "selected=\"selected\""; ?>>50 million</option>
407
            </select><br />
408
            <?=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.");?>
409
        </p>
410
    </td>
411
</tr>
412
<tr>
413
    <td width="22%" valign="top" class="vncell"><?=gettext("Log level verbosity");?></td>
414
    <td width="78%" class="vtable">
415
        <p>
416
            <select id="log_verbosity" name="log_verbosity">
417
                <?php
418
                for ($level = 0; $level <= 5; $level++):
419
                    ?>
420
                    <option value="<?php echo $level; ?>" <?php if ($pconfig['log_verbosity'] == "{$level}") echo "selected=\"selected\""; ?>>
421
                        Level <?php echo $level; ?>
422
                    </option>
423
                <?php
424
                endfor;
425
                ?>
426
            </select><br />
427
            <?=gettext("Select the log verbosity.");?>
428
        </p>
429
    </td>
430
</tr>
431
<tr>
432
    <td colspan="2">&nbsp;</td>
433
</tr>
434
<tr>
435
    <td width="22%"></td>
436
    <td width="78%">
437
        <input type="submit" name="Save" class="formbtn" id="save" value="Save" />
438
    </td>
439
</tr>
440
</tbody>
441
</table>
442
</div>
443
</td>
444
</tr>
445
</tbody>
157
	<tbody>
158
		<tr>
159
			<td class="tabnavtbl">
160
				<?php
161
					$tab_array = array();
162
					$tab_array[] = array(gettext("General settings"), false, "services_unbound.php");
163
					$tab_array[] = array(gettext("Advanced settings"), true, "services_unbound_advanced.php");
164
					$tab_array[] = array(gettext("Access Lists"), false, "/services_unbound_acls.php");
165
					display_top_tabs($tab_array, true);
166
				?>
167
			</td>
168
		</tr>
169
		<tr>
170
			<td id="mainarea">
171
				<div class="tabcont">
172
					<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="main area">
173
						<tbody>
174
							<tr>
175
								<td colspan="2" valign="top" class="listtopic"><?=gettext("Advanced Resolver Options");?></td>
176
							</tr>
177
							<tr>
178
								<td width="22%" valign="top" class="vncell"><?=gettext("Hide Identity");?></td>
179
								<td width="78%" class="vtable">
180
									<p><input name="hideidentity" type="checkbox" id="hideidentity" value="yes" <?php if (isset($pconfig['hideidentity'])) echo "checked=\"checked\"";?> /><br />
181
									<?=gettext("If enabled, id.server and hostname.bind queries are refused.");?></p>
182
								</td>
183
							</tr>
184
							<tr>
185
								<td width="22%" valign="top" class="vncell"><?=gettext("Hide Version");?></td>
186
								<td width="78%" class="vtable">
187
									<p><input name="hideversion" type="checkbox" id="hideversion" value="yes" <?php if (isset($pconfig['hideversion'])) echo "checked=\"checked\"";?> /><br />
188
									<?=gettext("If enabled, version.server and version.bind queries are refused.");?></p>
189
								</td>
190
							</tr>
191
							<tr>
192
								<td width="22%" valign="top" class="vncell"><?=gettext("Prefetch Support");?></td>
193
								<td width="78%" class="vtable">
194
									<p><input name="prefetch" type="checkbox" id="prefetch" value="yes" <?php if (isset($pconfig['prefetch'])) echo "checked=\"checked\"";?> /><br />
195
									<?=gettext("Message cache elements are prefetched before they expire to help keep the cache up to date. When enabled, this option can cause an increase of around 10% more DNS traffic and load on the server, but frequently requested items will not expire from the cache.");?></p>
196
								</td>
197
							</tr>
198
							<tr>
199
								<td width="22%" valign="top" class="vncell"><?=gettext("Prefetch DNS Key Support");?></td>
200
								<td width="78%" class="vtable">
201
									<p><input name="prefetchkey" type="checkbox" id="prefetchkey" value="yes" <?php if (isset($pconfig['prefetchkey'])) echo "checked=\"checked\"";?> /><br />
202
									<?=sprintf(gettext("DNSKEY's are fetched earlier in the validation process when a %sDelegation signer%s is encountered. This helps lower the latency of requests but does utilize a little more CPU."), "<a href='http://en.wikipedia.org/wiki/List_of_DNS_record_types'>", "</a>");?></p>
203
								</td>
204
							</tr>
205
							<tr>
206
								<td width="22%" valign="top" class="vncell"><?=gettext("Harden Glue");?></td>
207
								<td width="78%" class="vtable">
208
									<p><input name="hardenglue" type="checkbox" id="hardenglue" value="yes" <?php if (isset($pconfig['hardenglue'])) echo "checked=\"checked\"";?> /><br />
209
									<?=gettext("Only trust glue if it is within the servers authority.");?></p>
210
								</td>
211
							</tr>
212
							<tr>
213
								<td width="22%" valign="top" class="vncell"><?=gettext("Harden DNSSEC data");?></td>
214
								<td width="78%" class="vtable">
215
									<p><input name="dnssecstripped" type="checkbox" id="dnssecstripped" value="yes" <?php if (isset($pconfig['dnssecstripped'])) echo "checked=\"checked\"";?> /><br />
216
									<?=gettext("DNSSEC data is required for trust-anchored zones. If such data is absent, the zone becomes bogus. If this is disabled and no DNSSEC data is received, then the zone is made insecure.");?></p>
217
								</td>
218
							</tr>
219
							<tr>
220
								<td width="22%" valign="top" class="vncell"><?=gettext("Message Cache Size");?></td>
221
								<td width="78%" class="vtable">
222
									<p>
223
										<select id="msgcachesize" name="msgcachesize">
224
<?php
225
										foreach (array("4", "10", "20", "50", "100", "250", "512") as $size) :
226
?>
227
											<option value="<?php echo $size; ?>" <?php if ($pconfig['msgcachesize'] == "{$size}") echo "selected=\"selected\""; ?>>
228
												<?php echo $size; ?>MB
229
											</option>
230
<?php
231
										endforeach;
232
?>
233
										</select><br />
234
										<?=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.");?>
235
									</p>
236
								</td>
237
							</tr>
238
							<tr>
239
								<td width="22%" valign="top" class="vncell"><?=gettext("Outgoing TCP Buffers");?></td>
240
								<td width="78%" class="vtable">
241
									<p>
242
										<select id="outgoing_num_tcp" name="outgoing_num_tcp">
243
<?php
244
										for ($num_tcp = 0; $num_tcp <= 50; $num_tcp += 10):
245
?>
246
											<option value="<?php echo $num_tcp; ?>" <?php if ($pconfig['outgoing_num_tcp'] == "{$num_tcp}") echo "selected=\"selected\""; ?>>
247
												<?php echo $num_tcp; ?>
248
											</option>
249
<?php
250
										endfor;
251
?>
252
										</select><br />
253
										<?=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.");?>
254
									</p>
255
								</td>
256
							</tr>
257
							<tr>
258
								<td width="22%" valign="top" class="vncell"><?=gettext("Incoming TCP Buffers");?></td>
259
								<td width="78%" class="vtable">
260
									<p>
261
										<select id="incoming_num_tcp" name="incoming_num_tcp">
262
<?php
263
										for ($num_tcp = 0; $num_tcp <= 50; $num_tcp += 10):
264
?>
265
											<option value="<?php echo $num_tcp; ?>" <?php if ($pconfig['incoming_num_tcp'] == "{$num_tcp}") echo "selected=\"selected\""; ?>>
266
												<?php echo $num_tcp; ?>
267
											</option>
268
<?php
269
										endfor;
270
?>
271
										</select><br />
272
										<?=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.");?>
273
									</p>
274
								</td>
275
							</tr>
276
							<tr>
277
								<td width="22%" valign="top" class="vncell"><?=gettext("EDNS Buffer Size");?></td>
278
								<td width="78%" class="vtable">
279
									<p>
280
										<select id="edns_buffer_size" name="edns_buffer_size">
281
<?php
282
										foreach (array("512", "1480", "4096") as $size) :
283
?>
284
											<option value="<?php echo $size; ?>" <?php if ($pconfig['edns_buffer_size'] == "{$size}") echo "selected=\"selected\""; ?>>
285
												<?php echo $size; ?>
286
											</option>
287
<?php
288
										endforeach;
289
?>
290
										</select><br />
291
										<?=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.");?>
292
									</p>
293
								</td>
294
							</tr>
295
							<tr>
296
								<td width="22%" valign="top" class="vncell"><?=gettext("Number of queries per thread");?></td>
297
								<td width="78%" class="vtable">
298
									<p>
299
										<select id="num_queries_per_thread" name="num_queries_per_thread">
300
<?php
301
										foreach (array("512", "1024", "2048") as $queries) :
302
?>
303
											<option value="<?php echo $queries; ?>" <?php if ($pconfig['num_queries_per_thread'] == "{$queries}") echo "selected=\"selected\""; ?>>
304
												<?php echo $queries; ?>
305
											</option>
306
<?php
307
										endforeach;
308
?>
309
										</select><br />
310
										<?=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.");?>
311
									</p>
312
								</td>
313
							</tr>
314
							<tr>
315
								<td width="22%" valign="top" class="vncell"><?=gettext("Jostle Timeout");?></td>
316
								<td width="78%" class="vtable">
317
									<p>
318
										<select id="jostle_timeout" name="jostle_timeout">
319
<?php
320
										foreach (array("100", "200", "500", "1000") as $timeout) :
321
?>
322
											<option value="<?php echo $timeout; ?>" <?php if ($pconfig['jostle_timeout'] == "{$timeout}") echo "selected=\"selected\""; ?>>
323
												<?php echo $timeout; ?>
324
											</option>
325
<?php
326
										endforeach;
327
?>
328
										</select><br />
329
										<?=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.");?>
330
									</p>
331
								</td>
332
							</tr>
333
							<tr>
334
								<td width="22%" valign="top" class="vncell"><?=gettext("Maximum TTL for RRsets and messages");?></td>
335
								<td width="78%" class="vtable">
336
									<p>
337
										<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 />
338
										<?=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.");?>
339
									</p>
340
								</td>
341
							</tr>
342
							<tr>
343
								<td width="22%" valign="top" class="vncell"><?=gettext("Minimum TTL for RRsets and messages");?></td>
344
								<td width="78%" class="vtable">
345
									<p>
346
										<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 />
347
										<?=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.");?>
348
									</p>
349
								</td>
350
							</tr>
351
							<tr>
352
								<td width="22%" valign="top" class="vncell"><?=gettext("TTL for Host cache entries");?></td>
353
								<td width="78%" class="vtable">
354
									<p>
355
										<select id="infra_host_ttl" name="infra_host_ttl">
356
											<option value="60"  <?php if ($pconfig['infra_host_ttl'] == "60")  echo "selected=\"selected\""; ?>>1 minute</option>
357
											<option value="120" <?php if ($pconfig['infra_host_ttl'] == "120") echo "selected=\"selected\""; ?>>2 minutes</option>
358
											<option value="300" <?php if ($pconfig['infra_host_ttl'] == "300") echo "selected=\"selected\""; ?>>5 minutes</option>
359
											<option value="600" <?php if ($pconfig['infra_host_ttl'] == "600") echo "selected=\"selected\""; ?>>10 minutes</option>
360
											<option value="900" <?php if ($pconfig['infra_host_ttl'] == "900") echo "selected=\"selected\""; ?>>15 minutes</option>
361
										</select><br />
362
										<?=gettext("Time to live for entries in the host cache. The host cache contains roundtrip timing and EDNS support information. The default is 15 minutes.");?>
363
									</p>
364
								</td>
365
							</tr>
366
							<tr>
367
								<td width="22%" valign="top" class="vncell"><?=gettext("TTL for lame delegation");?></td>
368
								<td width="78%" class="vtable">
369
									<p>
370
										<select id="infra_lame_ttl" name="infra_lame_ttl">
371
											<option value="60"  <?php if ($pconfig['infra_lame_ttl'] == "60")  echo "selected=\"selected\""; ?>>1 minute</option>
372
											<option value="120" <?php if ($pconfig['infra_lame_ttl'] == "120") echo "selected=\"selected\""; ?>>2 minutes</option>
373
											<option value="300" <?php if ($pconfig['infra_lame_ttl'] == "300") echo "selected=\"selected\""; ?>>5 minutes</option>
374
											<option value="600" <?php if ($pconfig['infra_lame_ttl'] == "600") echo "selected=\"selected\""; ?>>10 minutes</option>
375
											<option value="900" <?php if ($pconfig['infra_lame_ttl'] == "900") echo "selected=\"selected\""; ?>>15 minutes</option>
376
										</select><br />
377
										<?=gettext("Time to live for when a delegation is considered to be lame. The default is 15 minutes.");?>
378
									</p>
379
								</td>
380
							</tr>
381
							<tr>
382
								<td width="22%" valign="top" class="vncell"><?=gettext("Number of Hosts to cache");?></td>
383
								<td width="78%" class="vtable">
384
									<p>
385
										<select id="infra_cache_numhosts" name="infra_cache_numhosts">
386
											<option value="1000"  <?php if ($pconfig['infra_cache_numhosts'] == "1000")  echo "selected=\"selected\""; ?>>1000</option>
387
											<option value="5000"  <?php if ($pconfig['infra_cache_numhosts'] == "5000")  echo "selected=\"selected\""; ?>>5000</option>
388
											<option value="10000" <?php if ($pconfig['infra_cache_numhosts'] == "10000") echo "selected=\"selected\""; ?>>10 000</option>
389
											<option value="20000" <?php if ($pconfig['infra_cache_numhosts'] == "20000") echo "selected=\"selected\""; ?>>20 000</option>
390
											<option value="50000" <?php if ($pconfig['infra_cache_numhosts'] == "50000") echo "selected=\"selected\""; ?>>50 000</option>
391
										</select><br />
392
										<?=gettext("Number of hosts for which information is cached. The default is 10,000.");?>
393
									</p>
394
								</td>
395
							</tr>
396
							<tr>
397
								<td width="22%" valign="top" class="vncell"><?=gettext("Unwanted Reply Threshold");?></td>
398
								<td width="78%" class="vtable">
399
									<p>
400
										<select id="unwanted_reply_threshold" name="unwanted_reply_threshold">
401
											<option value="disabled" <?php if ($pconfig['unwanted_reply_threshold'] == "disabled") echo "selected=\"selected\""; ?>>disabled</option>
402
											<option value="5000000"  <?php if ($pconfig['unwanted_reply_threshold'] == "5000000")  echo "selected=\"selected\""; ?>>5 million</option>
403
											<option value="10000000" <?php if ($pconfig['unwanted_reply_threshold'] == "10000000") echo "selected=\"selected\""; ?>>10 million</option>
404
											<option value="20000000" <?php if ($pconfig['unwanted_reply_threshold'] == "20000000") echo "selected=\"selected\""; ?>>20 million</option>
405
											<option value="40000000" <?php if ($pconfig['unwanted_reply_threshold'] == "40000000") echo "selected=\"selected\""; ?>>40 million</option>
406
											<option value="50000000" <?php if ($pconfig['unwanted_reply_threshold'] == "50000000") echo "selected=\"selected\""; ?>>50 million</option>
407
										</select><br />
408
										<?=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.");?>
409
									</p>
410
								</td>
411
							</tr>
412
							<tr>
413
								<td width="22%" valign="top" class="vncell"><?=gettext("Log level verbosity");?></td>
414
								<td width="78%" class="vtable">
415
									<p>
416
										<select id="log_verbosity" name="log_verbosity">
417
<?php
418
										for ($level = 0; $level <= 5; $level++):
419
?>
420
											<option value="<?php echo $level; ?>" <?php if ($pconfig['log_verbosity'] == "{$level}") echo "selected=\"selected\""; ?>>
421
												Level <?php echo $level; ?>
422
											</option>
423
<?php
424
										endfor;
425
?>
426
										</select><br />
427
										<?=gettext("Select the log verbosity.");?>
428
									</p>
429
								</td>
430
							</tr>
431
							<tr>
432
								<td colspan="2">&nbsp;</td>
433
							</tr>
434
							<tr>
435
								<td width="22%"></td>
436
								<td width="78%">
437
									<input type="submit" name="Save" class="formbtn" id="save" value="Save" />
438
								</td>
439
							</tr>
440
						</tbody>
441
					</table>
442
				</div>
443
			</td>
444
		</tr>
445
	</tbody>
446 446
</table>
447 447
</form>
448 448
<?php include("fend.inc"); ?>

Also available in: Unified diff