logoalt Hacker News

JimDabelltoday at 4:34 PM2 repliesview on HN

*.localhost works out of the box doesn’t it? You don’t need dnsmasq at all to have multiple hostnames pointing to 127.0.0.1.


Replies

winstonwinstontoday at 6:30 PM

*.example-private point is to have multiple machines using private addresses such as web.example-private in A 192.168.0.100 and db1.example-private in A 192.168.0.101.

If you just want to resolve 127.0.0.1 then you just resolve hostname "localhost" or use 127.0.0.1 directly.

Personally i don't bother configuring custom private dns zones, instead i use reserved MDNS *.local that autoconfigure everything using machine name (hostname) and DHCP address: somehostname.local in A <dhcp assigned ip>.

bombcartoday at 5:07 PM

You often have internal private IPs you want to resolve to things that aren't localhost