Does someone run a DNS server that will return an IP address directly from the name?
I think once upon a time in-addr.arpa. did this, so you could use http://4.3.2.1.in-addr.arpa/ and it'd resolve to 1.2.3.4. But not now.
I think once upon a time in-addr.arpa. did this, so you could use http://4.3.2.1.in-addr.arpa/ and it'd resolve to 1.2.3.4. But not now.
-- This script is to be run by coLunacyDNS
-- This script takes a query like 10.1.2.3.ip4.invalid. and returns the
-- corresponding IP (e.g. 10.1.2.3 here)
-- Change these IPs to the actual IPs the DNS server will run on
bindIp = "127.0.0.1" -- We bind the server to the IP 127.0.0.1
bindIp6 = "::1" -- Localhost for IPv6
function processQuery(Q) -- Called for every DNS query received
if Q.coQtype == 1 then
local query = Q.coQuery
if query:match("^%d+%.%d+%.%d+%.%d+%.ip4%.invalid%.$") then
local ip = query:gsub("%.ip4%.invalid%.$","")
return {co1Type = "A", co1Data = ip}
end
else
return {co1Type = "notThere"}
end
return {co1Type = "notThere"}
end
One will need coLunacyDNS to run this script: git clone https://github.com/samboy/MaraDNS
cd MaraDNS/deadwood-github/tools/coLunacyDNS
make
sudo cp coLunacyDNS /usr/local/bin
Full documentation for coLunacyDNS is available:https://github.com/samboy/MaraDNS/blob/master/deadwood-githu...
- this service will last forever
- this service won't be acquired by someone else with evil intention and will never lie
Do not use this service. It has the power to steal your traffic.
To summarize:
git clone https://git.sr.ht/~samiam/MaraDNS
cd MaraDNS/deadwood-github/tools/coLunacyDNS
make
sudo cp coLunacyDNS /usr/local/bin
And the script to do the name-to-IP conversion is one of the examples included in the docs:https://github.com/samboy/MaraDNS/blob/master/deadwood-githu...
Only the absence of a matching in-addr.arpa record would “look up” to the IP itself (by failing to look up to a name).