This commit is contained in:
alyssadev 2024-05-13 13:41:24 +10:00
commit 569c7a9578
3 changed files with 208 additions and 0 deletions

19
docker-compose.yml Normal file
View file

@ -0,0 +1,19 @@
version: "3"
services:
nipio:
build:
context: .
restart: unless-stopped
environment:
NIPIO_DOMAIN: ip.alyria.dev
NIPIO_TTL: 432000
NIPIO_NONWILD_DEFAULT_IP: 175.45.182.31
NIPIO_SOA_ID: 5
NIPIO_SOA_HOSTMASTER: aly@alyria.dev
NIPIO_SOA_NS: ip-ns1.alyria.dev
NIPIO_NAMESERVERS: ip-ns1.alyria.dev=175.45.182.31 ip-ns2.alyria.dev=175.45.182.31
NIPIO_BLACKLIST: multicast=0.0.0.0
ports:
- "175.45.182.31:53:53"
- "175.45.182.31:53:53/udp"

52
docs/app.css Normal file
View file

@ -0,0 +1,52 @@
body, .pure-g [class*="pure-u"] {
font-family: 'Lato', sans-serif;
background-color: #F6F8FF;
line-height: 1.3;
color: #222222;
margin-bottom: 2em;
}
header {
color: #08415c;
border-bottom: 1px solid #222222;
margin-bottom: 2em;
}
h2 {
margin-top: 1.5em;
}
a {
color: #D9658D;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
code {
font-weight: bold;
font-size: 95%;
}
/* from https://css-tricks.com/snippets/css/triangular-list-bullets/ */
ul {
margin: 0.75em 0;
padding: 0 1em 0 1.1em;
list-style: none;
}
li:before {
content: "";
border-color: transparent #222222;
border-style: solid;
border-width: 0.35em 0 0.35em 0.45em;
display: block;
height: 0;
width: 0;
left: -1em;
top: 0.9em;
position: relative;
}

137
docs/index.html Normal file
View file

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>ip.alyria.dev - wildcard DNS for any IP Address, powered by nip.io</title>
<link rel="stylesheet" href="https://unpkg.com/purecss@1.0.0/build/pure-min.css"
integrity="sha384-nn4HPE8lTHyVtfCBi5yW9d20FjT8BJwUXyWZT9InLYax14RDjBj46LmSztkmNP9w" crossorigin="anonymous"/>
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
<link rel="stylesheet" href="app.css" type="text/css"/>
</head>
<body>
<div class="pure-g">
<div class="pure-u-1-5"></div>
<div class="pure-u-3-5">
<header>
<h1 class="header">ip.alyria.dev</h1>
</header>
<article>
<h2>Dead simple wildcard DNS for any IP Address</h2>
<p>
Stop editing your <code>etc/hosts</code> file with custom hostname and IP address mappings.
</p>
<p>
<a href="/">ip.alyria.dev</a> allows you to do that by mapping any IP
Address to a hostname using the following formats:
</p>
<p>Without a name:</p>
<ul>
<li><code>10.0.0.1.ip.alyria.dev</code> maps to <code>10.0.0.1</code></li>
<li><code>192-168-1-250.ip.alyria.dev</code> maps to <code>192.168.1.250</code></li>
<li><code>0a000803.ip.alyria.dev</code> maps to <code>10.0.8.3</code></li>
</ul>
<p>With a name:</p>
<ul>
<li><code>app.10.8.0.1.ip.alyria.dev</code> maps to <code>10.8.0.1</code></li>
<li><code>app-116-203-255-68.ip.alyria.dev</code> maps to <code>116.203.255.68</code></li>
<li><code>app-c0a801fc.ip.alyria.dev</code> maps to <code>192.168.1.252</code></li>
<li><code>customer1.app.10.0.0.1.ip.alyria.dev</code> maps to <code>10.0.0.1</code></li>
<li><code>customer2-app-127-0-0-1.ip.alyria.dev</code> maps to <code>127.0.0.1</code></li>
<li><code>customer3-app-7f000101.ip.alyria.dev</code> maps to <code>127.0.1.1</code></li>
</ul>
<p>
<a href="/">ip.alyria.dev</a> maps <code>&lt;anything&gt;[.-]&lt;IP Address&gt;.ip.alyria.dev</code> in
<strong>&quot;dot&quot;</strong>, <strong>&quot;dash&quot;</strong> or <strong>&quot;hexadecimal&quot;</strong> notation to the corresponding
<code>&lt;IP Address&gt;</code>:
</p>
<ul>
<li>dot notation: <code>magic.127.0.0.1.ip.alyria.dev</code></li>
<li>dash notation: <code>magic-127-0-0-1.ip.alyria.dev</code></li>
<li>hexadecimal notation: <code>magic-7f000001.ip.alyria.dev</code></li>
</ul>
<p>
The &quot;dash&quot; and &quot;hexadecimal&quot; notation is especially useful when using services like
<a href="https://letsencrypt.org/" target="_blank">LetsEncrypt</a> as it's just a regular sub-domain
of <a href="/">ip.alyria.dev</a>
</p>
<h2>About this service</h2>
<p>
<a href="/">ip.alyria.dev</a> is powered by <a href="http://www.powerdns.com/" target="_blank">PowerDNS</a> with a simple,
custom
<a href="https://doc.powerdns.com/authoritative/backends/pipe.html" target="_blank">PipeBackend</a>
written in Python:
<a href="https://github.com/exentriquesolutions/nip.io/blob/master/nipio/backend.py" target="_blank" rel="nofollow">backend.py</a>
</p>
<p>
It's open source, licensed under Apache 2.0:
<a href="https://github.com/exentriquesolutions/nip.io" target="_blank" rel="nofollow">https://github.com/exentriquesolutions/nip.io</a>
&#8212; pull requests are welcome.
</p>
<p>
This is a free service provided by
<a href="https://alyria.dev" target="_blank">Aly</a>, based on
<a href="https://nip.io" target="_blank">nip.io</a>, created by
<a href="http://exentriquesolutions.com" target="_blank">Exentrique Solutions</a>
(the same people who run <a href="https://xp-dev.com" target="_blank">XP-Dev.com</a> which offer
<a href="https://xp-dev.com" target="_blank">Git, Mercurial and Subversion hosting</a>).
</p>
<p>
Feedback is appreciated; for concerns with this instance, email the address found at <a href="https://alyria.dev" target="_blank">alyria.dev</a>. Otherwise, just
<a href="https://github.com/exentriquesolutions/nip.io/issues" target="_blank" rel="nofollow">
raise an issue in GitHub
</a>.
</p>
<h2>Troubleshooting</h2>
<h3>DNS Rebinding Protection</h3>
<p>
Some DNS resolvers, forwarders and routers have
<a href="https://en.wikipedia.org/wiki/DNS_rebinding" target="_blank">DNS rebinding protection</a>
which may result in failure to resolve local and private IP addresses.
This service won't work in those situations.
</p>
<h2>Related Services</h2>
<ul>
<li>
<a href="https://nip.io/" target="_blank">nip.io</a>: This is an instance of nip.io
</li>
<li>
<a href="https://github.com/Corollarium/localtls" target="_blank">localtls</a>:
A DNS server in Python3 to provide TLS to webservices on local addresses.
It resolves addresses such as '192-168-0-1.yourdomain.net' to 192.168.0.1 and has a valid TLS certificate for them.
</li>
<li>
<a href="https://sslip.io/" target="_blank">sslip.io</a>: Alternative to this service, supports IPv6 and custom domains.
</li>
<li>
<a href="https://local.gd/" target="_blank">local.gd</a>: Alternative to this service, where everything is mapped to localhost/127.0.0.1.
</li>
</ul>
</article>
</div>
<div class="pure-u-1-5"></div>
</div>
</body>
</html>