--- /dev/null
+{% extends "../../base.html" %}
+
+{% block title %}{{ _("How To Use?") }} - {{ _("DNS") }}{% end block %}
+
+{% block container %}
+ <section class="hero is-light">
+ <div class="hero-body">
+ <div class="container">
+ <nav class="breadcrumb" aria-label="breadcrumbs">
+ <ul>
+ <li>
+ <a href="/">
+ {{ _("Home") }}
+ </a>
+ </li>
+ <li>
+ <a href="/location">
+ {{ _("Location") }}
+ </a>
+ </li>
+ <li>
+ <a href="/location/how-to-use">
+ {{ _("How To Use?") }}
+ </a>
+ </li>
+ <li class="is-active">
+ <a href="#" aria-current="page">{{ _("DNS") }}</a>
+ </li>
+ </ul>
+ </nav>
+
+ <h1 class="title">{{ _("DNS") }}</h1>
+ </div>
+ </div>
+ </section>
+
+ <section class="section">
+ <div class="container">
+ <div class="block">
+ <p class="is-size-5">
+ If you cannot use the IPFire Location database on your hosts,
+ we offer a DNS service to query parts of the data just by
+ sending a DNS query allowing to integrate this database into
+ more applications.
+ </p>
+ </div>
+
+ <div class="block">
+ <p class="is-size-5">
+ Queries function on the principle of reverse lookups and are
+ fast and globally cacheable.
+ </p>
+ </div>
+
+ <div class="notification">
+ This is a new, experimental feature. The API, behaviour and format of the
+ responses might be subject to change.
+ </div>
+ </div>
+ </section>
+
+ <section class="section">
+ <div class="container">
+ <h4 class="title is-4">
+ {{ _("Query Country Codes") }} - <code>cc.location.ipfire.org</code>
+ </h4>
+
+ <div class="content">
+ <p>
+ You can query the country code of an IP address.
+ </p>
+ </div>
+
+ <pre><code>$ dig +short TXT 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.2.b.0.8.7.6.0.1.0.0.2.cc.location.ipfire.org
+"DE"
+
+$ dig +short TXT 38.27.3.81.cc.location.ipfire.org
+"DE"</code></pre>
+ </div>
+ </section>
+
+ <section class="section">
+ <div class="container">
+ <h4 class="title is-4">
+ {{ _("Query Origins") }} - <code>origin.location.ipfire.org</code>
+ </h4>
+
+ <div class="content">
+ <p>
+ You can query the origin of an IP address which will give you
+ the AS number and name where that IP address originates from.
+ </p>
+ </div>
+
+ <pre><code>$ dig +short TXT 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.2.b.0.8.7.6.0.1.0.0.2.origin.location.ipfire.org
+"AS204867 - Lightning Wire Labs GmbH"
+
+$ dig +short TXT 38.27.3.81.origin.location.ipfire.org
+"AS24679 - kyberio GmbH"</code></pre>
+ </div>
+ </section>
+
+ <section class="section">
+ <div class="container">
+ <h4 class="title is-4">
+ {{ _("Query AS Names") }} - <code>asn.location.ipfire.org</code>
+ </h4>
+
+ <div class="content">
+ <p>
+ Resolve an AS number into a human-readable description.
+ </p>
+ </div>
+
+ <pre><code>$ dig +short TXT 204867.asn.location.ipfire.org
+"Lightning Wire Labs GmbH"
+
+$ dig +short TXT 3320.asn.location.ipfire.org
+"Deutsche Telekom AG"
+
+$ dig +short TXT 15169.asn.location.ipfire.org
+"Google LLC"</code></pre>
+ </div>
+ </section>
+
+ <section class="section">
+ <div class="container">
+ <h4 class="title is-4">
+ {{ _("Query Bogons") }} - <code>bogons.location.ipfire.org</code>
+ </h4>
+
+ <div class="content">
+ <p>
+ Check if an IP address is considered being a bogon.
+
+ That means that if an IP address is not part of the global routing
+ table, we will return <code>127.0.0.2</code>,
+ otherwise we will return <code>NXDOMAIN</code>.
+ </p>
+ </div>
+
+ <pre><code>$ dig +short A 0.0.0.10.bogons.location.ipfire.org
+127.0.0.2</code></pre>
+ </div>
+ </section>
+{% end block %}
(r"/location/download", tornado.web.RedirectHandler, { "url" : "/location/install" }),
(r"/location/how\-to\-use", StaticHandler, { "template" : "location/how-to-use/index.html" }),
(r"/location/how\-to\-use/cli", StaticHandler, { "template" : "location/how-to-use/cli.html" }),
+ (r"/location/how\-to\-use/dns", StaticHandler, { "template" : "location/how-to-use/dns.html" }),
(r"/location/how\-to\-use/python", StaticHandler, { "template" : "location/how-to-use/python.html" }),
(r"/location/install", StaticHandler, { "template" : "location/install.html" }),
(r"/location/lookup/(.+)", location.LookupHandler),