Skip to content
hostnames for all
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
CNAME
LICENSE
README.md
_config.yml
dnsdist.conf

README.md

ipname

hostnames for all

description

This is a free public service that resolves any domain name to it's IP address. If no IP Address in the hostname, then this dns service will reply with your IP Address usage

    192.168.1.1.ipname.me ---> 192.168.1.1
foo.192.168.1.1.ipname.me ---> 192.168.1.1
www.192-168-1-1-ipname.me ---> 192.168.1.1

but

thisisnotarealdomain.tld ---> 116.203.115.192

dig examples

$ dig +short @ipname.me 10.20.30.40
10.20.30.40

$ dig +short @ipname.me www.192.168.1.1
192.168.1.1

$ dig +short @ipname.me www.192-168-1-1-ipname.me
192.168.1.1

$ dig +short @ipname.me example-93.184.216.34-org
93.184.216.34

but

$ dig +short @ipname.me googleyahoo.com
116.203.115.192

who it works

dnsdist supports Lua via LuaJIT, so we can use string.match for our pattern matching.

string.match(reply, "%d+%.%d+%.%d+%.%d+")

then we access the FFI library, which allows calling external C functions and using C data structures from pure Lua code. And with the help of INET_PTON, we can validate the IPv4 from the hostname!


The entire configuration is about 42lines!!! You can check it here: [dnsdist.conf](dnsdist.conf)

update:

mentions

inspired by xip.io & ifconfig.co

Powered by dnsdist & lua

footnote

This is only for testing purposes, do not use it for production service.

You can’t perform that action at this time.