[HN Gopher] Show HN: Backname.io - every IP address gets its own...
       ___________________________________________________________________
        
       Show HN: Backname.io - every IP address gets its own domain
        
       I was setting up tests involving DNS resolution recently, where
       something like 127.0.0.1.service.foo would have been tremendously
       useful. Back in the day, I'd have used xip.io - but sadly that
       service died.  Well, every excuse is a good one when it comes to
       writing a DNS server! Backname.io joins nip.io and sslip.io in the
       wildcard DNS game.
        
       Author : Twixes
       Score  : 24 points
       Date   : 2023-09-28 15:27 UTC (7 hours ago)
        
 (HTM) web link (backname.io)
 (TXT) w3m dump (backname.io)
        
       | ttymck wrote:
       | Does this serve the same purpose as .in-addr.arpa?
        
         | globular-toast wrote:
         | That's for reverse DNS. This is forward DNS. Think of it like a
         | domain that maps to every possible IP address.
        
       | eyepeevee wrote:
       | Nice. I've seen other usecases for this.
       | 
       | Accessing an IPv4 address on a IPv6-only network with NAT64/DNS64
       | is only possible if you access that IPv4 via a DNS name that
       | resolves to the IPv4 address. DNS64 will turn your A record into
       | an AAAA record, with the IPv4 address mapped to a v6 addrsss that
       | the NAT64 layer knows how to "undo".
       | 
       | I've seen others need this a few times in practice.
        
       | theyknowitsxmas wrote:
       | http://afraid.org
        
       | gitgud wrote:
       | This is cool! So I can spin up a server, then instantly get a
       | domain and then an SSL cert, nice!
        
       | YaBa wrote:
       | I'm failing to see the utility of this if I still have to type
       | the IP address. Also, it fails using local address like
       | 192-168-1-1.backname.io where it might be usefull somehow, so,
       | please explain. Thanks.
        
         | globular-toast wrote:
         | I didn't understand first either. I first discovered these
         | playing around with Rancher which would use xip.io for the same
         | thing.
         | 
         | The point is some protocols require you to actually resolve a
         | domain name. For example, if you set up a vhost or reverse
         | proxy with Apache or nginx, it will use the domain name to
         | figure out what vhost you were trying to access. When you
         | request a page like google.com the browser resolves that to an
         | IP address, but it sends google.com with the request.
         | 
         | So say you have a reverse proxy at 1.2.3.4. You could make two
         | vhosts: site1.1.2.3.4.backname.io and site2.1.2.3.4.backname.io
         | and it would just work from any browser on your network.
         | 
         | You can do this locally using the hosts file before you set up
         | your DNS for real, but a service like this means you don't even
         | have to do that. Useful for quick experiments.
        
         | SahAssar wrote:
         | 192-168-1-1.backname.io works for me. It might be useful to get
         | DV certs for temporary things that need HTTPS.
         | 
         | I've done a sorta similar thing to enable HTTPS for local
         | network IPs for IoT:
         | https://news.ycombinator.com/item?id=36593547
        
       | globular-toast wrote:
       | xip.io was indeed useful. nip.io seems to still work.
       | 
       | Isn't the main useful aspect that you can do
       | xyz.1.2.3.4.backname.io where xyz is anything you want? Perhaps
       | you set this up anyway, but would be worth mentioning.
        
       | pipo234 wrote:
       | > 127-0-0-1.backname.io resolves to 127.0.0.1
       | 
       | Is this enough to fool Edge (Windows 10) into allowing you to
       | view your local Apache development environment?
        
         | repelsteeltje wrote:
         | That should allow access to port 80, maybe. But for TLS, you
         | still need some CA to certify you're you. And you won't be able
         | to convince LetsEncrypt that you control 127-0-0-1.backname.io
         | because it resolves to localhost, which isn't you (from
         | LetsEncrypt's perspective) :-)
        
           | fragmede wrote:
           | Split horizon DNS could work, if you're able to run your own
           | DNS server for your local network.
        
           | pipo234 wrote:
           | :-(
           | 
           | Developing on a webserver that runs locally on your desktop
           | is becoming more an more painful.
        
             | Phrodo_00 wrote:
             | If you want a CA you can just make a CA and add it to your
             | trusted certificates.
        
             | Sohcahtoa82 wrote:
             | Couldn't you bind localhost.yourdomain.com to a public IP,
             | get a certificate, install that certificate locally, then
             | change localhost.yourdomain.com to resolve to 127.0.0.1?
        
             | globular-toast wrote:
             | Use Firefox. No problems at all here.
        
             | valrix wrote:
             | Have you checked out https://www.getlocalcert.net/ yet?
             | They're working on adding more login options than just
             | Github, but they're not quite there yet.
        
             | fragmede wrote:
             | Chrome has an exception for requiring tls on localhost for
             | certain services. That, plus an extension to disable CORS
             | on it has gotten me as far as I've needed (so far). What
             | roadblocks have you come across?
        
       | quickthrower2 wrote:
       | The problem is someone ends up using one of these in production.
       | Then backname.io becomes an attractive target.
       | 
       | It would be cool to have it as a locally installed custom DNS
       | resolver on the developers computer though.
        
       ___________________________________________________________________
       (page generated 2023-09-28 23:01 UTC)