mirror of
https://codeberg.org/slatian/service.echoip-slatecave.git
synced 2025-07-17 14:33:27 +02:00
Made dns more useful
This commit is contained in:
@ -26,8 +26,9 @@
|
||||
<nav>
|
||||
<a href="{{ extra.base_url }}" class="sitename">{{extra.site_name|default(value="echoip")}}</a>
|
||||
<form class="search" method="GET" action="{{ extra.base_url }}">
|
||||
<input type="text" name="query" autocomplete="on" maxlength="260"
|
||||
<input type="search" name="query" autocomplete="on" maxlength="260"
|
||||
title="Search for an IP-Adress, Domain-Name, or ASN."
|
||||
placeholder="1.2.3.4, 2001::1:2:3:4, example.org, AS1234"
|
||||
value="{% if view == "dig" %}{{ data.query }}{% elif view == "ip" %}{{ data.result.address }}{% elif view == "asn"%}AS{{ data.asn }}{% endif %}"/>
|
||||
<input type="submit" value="Query"/>
|
||||
</form>
|
||||
@ -39,5 +40,10 @@
|
||||
<p>If you see this the templating is broken. Greetings from the base template.</p>
|
||||
{% endblock %}
|
||||
</main>
|
||||
<footer>
|
||||
<p>You can find the <a href="https://codeberg.org/slatian/service.echoip-slatecave">echoip-slatecave sourcecode on Codeberg</a>. If you found a bug or have an idea, feature, etc. please get in touch (I also accept E-Mails!).</p>
|
||||
<!-- If you made your own template, link to it here -->
|
||||
<p>This service works in its current form because nobody is abusing it, please keep that in mind. If you want to do frequent automated requests please host your own instace. Thank you for being awesome!</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -25,6 +25,40 @@
|
||||
{% set r = data.result.records %}
|
||||
<section>
|
||||
<h2>DNS Records</h2>
|
||||
|
||||
{% if r.nxdomain %}
|
||||
<p class="error box">Our DNS-Server claims that this domain doesn't exist, you shouldn't see any results below.</p>
|
||||
{% elif r.timeout %}
|
||||
<p class="error box">There was at least one timeout error while resolving this domain, the results below are incomplete.</p>
|
||||
{% elif r.other_error %}
|
||||
<p class="error box">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.</p>
|
||||
{% endif %}
|
||||
|
||||
{% if r.dns_error %}
|
||||
<p class="error box">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.</p>
|
||||
{% endif %}
|
||||
|
||||
{% if r.cname %}
|
||||
<p>This domain has a cname set, this means its contents are full replaced by the linked record.</p>
|
||||
|
||||
<p class="button-paragraph">{{ helper::dig(extra=extra, name=r.cname[1]) }}</p>
|
||||
|
||||
</p>Usually you get the <code>A</code> and <code>AAAA</code> records for the linked record to avoid uneccessary requests. If anything else resolves, that is a violation of the DNS specification.</p>
|
||||
|
||||
{% if r.cname | length > 1 %}
|
||||
<p>This domain resolves to multiple <code>CNAME</code>s, this is not allowed by the DNS specification!</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if r.aname %}
|
||||
<p>This domain has one or multiple <code>ANAME</code> (or <code>ALIAS</code>) records set that the DNS server communicates:</p>
|
||||
<ul class="link-list">
|
||||
{% for aname in r.aname%}
|
||||
<li>{{ helper::dig(extra=extra, name=aname) }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
|
||||
{% if r.a %}
|
||||
<p id="a"><code>A</code> (IPv4) records:</p>
|
||||
<ul class="link-list">
|
||||
@ -52,7 +86,7 @@
|
||||
{% if r.mx %}
|
||||
<p id="mx"><code>MX</code> (Mail Exchange) records:</p>
|
||||
<ul class="link-list">
|
||||
{% for mx in r.mx%}
|
||||
{% for mx in r.mx | sort(attribute="preference") | reverse %}
|
||||
<li>{{ helper::dig(extra=extra, name=mx.exchange, fqdn=true, prefix=mx.preference) }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
@ -60,10 +94,55 @@
|
||||
<p>No <code>MX</code> (Mail Exchange) records.</p>
|
||||
{% endif %}
|
||||
|
||||
{% if r.caa %}
|
||||
<p id="caa"><code>CAA</code> (<a targt="_blank" href="https://de.wikipedia.org/wiki/DNS_Certification_Authority_Authorization">Certification Authority Authorization</a>) records:</p>
|
||||
<ul>
|
||||
{% for caa in r.caa %}
|
||||
<li><code>{{caa}}</code></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p id="caa">No <code>CAA</code> (<a target="_blank" href="https://de.wikipedia.org/wiki/DNS_Certification_Authority_Authorization">Certification Authority Authorization</a>) records.</p>
|
||||
{% endif %}
|
||||
|
||||
{% if r.txt %}
|
||||
<p id="txt"><code>TXT</code> records:</p>
|
||||
<ul>
|
||||
{% for txt in r.txt %}
|
||||
<li><code>{{txt}}</code></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p id="txt">No <code>TXT</code> records.</p>
|
||||
{% endif %}
|
||||
|
||||
{% if r.srv %}
|
||||
<p id="srv"><code>SRV</code> records:</p>
|
||||
<ul class="link-list">
|
||||
{% for srv in r.srv %}
|
||||
<dl class="box">
|
||||
<dt>Priority</dt>
|
||||
<dd>{{srv.priority}}</dd>
|
||||
<dt>Weight</dt>
|
||||
<dd>{{srv.weight}}</dd>
|
||||
<dt>Port</dt>
|
||||
<dd>{{srv.port}}</dd>
|
||||
<dt>Target</dt>
|
||||
<dd>{{ helper::dig(extra=extra,name=srv.target) }}</dd>
|
||||
</dl>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p id="srv">No <code>SRV</code> records.</p>
|
||||
<p><code>SRV</code> or Service records usually live on their own subdomains like {{ helper::dig(extra=extra, name="_xmpp-client._tcp."~data.query) }}.
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% else %}{# if data.partial_lookup #}
|
||||
<p>To save resources the above is only a partial lookup.</p>
|
||||
<p class="button-paragraph"><a href="{{ helper::dig_link(extra=extra, name=data.query) }}">Extended DNS Lookup for <code>{{ data.query }}</code>.</a></p>
|
||||
{% endif %}
|
||||
|
||||
</section>
|
||||
|
||||
<section>
|
||||
@ -71,5 +150,13 @@
|
||||
{{ links::domain_name_links(name=idn.idn|default(value=data.query))}}
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Programatic Lookup</h2>
|
||||
<p>If you want to look up this information in another program the short answer is <b>don't, look up the names using your local DNS!</b></p>
|
||||
<p>On most systems on the commandline you have commands like <code>host</code> and <code>dig</code> even when not present you can probably use <code>ping</code> as a workaround as it resolves the name and gives you the IP-Address it is pinging.</p>
|
||||
<h3>Why queryting this service is still useful</h3>
|
||||
<p>This service most probably doesn't share its cache with your local resolver, this way you have a way to see if your DNS-change had the effect it should have.</p>
|
||||
<p>It may also be useful for debugging other dns problems or to get around a local resolver that is lying to you because your ISP is a <i>something</i>.</p>
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
||||
|
@ -20,10 +20,10 @@
|
||||
<h2>Your User Agent</h2>
|
||||
<p>The program you were using to download this page <a href="https://en.wikipedia.org/wiki/User_agent">identified itself</a> as <code>{{ data.user_agent }}</code></p>
|
||||
<p>While this doesn't have to do anything with your public IP-Adress this might be useful information.</p>
|
||||
<p>You can use the <code><a href="{{ extra.base_url}}/ua">/ua</a></code> endpoint to fetch this information with any client</p>
|
||||
<p>You can use the <code><a href="{{ extra.base_url}}/ua">/ua</a></code> endpoint to fetch this information with any client.</p>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Did you know?</h2>
|
||||
<p>If you share this site and the Link gets a preview. The IP-Address after the dash is the one of the machine that generated that preview</p>
|
||||
<p>If you share this site and the Link gets a preview. The IP-Address after the dash is the one of the machine that generated that preview.</p>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user