Live data from Hacker News

Xip.io - a magic domain name that provides wildcard DNS for any IP address

xip.io

101–110 of 128 posts

Re: Xip.io - a magic domain name that provides wildcard DNS for any IP address

#101
Couldn't you accomplish this with djbdns' dnsrewrite or pdns_recursor's lua scripting?

Why anyone would want to write DNS server (=something that needs to be very fast) in Javascript is beyond my comprehension. The ASCII art is probably better work than the DNS server.

Re: Xip.io - a magic domain name that provides wildcard DNS for any IP address

#103
post #82

I have a dd-wrt router with DNSmasq functioning as the DNS server for local hosts. DNSmasq resolves external domains using Google DNS (8.8.8.8/8.8.4.4). With this setup, domain names like 192.168.X.X.xip.io and 127.X.X.X.xip.io won't resolve, and I believe there is something wrong with my DNSmasq setup. Anyone else ran into similar issues? (Update) Problem solved by myself. The DNSmasq config has stop-dns-rebind opti…

Or you can add rebind-domain-ok=xip.io to dnsmasq.conf. Not that I would do that myself, as I still don't see what value it provides.

Re: Xip.io - a magic domain name that provides wildcard DNS for any IP address

#104

Earlier quoted context omitted.

> For example, with XMPP servers, multi-user chat and any components must live on a subdomain. This is only necessary if you want users outside your domain to access your component. While you probably want to do so for MUC, you might not necessarily want to bother for your user directory or gateways. I've run many servers over the years and long since stopped creating a host/subdomain for each component.

Interesting, this must be a shortcoming of OpenFire then. With OpenFire I haven't found a way around having the MUC and extension subdomains accessible via DNS, regardless of whether or not requests are coming from the same domain or not. Is this not necessary with other XMPP servers? Which ones are you using, if I may ask?

It is indeed a shortcoming of OpenFire; one that won't be fixed [1].

As far as the XMPP protocol is concerned, the concept of sub-domains doesn't matter. It's useful for human users when configuring servers though.

Prosody for example allows running a multi-user chat service on example.com. And there's an undocumented feature which let's you have user@example.com be a user, and room@example.com be a chatroom.

[1] http://issues.igniterealtime.org/browse/OF-162

Re: Xip.io - a magic domain name that provides wildcard DNS for any IP address

#105

Earlier quoted context omitted.

I find it interesting that we are required to do a second round-trip for the CNAME when it is available in the same bailiwick and could be sent as part of either the ADDITIONAL SECTION or as part of the ANSWER SECTION. Would you happen to know what the RFC has to say on this? I understand that CNAME's are not allowed to exist with other records, but returning it in the ADDITIONAL SECTION shouldn't be a cause for conc…

Once a CNAME exists for a name, no record of any other type may exist for that same name (it's an override for all types). But for a query like this, a server is allowed to return both a CNAME and its relevant target(s) ... as long as they are within-bailiwick. It can go right into the answer section, e.g.; % dig example.allcosts.net @ns-22.awsdns-02.com. ... ;; ANSWER SECTION: example.allcosts.net. 300 IN CNAME at.a…

In fact, returning both the CNAME and the A in the initial response is required. Returning just the CNAME and setting NOERROR tells a recursor 'the target name exists but I do not have an A record for it'. Luckily, all recursors I am aware of are stubborn and will then ask for the A anyway.

Re: Xip.io - a magic domain name that provides wildcard DNS for any IP address

#106

I've identified several technical problems with this domain, and this isn't an example of how to properly operate DNS. 37signals is setting an absurdly low TTL on these records (10 minutes; the answers never change, I absolutely do not understand the logic behind this TTL), which means every 10 minutes you're re-resolving a local address , through a CNAME (so two DNS round trips, and in my case this resolution took b…

Hopefully they will solve this problem at some point, but if you want an alternative fast, couldn't you consider using services like dyndns, noip, etc?

I use the following script which I found somewhere (can't remember where) and modified: https://gist.github.com/2894514

You can run it:

    avahi_publish.py service1 service2
Then

    curl http://service1.local:8000/bla
It's linux only of course :)

Re: Xip.io - a magic domain name that provides wildcard DNS for any IP address

#107

Couldn't you accomplish this with djbdns' dnsrewrite or pdns_recursor's lua scripting? Why anyone would want to write DNS server (=something that needs to be very fast) in Javascript is beyond my comprehension. The ASCII art is probably better work than the DNS server.

Or unbound's python scripting. Or if GeoScaling slightly improves its excellent smart subdomain service, 2 lines of php script.

Re: Xip.io - a magic domain name that provides wildcard DNS for any IP address

#108

Earlier quoted context omitted.

Once a CNAME exists for a name, no record of any other type may exist for that same name (it's an override for all types). But for a query like this, a server is allowed to return both a CNAME and its relevant target(s) ... as long as they are within-bailiwick. It can go right into the answer section, e.g.; % dig example.allcosts.net @ns-22.awsdns-02.com. ... ;; ANSWER SECTION: example.allcosts.net. 300 IN CNAME at.a…

In fact, returning both the CNAME and the A in the initial response is required. Returning just the CNAME and setting NOERROR tells a recursor 'the target name exists but I do not have an A record for it'. Luckily, all recursors I am aware of are stubborn and will then ask for the A anyway.

This is a good example of where things get tricky in DNS. A resolver could never really infer non-existence of the A record from mere non-presence in an answer like that.

Although RFC1034 outlines that a server typically would do that, it also says that it shouldn't include data that it's not authoritative for.

So a conflict arises when you CNAME to a sub-delegated child zone. E.g.

  foo.example.com IN CNAME baz.example.com
That response may come from a server that's authoritative for example.com - and so "baz.example.com" is technically in-bailiwick from the point of view of a resolver who has made only this query.

However baz.example.com may itself be delegated to other nameservers, and so is "really" out of bailiwick. But the response won't signal this to resolvers at this stage (though in theory could via the additional section).

The simplest reason why resolvers ignore it though is that there's no SOA in the response from which to derive the negative caching time - so it wouldn't know how long to cache that non-existence - and almost all resolvers are caches.

Re: Xip.io - a magic domain name that provides wildcard DNS for any IP address

#109

I've identified several technical problems with this domain, and this isn't an example of how to properly operate DNS. 37signals is setting an absurdly low TTL on these records (10 minutes; the answers never change, I absolutely do not understand the logic behind this TTL), which means every 10 minutes you're re-resolving a local address , through a CNAME (so two DNS round trips, and in my case this resolution took b…

Actually, a low TTL is ideal for testing purposes. While you're correct that a query will never give a different answer, a low TTL ensures that the name won't linger in any resolver's cache for very long, which makes it less easy to discover. This also makes the arbitrary string chosen as a subdomain particularly ephemeral, which is important when testing name-based virtual hosts. Why leave a testing domain stuck indefinitely in the cache of a resolver I don't control? I'd rather have it disappear when I'm not using it.

Re: Xip.io - a magic domain name that provides wildcard DNS for any IP address

#110

Earlier quoted context omitted.

How are you going to add an entry to the hosts file on an iPhone?

Buy (or dig out of your closet) an old Wifi router and install Tomato on it. Its web interface lets you edit its hosts file which is then active for all the devices connected to it.

Except many of us don't have Tomato/DD-WRT capable devices, not to mention I can't be bothered setting up an additional router to my current two, flashing and securing it and then switching my devices over to it just to test something when this solution does essentially the same thing.
Post reply on HN