diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index ea76ea52..5643ddaf 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -71,65 +71,144 @@ function updateCacheInfo() { }); } +function createDynamicConfigTabs() { + $.ajax({ + url: "/api/config?detailed=true", + }) + .done(function (data) { + var navTabs = $(".nav-tabs"); + var tabContent = $(".tab-content"); + + // Remove the teleporter tab (it is added as the last tab after the loop) + var teleporter = $(".nav-tabs > li").last(); + navTabs.remove(teleporter); + + // Create the tabs for the dynamic config topics + data.topics.forEach(function (topic) { + var nav = '
  • '; + navTabs.append(nav); + var content = '
    \ +
    \ +
    \ +
    \ +
    \ +

    ' + topic.title + '

    \ +

    ' + topic.description + '

    \ +

    \ +
    \ +
    \ +
    \ +
    \ +
    \ +
    \ + \ +
    \ +
    \ +
    \ +
    \ +
    '; + tabContent.append(content); + }); + + navTabs.append(teleporter); + + // Create the content for the dynamic config topics + Object.keys(data.config).forEach(function (topic) { + Object.keys(data.config[topic]).forEach(function (key) { + var value = data.config[topic][key]; + console.log(topic, value); + if('description' in value) { + var row = '
    \ +
    \ +
    \ +

    ' + key + (value.modified ? '  ':'') + (value.flags.advanced ? '  ':'') + '

    \ +

    ' + utils.escapeHtml(value.description).replace("\n","
    ") + '

    \ +
    \ +
    \ +
    \ +
    \ +
    '; + var resetToDefault = ''; + if(value.modified) { + resetToDefault = ''; + } + if(value['type'] == "string") { + row += ' \ +
    \ + ' + resetToDefault + '\ +

    Allowed value: ' + utils.escapeHtml(value.allowed) + '

    \ +
    '; + } else if(value['type'] == "boolean") { + row += ' \ +
    \ + ' + resetToDefault + '\ +
    '; + } else if(value['type'] == "integer") { + row += ' \ +
    \ + ' + resetToDefault + '\ +
    '; + } else if(value['type'] == "unsigned integer") { + row += ' \ +
    \ + ' + resetToDefault + '\ +
    '; + } else if(value['type'] == "unsigned integer (16 bit)") { + row += ' \ +
    \ + ' + resetToDefault + '\ +
    '; + } else if(value['type'] == "string array") { + row += ' \ +
    \ + ' + resetToDefault + '\ +
    '; + } else if(value['type'] == "enum (string)") { + row += ' \ +
    \ + ' + resetToDefault + '\ +
    \ +
    \ +

    Available options:

    • ' + value.allowed.map(function(option) { return '' + option.item + ': ' + utils.escapeHtml(option.description); }).join('
    • ') + '

    \ +
    '; + } else { + row += "TYPE " + value.type + " NOT DEFINED"; + } + row +='
    \ +
    \ +
    \ +
    '; + } + $("#" + topic + "-content").append(row); + }); + $('#settings-' + topic + '-overlay').hide(); + + $("input[id^='advanced-settings-toggle']").on("click", function(data) { + var checked = data.target.checked; + // Synchronize all advanced settings checkboxes + $("input[id^='advanced-settings-toggle']").prop("checked", checked); + // Show/hide all advanced settings + $(".advanced-setting").toggle(checked); + }); + }); + + // Remove the overlay + }) + .fail(function (data) { + apiFailure(data); + }); +} + $(function () { updateHostInfo(); updateCacheInfo(); - - $("[data-static]").on("click", function () { - var row = $(this).closest("tr"); - var mac = row.find("#MAC").text(); - var ip = row.find("#IP").text(); - var host = row.find("#HOST").text(); - $('input[name="AddHostname"]').val(host); - $('input[name="AddIP"]').val(ip); - $('input[name="AddMAC"]').val(mac); - }); - - // prepare Teleporter Modal & iframe for operation - $("#teleporterModal").on("show.bs.modal", function () { - $('iframe[name="teleporter_iframe"]').removeAttr("style").contents().find("body").html(""); - $(this).find("button").prop("disabled", true); - $(this).find(".overlay").show(); - }); - - // set Teleporter iframe's font, enable Modal's button(s), ... - $('iframe[name="teleporter_iframe"]').on("load", function () { - var font = { - "font-family": $("pre").css("font-family"), - "font-size": $("pre").css("font-size"), - color: $("pre").css("color"), - }; - var contents = $(this).contents(); - contents.find("body").css(font); - $("#teleporterModal").find(".overlay").hide(); - var BtnEls = $(this).parents(".modal-content").find("button").prop("disabled", false); - - // force user to reload the page if necessary - var reloadEl = contents.find("span[data-forcereload]"); - if (reloadEl.length > 0) { - var msg = "The page must now be reloaded to display the imported entries"; - reloadEl.append(msg); - BtnEls.toggleClass("hidden") - .not(".hidden") - .on("click", function () { - // window.location.href avoids a browser warning for resending form data - window.location = window.location.href; - }); - } - - // expand iframe's height - var contentHeight = contents.find("html").height(); - if (contentHeight > $(this).height()) { - $(this).height(contentHeight); - } - }); - - // display selected import file on button's adjacent textfield - $("#zip_file").on("change", function () { - var fileName = $(this)[0].files.length === 1 ? $(this)[0].files[0].name : ""; - $("#zip_filename").val(fileName); - }); + createDynamicConfigTabs(); }); + $(".confirm-poweroff").confirm({ text: "Are you sure you want to send a poweroff command to your Pi-hole?", title: "Confirmation required", @@ -231,156 +310,6 @@ $(".confirm-disablelogging-noflush").confirm({ dialogClass: "modal-dialog", }); -$(".api-token").confirm({ - text: "Make sure that nobody else can scan this code around you. They will have full access to the API without having to know the password. Note that the generation of the QR code will take some time.", - title: "Confirmation required", - confirm: function () { - $("#apiTokenModal").modal("show"); - }, - cancel: function () { - // nothing to do - }, - confirmButton: "Yes, show API token", - cancelButton: "No, go back", - post: true, - confirmButtonClass: "btn-danger", - cancelButtonClass: "btn-success", - dialogClass: "modal-dialog", -}); - -$("#apiTokenModal").on("show.bs.modal", function () { - var bodyStyle = { - "font-family": $("body").css("font-family"), - "background-color": "white", - }; - $('iframe[name="apiToken_iframe"]').contents().find("body").css(bodyStyle); - var qrCodeStyle = { - margin: "auto", - }; - $('iframe[name="apiToken_iframe"]').contents().find("table").css(qrCodeStyle); -}); - -$("#DHCPchk").on("click", function () { - $("input.DHCPgroup").prop("disabled", !this.checked); - $("#dhcpnotice").prop("hidden", !this.checked).addClass("lookatme"); -}); - -function loadCacheInfo() { - $.getJSON("api.php?getCacheInfo", function (data) { - if ("FTLnotrunning" in data) { - return; - } - - // Fill table with obtained values - $("#cache-size").text(parseInt(data.cacheinfo["cache-size"], 10)); - $("#cache-inserted").text(parseInt(data.cacheinfo["cache-inserted"], 10)); - - // Highlight early cache removals when present - var cachelivefreed = parseInt(data.cacheinfo["cache-live-freed"], 10); - $("#cache-live-freed").text(cachelivefreed); - if (cachelivefreed > 0) { - $("#cache-live-freed").parent("tr").children("th").children("span").addClass("lookatme"); - $("#cache-live-freed").parent("tr").children("td").addClass("lookatme"); - $("#cache-live-freed") - .parent("tr") - .children("td") - .attr("lookatme-text", cachelivefreed.toString()); - } else { - $("#cache-live-freed").parent("tr").children("th").children("span").removeClass("lookatme"); - $("#cache-live-freed").parent("tr").children("td").removeClass("lookatme"); - } - - // Update cache info every 10 seconds - setTimeout(loadCacheInfo, 10000); - }); -} - -var leasetable, staticleasetable; -$(function () { - if (document.getElementById("DHCPLeasesTable")) { - leasetable = $("#DHCPLeasesTable").DataTable({ - dom: - "<'row'<'col-sm-12'f>>" + - "<'row'<'col-sm-4'l><'col-sm-8'p>>" + - "<'row'<'col-sm-12'<'table-responsive'tr>>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", - lengthMenu: [ - [5, 10, 25, 50, 100, -1], - [5, 10, 25, 50, 100, "All"], - ], - columnDefs: [ - { bSortable: false, orderable: false, targets: -1 }, - { - targets: [0, 1], - render: $.fn.dataTable.render.text(), - }, - { - targets: 2, - render: function (data) { - // Show "unknown", when host is "*" - var str; - if (data === "*") { - str = "unknown"; - } else { - str = typeof data === "string" ? utils.escapeHtml(data) : data; - } - - return str; - }, - }, - ], - paging: true, - order: [[2, "asc"]], - stateSave: true, - stateDuration: 0, - stateSaveCallback: function (settings, data) { - utils.stateSaveCallback("activeDhcpLeaseTable", data); - }, - stateLoadCallback: function () { - return utils.stateLoadCallback("activeDhcpLeaseTable"); - }, - }); - } - - if (document.getElementById("DHCPStaticLeasesTable")) { - staticleasetable = $("#DHCPStaticLeasesTable").DataTable({ - dom: - "<'row'<'col-sm-12'f>>" + - "<'row'<'col-sm-4'l><'col-sm-8'p>>" + - "<'row'<'col-sm-12'<'table-responsive'tr>>>" + - "<'row'<'col-sm-5'i><'col-sm-7'p>>", - lengthMenu: [ - [5, 10, 25, 50, 100, -1], - [5, 10, 25, 50, 100, "All"], - ], - columnDefs: [ - { bSortable: false, orderable: false, targets: -1 }, - { - targets: [0, 1, 2], - render: $.fn.dataTable.render.text(), - }, - ], - paging: true, - order: [[2, "asc"]], - stateSave: true, - stateSaveCallback: function (settings, data) { - utils.stateSaveCallback("staticDhcpLeaseTable", data); - }, - stateLoadCallback: function () { - return utils.stateLoadCallback("staticDhcpLeaseTable"); - }, - }); - } - - //call draw() on each table... they don't render properly with scrollX and scrollY set... ¯\_(ツ)_/¯ - $('a[data-toggle="tab"]').on("shown.bs.tab", function () { - leasetable.draw(); - staticleasetable.draw(); - }); - - loadCacheInfo(); -}); - // Handle hiding of alerts $(function () { $("[data-hide]").on("click", function () { @@ -395,143 +324,9 @@ $(function () { $('[data-toggle="tooltip"]').tooltip({ html: true, container: "body" }); }); -// Auto dismissal for info notifications -$(function () { - var alInfo = $("#alInfo"); - if (alInfo.length > 0) { - alInfo.delay(3000).fadeOut(2000, function () { - alInfo.hide(); - }); - } - - // Disable autocorrect in the search box - var input = document.querySelector("input[type=search]"); - input.setAttribute("autocomplete", "off"); - input.setAttribute("autocorrect", "off"); - input.setAttribute("autocapitalize", "off"); - input.setAttribute("spellcheck", false); - - // En-/disable conditional forwarding input fields based - // on the checkbox state - $('input[name="rev_server"]').on("click", function () { - $('input[name="rev_server_cidr"]').prop("disabled", !this.checked); - $('input[name="rev_server_target"]').prop("disabled", !this.checked); - $('input[name="rev_server_domain"]').prop("disabled", !this.checked); - }); -}); - // Change "?tab=" parameter in URL for save and reload $(".nav-tabs a").on("shown.bs.tab", function (e) { var tab = e.target.hash.substring(1); window.history.pushState("", "", "?tab=" + tab); window.scrollTo(0, 0); }); - -// Bar/Smooth chart toggle -$(function () { - var bargraphs = $("#bargraphs"); - var chkboxData = localStorage ? localStorage.getItem("barchart_chkbox") : null; - - if (chkboxData !== null) { - // Restore checkbox state - bargraphs.prop("checked", chkboxData === "true"); - } else { - // Initialize checkbox - bargraphs.prop("checked", true); - if (localStorage) { - localStorage.setItem("barchart_chkbox", true); - } - } - - bargraphs.on("click", function () { - localStorage.setItem("barchart_chkbox", bargraphs.prop("checked")); - }); -}); - -$(function () { - var colorfulQueryLog = $("#colorfulQueryLog"); - var chkboxData = localStorage ? localStorage.getItem("colorfulQueryLog_chkbox") : null; - - if (chkboxData !== null) { - // Restore checkbox state - colorfulQueryLog.prop("checked", chkboxData === "true"); - } else { - // Initialize checkbox - colorfulQueryLog.prop("checked", false); - if (localStorage) { - localStorage.setItem("colorfulQueryLog_chkbox", false); - } - } - - colorfulQueryLog.on("click", function () { - localStorage.setItem("colorfulQueryLog_chkbox", colorfulQueryLog.prop("checked")); - }); -}); - -// Delete dynamic DHCP lease -$('button[id="removedynamic"]').on("click", function () { - var tr = $(this).closest("tr"); - var ipaddr = utils.escapeHtml(tr.children("#IP").text()); - var name = utils.escapeHtml(tr.children("#HOST").text()); - var ipname = name + " (" + ipaddr + ")"; - - utils.disableAll(); - utils.showAlert("info", "", "Deleting DHCP lease...", ipname); - $.ajax({ - url: "api.php", - method: "get", - dataType: "json", - data: { - delete_lease: ipaddr, - token: token, - }, - success: function (response) { - utils.enableAll(); - if (response.delete_lease.startsWith("OK")) { - utils.showAlert( - "success", - "far fa-trash-alt", - "Successfully deleted DHCP lease for ", - ipname - ); - // Remove column on success - tr.remove(); - // We have to hide the tooltips explicitly or they will stay there forever as - // the onmouseout event does not fire when the element is already gone - $.each($(".tooltip"), function () { - $(this).remove(); - }); - } else { - utils.showAlert("error", "Error while deleting DHCP lease for " + ipname, response); - } - }, - error: function (jqXHR, exception) { - utils.enableAll(); - utils.showAlert("error", "Error while deleting DHCP lease for " + ipname, jqXHR.responseText); - console.log(exception); // eslint-disable-line no-console - }, - }); -}); - -// Non-fatal dnsmasq warnings toggle -$(function () { - var nonfatalwarnigns = $("#hideNonfatalDnsmasqWarnings"); - var chkboxData = localStorage ? localStorage.getItem("hideNonfatalDnsmasqWarnings_chkbox") : null; - - if (chkboxData !== null) { - // Restore checkbox state - nonfatalwarnigns.prop("checked", chkboxData === "true"); - } else { - // Initialize checkbox - nonfatalwarnigns.prop("checked", false); - if (localStorage) { - localStorage.setItem("hideNonfatalDnsmasqWarnings_chkbox", false); - } - } - - nonfatalwarnigns.on("click", function () { - localStorage.setItem("hideNonfatalDnsmasqWarnings_chkbox", nonfatalwarnigns.prop("checked")); - // Call check messages to make new setting effective - checkMessages(); - }); -}); diff --git a/scripts/pi-hole/php/sidebar.php b/scripts/pi-hole/php/sidebar.php index 96f50faa..e285fa41 100644 --- a/scripts/pi-hole/php/sidebar.php +++ b/scripts/pi-hole/php/sidebar.php @@ -84,7 +84,7 @@
  • class="active"> System
  • -
  • class="active"> - DNS -
  • -
  • class="active"> - DHCP -
  • -
  • class="active"> - API / Web interface -
  • -
  • class="active"> - Privacy -
  • class="active"> Teleporter
  • -
    +
    @@ -278,1082 +266,6 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array('sysadmin', 'dns', 'piho
    - -
    - -
    -
    - -
    -
    -
    -

    DHCP Settings

    -
    -
    -
    -
    -
    checked>

    -

    hidden>Make sure your router's DHCP server is disabled when using the Pi-hole DHCP server!

    -
    -
    -
    -
    - -
    -
    -
    -
    -
    From
    - disabled> -
    -
    -
    -
    -
    -
    -
    To
    - disabled> -
    -
    -
    -
    -
    -
    - -
    -
    -
    Router
    - disabled> -
    -
    -
    -
    -
    -
    -
    - -
    -
    -
    -

    Advanced DHCP settings

    -
    -
    -
    -
    - -
    -
    -
    Domain
    - disabled> -
    -
    -
    -
    -
    -
    - -
    -
    -
    Lease time in hours
    - disabled> -
    -
    -

    Hint: 0 = infinite, 24 = one day, 168 = one week, 744 = one month, 8760 = one year

    -
    -
    -
    -
    -
    checked disabled -> 
    -
    checked disabled -> 
    -
    -
    -
    -
    -
    -
    - - -
    - unknown'; - } - - array_push($dhcp_leases, array('TIME' => $time, 'hwaddr' => strtoupper($line[1]), 'IP' => $line[2], 'host' => $host, 'clid' => $clid, 'type' => $type)); - } - } -} - -// readStaticLeasesFile(); -?> -
    -
    -
    -

    Currently active DHCP leases

    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - -
    MAC addressIP addressHostname
    - - -
    -
    -
    -
    -
    -
    -
    -
    -
    -

    Static DHCP leases configuration

    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    MAC addressIP addressHostname
    0) { ?> - - -
    - -
    -

    Specifying the MAC address is mandatory and only one entry per MAC - address is allowed. If the IP address is omitted and a host name is - given, the IP address will still be generated dynamically and the - specified host name will be used. If the host name is omitted, only - a static lease will be added.

    -
    -
    -
    -
    - - - -
    -
    -
    -
    - - -
    -
    -
    -
    -
    -
    -

    Upstream DNS Servers

    -
    -
    -
    -
    - - - - - - - - - - $value) { ?> - - - - - - - - - - - - - - - - - - - - - - - - - -
    IPv4IPv6Name
    -
    checked>
    -
    -
    checked>
    -
    -
    checked>
    -
    -
    checked>
    -
    -

    ECS (Extended Client Subnet) defines a mechanism for recursive resolvers to send partial client IP address information to authoritative DNS name servers. Content Delivery Networks (CDNs) and latency-sensitive services use this to give geo-located responses when responding to name lookups coming through public DNS resolvers. Note that ECS may result in reduced privacy.

    -
    -
    -
    -
    -
    -
    -
    -
    -

    Upstream DNS Servers

    -
    -
    -
    -
    - Custom 1 (IPv4) -
    -
    - checked> -
    -
    -
    - value=""> -
    -
    -
    -
    - Custom 2 (IPv4) -
    -
    - checked> -
    -
    -
    - value=""> -
    -
    -
    -
    -
    -
    - Custom 3 (IPv6) -
    -
    - checked> -
    -
    -
    - value=""> -
    -
    -
    -
    - Custom 4 (IPv6) -
    -
    - checked> -
    -
    -
    - value=""> -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -

    Interface settings

    -
    -
    -
    -
    -
    -
    -

    Recommended setting

    -
    - checked> - -
    -
    -
    -

    Potentially dangerous options

    Make sure your Pi-hole is properly firewalled! -
    - checked> - -
    -
    - checked> - -
    -
    - checked> - -
    -

    These options are dangerous on devices - directly connected to the Internet such as cloud instances and are only safe if your - Pi-hole is properly firewalled. In a typical at-home setup where your Pi-hole is - located within your local network (and you have not forwarded port 53 - in your router!) they are safe to use.

    -
    -
    -

    See our documentation for further technical details.

    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    -

    Advanced DNS settings

    -
    -
    -
    -
    -
    - checked> - -

    When there is a Pi-hole domain set and this box is - ticked, this asks FTL that this domain is purely - local and FTL may answer queries from /etc/hosts or DHCP leases - but should never forward queries on that domain to any upstream servers. - If Conditional Forwarding is enabled, unticking this box may cause a partial - DNS loop under certain circumstances (e.g. if a client would send TLD DNSSEC queries).

    -
    -
    - checked> - -

    All reverse lookups for private IP ranges (i.e., 192.168.0.x/24, etc.) - which are not found in /etc/hosts or the DHCP leases are answered - with "no such domain" rather than being forwarded upstream. The set - of prefixes affected is the list given in RFC6303.

    -

    Important: Enabling these two options may increase your privacy, - but may also prevent you from being able to access - local hostnames if the Pi-hole is not used as DHCP server.

    -
    -
    -
    - checked> - -

    Validate DNS replies and cache DNSSEC data. When forwarding DNS - queries, Pi-hole requests the DNSSEC records needed to validate - the replies. If a domain fails validation or the upstream does not - support DNSSEC, this setting can cause issues resolving domains. - Use an upstream DNS server which supports DNSSEC when activating DNSSEC. Note that - the size of your log might increase significantly - when enabling DNSSEC. A DNSSEC resolver test can be found - here.

    -
    -
    -

    Rate-limiting

    -

    Block clients making more than queries within - seconds.

    -

    When a client makes too many queries in too short time, it - gets rate-limited. Rate-limited queries are answered with a - REFUSED reply and not further processed by FTL - and prevent Pi-holes getting overwhelmed by rogue clients. - It is important to note that rate-limiting is happening on a - per-client basis. Other clients can continue to use FTL while - rate-limited clients are short-circuited at the same time.

    -

    Rate-limiting may be disabled altogether by setting both - values to zero. See - our documentation - for further details.

    -
    -

    Conditional forwarding

    -

    If not configured as your DHCP server, Pi-hole typically won't be able to - determine the names of devices on your local network. As a - result, tables such as Top Clients will only show IP addresses.

    -

    One solution for this is to configure Pi-hole to forward these - requests to your DHCP server (most likely your router), but only for devices on your - home network. To configure this we will need to know the IP - address of your DHCP server and which addresses belong to your local network. - Exemplary input is given below as placeholder in the text boxes (if empty).

    -

    If your local network spans 192.168.0.1 - 192.168.0.255, then you will have to input - 192.168.0.0/24. If your local network is 192.168.47.1 - 192.168.47.255, it will - be 192.168.47.0/24 and similar. If your network is larger, the CIDR has to be - different, for instance a range of 10.8.0.1 - 10.8.255.255 results in 10.8.0.0/16, - whereas an even wider network of 10.0.0.1 - 10.255.255.255 results in 10.0.0.0/8. - Setting up IPv6 ranges is exactly similar to setting up IPv4 here and fully supported. - Feel free to reach out to us on our - Discourse forum - in case you need any assistance setting up local host name resolution for your particular system.

    -

    You can also specify a local domain name (like fritz.box) to ensure queries to - devices ending in your local domain name will not leave your network, however, this is optional. - The local domain name must match the domain name specified - in your DHCP server for this to work. You can likely find it within the DHCP settings.

    -

    Enabling Conditional Forwarding will also forward all hostnames (i.e., non-FQDNs) to the router - when "Never forward non-FQDNs" is not enabled.

    -
    -
    - checked> - -
    -
    - - - - - - - - - - - - - - - -
    Local network in CIDR notationIP address of your DHCP server (router)Local domain name (optional)
    - value="" - disabled> - - value="" - disabled> - - value="" - disabled> -
    -
    -
    -
    -
    -
    -
    - - - -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -

    API settings

    -
    -
    -
    -
    -

    Top Lists

    -

    Exclude the following domains from being shown in

    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    -
    -

    Query Log

    -
    -
    -
    -
    -
    - checked> - -
    -
    -
    -
    - checked> - -
    -
    -
    -
    - -
    -
    - -
    -
    -
    -
    -
    -

    Web interface settings

    -
    -
    -
    -
    -

    Interface appearance

    - -
    -
    -
    -
    -
    - checked> - -
    -
    -
    - - -
    - -
    -
    -
    -
    -
    -
    -

    Per-browser settings (auto saved)

    -
    -
    -
    -
    -

    Checkbox and radio buttons

    -
    -
    - -
    -
    -
    -
    -

    CPU Temperature Unit

    -
    -
    - -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    -
    -

    Privacy settings

    -
    -
    -
    -
    -

    DNS resolver privacy level

    -

    Specify if DNS queries should be anonymized, available options are:

    -
    - checked> - -

    Gives maximum amount of statistics

    -
    -
    - checked> - -

    This disables the Top Permitted Domains and Top Blocked Domains tables on the dashboard

    -
    -
    - checked> - -

    This disables all tables on the dashboard

    -
    -
    - checked> - -

    No history is saved at all to the database, and nothing is shown in the query log. Also, there are no top item lists.

    -
    -

    The privacy level may be increased at any time without having to restart the DNS resolver. However, note that the DNS resolver needs to be restarted when lowering the privacy level. This restarting is automatically done when saving.

    - 0 && $piHoleLogging) { ?> -

    Warning: Pi-hole's query logging is activated. Although the dashboard will hide the requested details, all queries are still fully logged to the pihole.log file.

    - -
    -
    -
    - -
    -
    -
    -
    -
    - -
    -
    - -
    - -
    -
    -
    -

    Backup

    -
    -
    -
    -
    -

    Backup your Pi-hole configuration (settings & lists) as a downloadable archive

    - -
    -
    -
    -
    -
    -
    -
    -
    -

    Restore

    -
    -
    -
    -
    - -
    -
    -
    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    -
    -
    - -
    - - Browse... - - - - -
    -

    Upload only Pi-hole backup files.

    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    - -
    -
    -
    - - -
    -
    -
    -

    Teleporter

    -
    -
    -

    The PHP extension Phar is not loaded. Please ensure it is installed and loaded if you want to use the Pi-hole teleporter.

    -
    -
    -
    -
    -