{% extends "base.txt" %} {% block path %}dig/{{ data.query | urlencode_strict }}{% endblock %} {% block content -%} # dig {{data.query}} {% if data.result.idn -%} {%- set idn = data.result.idn -%} ## Internationalized Domain Names Because of some limitations the DNS has, Unicode characters need a special encoding. {%- if idn.original_was == "unicode" -%} Your Unicode query has been encoded as an IDN to generate the results below. ``` {{ idn.idn }} ``` {%- else -%} Your IDN would decode to ``` {{ idn.unicode }} ``` {%- endif -%} {% endif -%} {% set r = data.result.records -%} ## DNS Records {% if r.nxdomain %} Our DNS-Server claims that this domain doesn't exist, you shouldn't see any results below. {%- elif r.timeout -%} There was at least one timeout error while resolving this domain, the results below are incomplete. {%- elif r.other_error -%} An error happened while resolving this name, the results below are incomplete. There was probably some IO issue, the error has been written to the log to help with debugging. {% endif -%} {%- if r.dns_error %} The DNS-Server returned an error code that is not NXDomain, the results are probably incomplete. To help with debugging this has been written to the log. {%- endif -%} {%- if r.cname %} ### CNAME This domain has a cname set, this means its contents are full replaced by the linked record. {{ r.cname[0] }} Usually you get the A and AAAA records for the linked record to avoid unnecessary requests. If anything else resolves, that is a violation of the DNS specification. {% if r.cname | length > 1 -%} This domain resolves to multiple CNAMEs, this is not allowed by the DNS specification! {%- endif %} {% endif -%} {%- if r.aname %} This domain has one or multiple ANAME (or ALIAS) records set that the DNS server communicates: {%- for aname in r.aname -%} * {{aname}} {%- endfor -%} {% endif -%} {%- if r.a %} A (IPv4) records: {% for address in r.a -%} * {{ address }} {% endfor %} {%- else %} No A (IPv4) Records. {% endif -%} {%- if r.aaaa %} AAAA (IPv6) records: {% for address in r.aaaa -%} * {{ address }} {% endfor %} {%- else %} No AAAA (IPv6) Records. {% endif -%} {%- if not data.result.partial_lookup -%} {%- if r.mx %} MX (Mail Exchange) records: {% for mx in r.mx | sort(attribute="preference") | reverse -%} * {{ mx.preference }} {{ mx.exchange }} {% endfor %} {%- else %} No MX (Mail Exchange) records. {% endif %} {%- if r.soa %} SOA (Source Of Authority) records: {% for soa in r.soa %} * MName: {{soa.mname}} * RName: {{soa.rname}} * Serial: {{soa.serial}} * Refresh: {{soa.refresh / 60 | round(precision=2)}}m * Retry: {{soa.retry / 60 | round(precision=2)}}m * expire: {{soa.expire / 3600 | round(precision=2)}}h * minimum: {{soa.minimum / 60 | round(precision=2)}}m TTL {% endfor %} {%- else %} No SOA (Source Of Authority) records. {% endif %} {%- if r.ns %} NS (Name Server) records: {% for ns in r.ns -%} * {{ns}} {% endfor %} {%- else %} No NS (Name Server) records. {% endif %} {%- if r.caa %} CAA (Certification Authority Authorization) records: {% for caa in r.caa -%} * {{caa}} {% endfor %} {%- else %} No CAA (Certification Authority Authorization) records. {% endif %} {%- if r.txt %} TXT records: {% for txt in r.txt -%} * {{txt}} {% endfor %} {%- else %} No TXT records. {% endif %} {%- if r.srv %} SRV records: {% for srv in r.srv %} * Priority: {{srv.priority}} * Weight: {{srv.weight}} * Port: {{srv.port}} * Target: {{srv.target}} {% endfor %} {%- else %} No SRV records. SRV or Service records usually live on their own subdomains like {{ "_xmpp-client._tcp."~data.query }}. {% endif %} {%- else %}{# if data.partial_lookup #} To save resources the above is only a partial lookup. => {{ helper::dig_link(extra=extra, name=data.query) }} {%- endif -%} {% endblock %}