I’m running a local DNS server on my laptop, best idea. Why is that not a common practice?

@yyp not really (well YMMV), basically follow a DNS server install instructions for your OS and limit it to queries from localhost like

@julienxx because it is slow.

In fact, any distro will probably run a caching resolver (so in essence a dns server) mostly via systemd-resolve as of today.

But a real, root querying resolver? You essentially need to lookup every domain from scratch, which is much much slower than just using one that already has it in the cache

@sirjofri @reto oh no not a root querying resolver I’m just running a local recursive resolver

@julienxx because many systems have something like a hosts file which is basically it, and most homes have a router which is also a DNS?

@sirjofri @julienxx most consumer routers aren't a resolving DNS server but only a caching one that fetches from the ISP DNS servers.

And your normal systems (least on the Linux distros) do the same thing, running a local caching resolver

@reto @julienxx normally you have a hosts file where you can add names and ips manually. It's technically not using DNS, but works in a similar manner for the local pc. Some use it to filter out spotify ads, for example, or to make short names for servers. On linux it's /etc/hosts and on windows it's inside the system32 directory, I think.

@sirjofri @julienxx sure, depends on how you setup nsswitch.conf.
Although that's a poor mans way of configuring an adblock... there are multiple programming languages that don't use the glibc wrapper and hence may ignore the entries.

@reto @julienxx I only used in a standard configuration like most distributions and windows are. I doubt people change the configuration that much. And I'm not a linux user anymore...

check out Stubby, available on some distributions, local dns server running only encrypted queries, been using it for some years and works fine with no config required!

Sign in to participate in the conversation

A Plan 9 oriented server.