43 ms·
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
by tlb 6y ago
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/ http://4.3.2.1.in-addr.arpa/ and it'd resolve to 1.2.3.4. But not now.
- 1_player 6y agohttp://xip.io/ http://xip.io/ does, until it's turned off.
- sofixa 6y agoWhat do you mean turned off?
- lucb1e 6y agoIt's not as if it's built into the protocol, operated decentrally and guaranteed to work. Someone generously operates the service. At least that's what I assume GP meant.
- chtitux 6y agoWhen using an external service like this one, you have no guarantee: - 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.
- strenholme 6y agoIt’s also possible to run it yourself, as I point out elsewhere in the thread (complete with the Lua script to run the code). 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-github/tools/coLunacyDNS/README.md https://github.com/samboy/MaraDNS/blob/master/deadwood-githu...
- enduser 6y agoin-addr.arpa is for reverse lookups. It is how IPs resolve to names. The address is reversed to allow delegation of IP ranges to DNS servers that are “closer” to the IP address. 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).
- tlb 6y agoSure, the PTR record gives the name. But I seem to remember it also returning A records with the corresponding IP address.
- gnfargbl 6y agoaddr.host, e.g. https://209.216.230.240.addr.host/ https://209.216.230.240.addr.host/
- judge2020 6y agofyi https://news.ycombinator.com/item?id=26216790 https://news.ycombinator.com/item?id=26216790, this is another registered domain which is generously being ran for free for now. Don't rely on it.
- strenholme 6y agoI have written a very simple (IPv4/IPv6 addresses only) DNS server which can use Lua to determine the IPs to return to the user (It was my big “do cool open source during the pandemic” project). To implement this particular problem, I whipped up this Lua script: -- 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-github/tools/coLunacyDNS/README.md https://github.com/samboy/MaraDNS/blob/master/deadwood-githu...