80 |
80 |
$pconfig['infra_cache_numhosts'] = isset($config['unbound']['infra_cache_numhosts']) ? $config['unbound']['infra_cache_numhosts'] : '10000';
|
81 |
81 |
$pconfig['unwanted_reply_threshold'] = isset($config['unbound']['unwanted_reply_threshold']) ? $config['unbound']['unwanted_reply_threshold'] : 'disabled';
|
82 |
82 |
$pconfig['log_verbosity'] = isset($config['unbound']['log_verbosity']) ? $config['unbound']['log_verbosity'] : "1";
|
|
83 |
$pconfig['dns64prefix'] = isset($config['unbound']['dns64prefix']) ? $config['unbound']['dns64prefix'] : '';
|
|
84 |
$pconfig['dns64netbits'] = isset($config['unbound']['dns64netbits']) ? $config['unbound']['dns64netbits'] : '96';
|
83 |
85 |
|
84 |
86 |
if (isset($config['unbound']['disable_auto_added_access_control'])) {
|
85 |
87 |
$pconfig['disable_auto_added_access_control'] = true;
|
... | ... | |
93 |
95 |
$pconfig['use_caps'] = true;
|
94 |
96 |
}
|
95 |
97 |
|
|
98 |
if (isset($config['unbound']['dns64'])) {
|
|
99 |
$pconfig['dns64'] = true;
|
|
100 |
}
|
|
101 |
|
96 |
102 |
if ($_POST) {
|
97 |
103 |
if ($_POST['apply']) {
|
98 |
104 |
$retval = 0;
|
... | ... | |
143 |
149 |
if (isset($_POST['dnssecstripped']) && !isset($config['unbound']['dnssec'])) {
|
144 |
150 |
$input_errors[] = gettext("Harden DNSSEC Data option can only be enabled if DNSSEC support is enabled.");
|
145 |
151 |
}
|
|
152 |
if (isset($_POST['dns64']) && !empty($_POST['dns64prefix']) && !is_ipaddrv6($_POST['dns64prefix'])) {
|
|
153 |
$input_errors[] = gettext("DNS64 Prefix must be valid IPv6 prefix.");
|
|
154 |
}
|
|
155 |
if (isset($_POST['dns64']) && isset($_POST['dns64netbits']) &&
|
|
156 |
(($_POST['dns64netbits'] > 96) || ($_POST['dns64netbits'] < 1))) {
|
|
157 |
$input_errors[] = gettext("DNS64 subnet must be not more than 96 and not less that 1.");
|
|
158 |
}
|
146 |
159 |
|
147 |
160 |
if (!$input_errors) {
|
148 |
161 |
if (isset($_POST['hideidentity'])) {
|
... | ... | |
216 |
229 |
unset($config['unbound']['use_caps']);
|
217 |
230 |
}
|
218 |
231 |
|
|
232 |
if (isset($_POST['dns64'])) {
|
|
233 |
$config['unbound']['dns64'] = true;
|
|
234 |
$config['unbound']['dns64prefix'] = $_POST['dns64prefix'];
|
|
235 |
$config['unbound']['dns64netbits'] = $_POST['dns64netbits'];
|
|
236 |
} else {
|
|
237 |
unset($config['unbound']['dns64']);
|
|
238 |
}
|
|
239 |
|
219 |
240 |
write_config(gettext("DNS Resolver configured."));
|
220 |
241 |
|
221 |
242 |
mark_subsystem_dirty('unbound');
|
... | ... | |
438 |
459 |
$pconfig['use_caps']
|
439 |
460 |
))->setHelp('See the implementation %1$sdraft dns-0x20%2$s for more information.', '<a href="https://tools.ietf.org/html/draft-vixie-dnsext-dns0x20-00">', '</a>');
|
440 |
461 |
|
|
462 |
$section->addInput(new Form_Checkbox(
|
|
463 |
'dns64',
|
|
464 |
'DNS64 Support',
|
|
465 |
'Enable DNS64 (RFC 6147)',
|
|
466 |
$pconfig['dns64']
|
|
467 |
))->setHelp('DNS64 is used with an IPv6/IPv4 translator to enable client-server communication between an IPv6-only client and an IPv4-only servers.');
|
|
468 |
|
|
469 |
$group = new Form_Group('DNS64 Prefix');
|
|
470 |
$group->addClass('dns64pr');
|
|
471 |
|
|
472 |
$group->add(new Form_IpAddress(
|
|
473 |
'dns64prefix',
|
|
474 |
'DNS64 Prefix',
|
|
475 |
$pconfig['dns64prefix']
|
|
476 |
))->addMask('dns64netbits', $pconfig['dns64netbits'], 96, 1, false)->setWidth(4);
|
|
477 |
$group->setHelp('IPv6 prefix used by IPv6 representations of IPv4 addresses. If this field is empty, default 64:ff9b::/96 prefix is used.');
|
|
478 |
|
|
479 |
$section->add($group);
|
|
480 |
|
441 |
481 |
$form->add($section);
|
442 |
482 |
print($form);
|
443 |
483 |
|
|
484 |
?>
|
|
485 |
|
|
486 |
<script type="text/javascript">
|
|
487 |
//<![CDATA[
|
|
488 |
events.push(function() {
|
|
489 |
function change_dns64() {
|
|
490 |
hideClass('dns64pr', !($('#dns64').prop('checked')));
|
|
491 |
}
|
|
492 |
|
|
493 |
// DNS64
|
|
494 |
$('#dns64').change(function () {
|
|
495 |
change_dns64();
|
|
496 |
});
|
|
497 |
|
|
498 |
// ---------- On initial page load ------------------------------------------------------------
|
|
499 |
|
|
500 |
change_dns64();
|
|
501 |
});
|
|
502 |
//]]>
|
|
503 |
</script>
|
|
504 |
<?php
|
444 |
505 |
include("foot.inc");
|
DNS64 support. Issue #10274