diff --git a/DnsServerCore/www/index.html b/DnsServerCore/www/index.html
index c88aa0b8..4d9ecfef 100644
--- a/DnsServerCore/www/index.html
+++ b/DnsServerCore/www/index.html
@@ -552,8 +552,13 @@
Allow Recursion
+
+
+ Allow Recursion Only For Private Networks
+
+
- Enabling recursion will allow this DNS server to resolve any domain and act as a general purpose DNS server. Disable this option if you wish this server to act only as authoritative name server for the configured zones.
+ Enabling recursion will allow this DNS server to resolve any domain and act as a general purpose DNS server. Disable this option if you wish this server to act only as authoritative name server for the configured zones. Enable recursion only for private networks option if you do not what the DNS server to support recursion over Internet but want to support it on private networks.
diff --git a/DnsServerCore/www/js/main.js b/DnsServerCore/www/js/main.js
index f55194a9..f906c56b 100644
--- a/DnsServerCore/www/js/main.js
+++ b/DnsServerCore/www/js/main.js
@@ -105,6 +105,11 @@ $(function () {
}
});
+ $("#chkAllowRecursion").click(function () {
+ var allowRecursion = $("#chkAllowRecursion").prop('checked');
+ $("#chkAllowRecursionOnlyForPrivateNetworks").prop('disabled', !allowRecursion);
+ });
+
showPageLogin();
login("admin", "admin");
});
@@ -275,6 +280,8 @@ function loadDnsSettings() {
$("#chkPreferIPv6").prop("checked", responseJSON.response.preferIPv6);
$("#chkLogQueries").prop("checked", responseJSON.response.logQueries);
$("#chkAllowRecursion").prop("checked", responseJSON.response.allowRecursion);
+ $("#chkAllowRecursionOnlyForPrivateNetworks").prop('disabled', !responseJSON.response.allowRecursion);
+ $("#chkAllowRecursionOnlyForPrivateNetworks").prop("checked", responseJSON.response.allowRecursionOnlyForPrivateNetworks);
var proxy = responseJSON.response.proxy;
if (proxy === null) {
@@ -382,6 +389,7 @@ function saveDnsSettings() {
var preferIPv6 = $("#chkPreferIPv6").prop('checked');
var logQueries = $("#chkLogQueries").prop('checked');
var allowRecursion = $("#chkAllowRecursion").prop('checked');
+ var allowRecursionOnlyForPrivateNetworks = $("#chkAllowRecursionOnlyForPrivateNetworks").prop('checked');
var proxy;
var proxyType = $('input[name=rdProxyType]:checked').val().toLowerCase();
@@ -414,7 +422,7 @@ function saveDnsSettings() {
var btn = $("#btnSaveDnsSettings").button('loading');
HTTPRequest({
- url: "/api/setDnsSettings?token=" + token + "&serverDomain=" + serverDomain + "&webServicePort=" + webServicePort + "&preferIPv6=" + preferIPv6 + "&logQueries=" + logQueries + "&allowRecursion=" + allowRecursion + proxy + "&forwarders=" + forwarders + "&forwarderProtocol=" + forwarderProtocol,
+ url: "/api/setDnsSettings?token=" + token + "&serverDomain=" + serverDomain + "&webServicePort=" + webServicePort + "&preferIPv6=" + preferIPv6 + "&logQueries=" + logQueries + "&allowRecursion=" + allowRecursion + "&allowRecursionOnlyForPrivateNetworks=" + allowRecursionOnlyForPrivateNetworks + proxy + "&forwarders=" + forwarders + "&forwarderProtocol=" + forwarderProtocol,
success: function (responseJSON) {
document.title = "Technitium DNS Server " + responseJSON.response.version + " - " + responseJSON.response.serverDomain;
$("#lblServerDomain").text(" - " + responseJSON.response.serverDomain);