From: Michael Tremer Date: Mon, 1 Apr 2024 12:08:51 +0000 (+0000) Subject: location: Create page for the new DNS feature X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=521592f23e3c665d107571bc2c28b528a350412a;p=ipfire.org.git location: Create page for the new DNS feature Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index fa2cfc2a..8c42243a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -270,6 +270,7 @@ templates_locationdir = $(templatesdir)/location templates_location_how_to_use_DATA = \ src/templates/location/how-to-use/cli.html \ + src/templates/location/how-to-use/dns.html \ src/templates/location/how-to-use/index.html \ src/templates/location/how-to-use/python.html diff --git a/src/templates/location/how-to-use/dns.html b/src/templates/location/how-to-use/dns.html new file mode 100644 index 00000000..66f34cd7 --- /dev/null +++ b/src/templates/location/how-to-use/dns.html @@ -0,0 +1,146 @@ +{% extends "../../base.html" %} + +{% block title %}{{ _("How To Use?") }} - {{ _("DNS") }}{% end block %} + +{% block container %} +
+ +
+ +
+
+
+

+ 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. +

+
+ +
+

+ Queries function on the principle of reverse lookups and are + fast and globally cacheable. +

+
+ +
+ This is a new, experimental feature. The API, behaviour and format of the + responses might be subject to change. +
+
+
+ +
+
+

+ {{ _("Query Country Codes") }} - cc.location.ipfire.org +

+ +
+

+ You can query the country code of an IP address. +

+
+ +
$ 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"
+
+
+ +
+
+

+ {{ _("Query Origins") }} - origin.location.ipfire.org +

+ +
+

+ You can query the origin of an IP address which will give you + the AS number and name where that IP address originates from. +

+
+ +
$ 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"
+
+
+ +
+
+

+ {{ _("Query AS Names") }} - asn.location.ipfire.org +

+ +
+

+ Resolve an AS number into a human-readable description. +

+
+ +
$ 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"
+
+
+ +
+
+

+ {{ _("Query Bogons") }} - bogons.location.ipfire.org +

+ +
+

+ 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 127.0.0.2, + otherwise we will return NXDOMAIN. +

+
+ +
$ dig +short A 0.0.0.10.bogons.location.ipfire.org
+127.0.0.2
+
+
+{% end block %} diff --git a/src/templates/location/how-to-use/index.html b/src/templates/location/how-to-use/index.html index 97e1eed1..1448d50c 100644 --- a/src/templates/location/how-to-use/index.html +++ b/src/templates/location/how-to-use/index.html @@ -65,7 +65,7 @@ {{ _("Lua") }} - + {{ _("DNS") }} diff --git a/src/web/__init__.py b/src/web/__init__.py index 48a13605..42b0c3e9 100644 --- a/src/web/__init__.py +++ b/src/web/__init__.py @@ -199,6 +199,7 @@ class Application(tornado.web.Application): (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),