Warda-DNSDocs Warda: from ward — to protect, guardian
v0.9.3

Network → DNS services → Answers (PUT /api/v1/dns-services/policy {"blocked_response": "page"|"null"|"nxdomain"|"refused"|"default", "rate_limit": n}, administrators; meta blocked_response and rate_limit, applied at once and at the start; written to the administration log as dns.policy blocked=<answer> rate=<n>):

  • the answer to a blocked name: from 0.8.3 Block page (page; from 0.8.4 listed first, recommended, and the default): the address of the box, so that a browser shows "Blocked by Warda" with the reason (see Block page; the devices outside the home and the confidential lists keep the null address); the null address (0.0.0.0 for A, :: for AAAA, an empty answer for the other types; the default up to 0.8.3), NXDOMAIN, or REFUSED (most devices then ask their other DNS server, if they have one). The names of the category bypass always get NXDOMAIN;
  • the queries a second allowed to each device (0: no limit, the default; 10 to 10,000): a bucket per client address (each IPv6 address apart: the devices of a home share one /64), bursts of twice the rate; beyond, the query is answered REFUSED, is not written to the journal and is counted (rate_limited in the metrics). The box itself is never limited. Leave 0 when the router sends Warda the queries of the whole network (it is then one client).

The default (from 0.8.4). The meta blocked_response keeps the answer chosen as it is (page, null, nxdomain or refused; up to 0.8.3 the null address chosen was kept empty, see Upgrading to 0.8.4); empty, no answer was chosen and the default applies: the block page where the box can show it, else the null address. An answer chosen is always given as chosen, the block page too (the page then warns as in 0.8.3). The box can show the page when its web interface listens on the ports 80 (WARDA_HTTP_LISTEN) and 443 (WARDA_HTTPS_LISTEN) and its local certificate authority is made: checked at the start (the authority is made then), and again when an administrator comes back to the default or chooses the block page (the authority is made then, if the box started with another answer) or makes a new authority (one that could not be made at the start makes the page the default again). Otherwise the default stays the null address, and the page DNS services says why: "The block page is the default answer, but this box gives the null address for now:" followed by the ports in use, or by "the certificate authority of Warda could not be made (see the log of Warda)" (its error: local certificate authority not made: blocked names get the null address by default).

  • Back to the default: "blocked_response": "default" (from 0.8.4, written blocked=default in the log) empties the meta: no answer chosen. The page DNS services shows the block page selected when none was chosen, and saves it as default as long as the administrator does not touch the list: saving the rate limit alone keeps the default (so a box whose default is the null address never switches by itself to a page the browsers cannot reach). Picking Block page again by hand is a choice (page), kept even where the box cannot show it, for example behind ports published by Docker that it cannot see.
  • Docker: the ports seen are those inside the container. The docker-compose.yml of Warda (packaging/docker-compose.yml, published with each release) uses the network of the host, where they are the ports of the machine, :80 and :443 by default: the default applies. A port mapping of your own (ports:, 8080:80 in a bridged container) is not detected: the box sees 80 and 443 and gives the page, which the browsers then cannot reach. There, map the ports 80 and 443 of the machine, or choose another answer.
  • The API (GET /api/v1/dns-services, its policy): blocked_response is the answer given now; from 0.8.4 blocked_choice is the answer the page shows chosen (page when none was chosen), blocked_default is true when none was chosen, and page_fallback says why the default is the null address on this box (ports: the web interface is not on 80 and 443; authority: no local certificate authority; absent when the default is the page or an answer was chosen).
  • An unknown value (a hand edit, a backup of a later version) gives the null address, with the warning unknown answer to a blocked name: the null address is used in the log.