Live data from Hacker News

Ask HN: Local hostnames without root/admin

news.ycombinator.com

21–30 of 35 posts

Re: Ask HN: Local hostnames without root/admin

#22
post #8

1. Buy domain for your service 2. Make wildcard record to point to 127.0.0.1 3. User can apply any.thing.here.yourcompanyinternal.xxx

_Someone_ must have already done this, right?

*.lndo.site 127.0.0.1

This domain is used by https://lando.dev/ which is a docker/docker-compose wrapper for local development.

Re: Ask HN: Local hostnames without root/admin

#26
> think /etc/hosts, but without the requirement of superuser privileges.

It would help if you could expand on this. Is this a "don't want devs to need to mess with their boxes" thing, or a "we're doing shadow IT and can't run things the normal way" thing, or something else?

> Running a resolver locally, or within the LAN, falls outside the realm of "simple".

No, it really doesn't. A DNS server can be a single file binary pointed at a simple text file, optionally pointed directly at a hosts-format file. I suggest coredns personally but there are other options.

Re: Ask HN: Local hostnames without root/admin

#27
>without the requirement of superuser privileges

Like you want to be able to update it without su or that you cant access it at all?

Like you could have a cron running as root that updates etc/hosts every minute based on a userspace text document if you felt like it. It would be incredibly bad practice but I dont get the impression that this is a concern.

>Running a resolver locally, or within the LAN, falls outside the realm of "simple".

Running your own DNS server isnt simple? The standard Microsoft DHCP/DNS process is to take DHCP leases and turn them into DNS entries.

Part of the reason a lot of answers are going to challenge your simple requirements, is that theres a great deal of malware that would love to do what you want to do, and these systems are largely hardened to prevent it.

If this is for an application you want to deploy, I believe "Simple" for userspace, is quite complex to overcome all the things trying to prevent exactly this. My gut feeling is that this desire will evolve into a docker container with a DNS resolver, and just present some kind of interface for adding records. Then just pipe all your DNS requests through the container.

Re: Ask HN: Local hostnames without root/admin

#28
Depending on the details of your setup and precisely why you're attempting this, I would also recommend Avahi/Zeroconf (lets you type "$HOSTNAME.local" or simply populate some favorites/bookmarks on the client machines (typing the bookmark name will generally autocomplete).

Re: Ask HN: Local hostnames without root/admin

#29
post #8

1. Buy domain for your service 2. Make wildcard record to point to 127.0.0.1 3. User can apply any.thing.here.yourcompanyinternal.xxx

_Someone_ must have already done this, right?

Only your domain ! You would not want to use other people. They can see what you request from their DNS server. Since they own the domain they can also get valid certificate ..

Look they are requesting owa.mydomain Why don't I replace it with internet accessible phishing for outlook page ? Why it's bad idea

Post reply on HN