Back to Devoured - June 04, 2026
DEVOURED
DNS Is for People - Not for IT Infrastructure

DNS Is for People - Not for IT Infrastructure

Tech Louwrentius
An article argues that DNS, while essential for public services, should largely be avoided for internal IT infrastructure to boost reliability, robustness, and security.
What: The author contends that DNS introduces unnecessary complexity and potential failure points for machine-to-machine communication, citing high-profile incidents like the Meta outage. They suggest directly injecting IP addresses into configuration files or using `/etc/hosts` for internal services, and warn of DNS as an egress exfiltration risk if public DNS queries are allowed from internal systems.
Why it matters: This perspective challenges a common industry practice, advocating for a more minimalist and direct approach to internal networking configuration, highlighting how seemingly minor dependencies can have catastrophic "blast radii" in complex systems.
Takeaway: Review your internal IT infrastructure for critical services that rely on DNS and consider if direct IP addressing or `/etc/hosts` configurations could improve reliability and reduce attack surface.
Deep dive
  • The author argues that DNS is primarily for human-readable domain names for public services and is often a liability in internal IT infrastructure.* DNS adds complexity and potential failure points, increasing the risk of outages due to unforeseen interactions or circular dependencies, as seen in incidents like the Facebook/Meta outage.* For machine-to-machine communication, DNS caching behavior (TTL) can lead to stale records and unreliable updates, requiring manual intervention.* The article suggests directly injecting IP addresses into configuration files using automation tools like Ansible or pyinfra.* Alternatively, using /etc/hosts files, which can also be provisioned at scale, offers human-readable names without relying on a DNS service.* DNS is highlighted as a generic security risk, as default DNS traffic is unencrypted, making it vulnerable to spoofing and other attacks if not secured with DNSSEC (which adds complexity).* DNS also presents an egress exfiltration risk: attackers can use DNS queries to an attacker-controlled nameserver to exfiltrate sensitive data even when direct outbound connections are filtered.* To mitigate egress risk, systems should be prevented from querying public DNS records, with external access facilitated through a proxy with allow-listed domains.* The overall recommendation is to explore avoiding DNS for internal IT infrastructure to enhance reliability, robustness, and security, balancing benefits and drawbacks with specific infrastructure context and risk appetite.
Decoder
  • Egress exfiltration: The unauthorized transfer of data out of a network, often by leveraging commonly allowed outbound network protocols like DNS to bypass security controls.* DNSSEC: Domain Name System Security Extensions, a suite of IETF specifications for securing data exchanged in the Domain Name System by cryptographically signing records.* TTL (Time-To-Live): A setting in a DNS record that tells a DNS resolver how long to cache the record before querying for a new one, impacting how quickly changes propagate.* /etc/hosts: A plain text file in Unix-like operating systems that maps hostnames to IP addresses, acting as a local DNS resolver for specific entries without querying external DNS servers.
Original article

The Domain Name System exists because it's difficult for people to remember IP addresses (185.15.59.224) and much easier to remember domain names (wikipedia.org).

Regarding internet-accessible services, it makes sense to publish websites, API endpoints or similar services using DNS, as people have to interfact with them. The added benefit of a domain name is that the associated IP address can change without the client being affected.

This article isn't against DNS for public services, but it questions if we should use DNS for internal IT infrastructure (independent of cloud vs. onprem)

It's always DNS

Although DNS can be a very beneficial service, it can also become a liability. If you want a reliable system, you want as little components as possible. Every additional component adds a potential risk of failure. In addition, more components may create unforeseen behaviour and interactions that can cause outages (circular dependancies, and so on). If you can avoid adding components, you'll have a better chance of building a reliable system.

Within the IT operations space, DNS has made a bit of a name for itself. Many may remember this little haiku.

It’s not DNS
There’s no way it’s DNS
It was DNS

(source)

There are multiple(1) high-profile(2) incidents where DNS was involved. In these linked cases, the root-cause of the incident isn't the DNS system itself. Yet, because the root-cause affects the DNS service - which is in the critical path for virtually all services - the incident has such a huge impact.

The Facebook / Meta outage was so significant because it locked people out of buildings (physical access) due to 'circular' dependancies on DNS being available. Again, it can be said that the circular dependancy is the root-cause, but the blast radius of DNS is in many cases so enormous that it may be difficult to have a clear end-to-end picture of potential risk.

The case against DNS for internal IT infrastructure

From the perspective of IT operations, DNS has a drawback: DNS clients cache DNS records based on TTL. Different DNS client implementations can behave differently, but even if you have a fairly homogenous environment, the only way to assure clients (in this case other servers) use the updated IP address, is to control them and force a DNS refresh.

That got me thinking, why would we use DNS for infrastructure services? It isn't necessary for machine-to-machine communication. Instead of configuring domain names that may not resolve, we can just directly inject the appropriate IP address(ess) into configuration files. It's easy to configure systems with tools like Ansible or pyinfra at scale.

The counter argument could be that DevOPS / platform engineers are also humans, and it's much easier to spot misconfigurations or to troubleshoot if domain names are configured Instead of IP addresses.

Fortunately, we still have /etc/hosts, which we can easily provision. Still no DNS service required! This way, we can configure domain names and pretend to use DNS. I also suspect that DNS queries against /etc/hosts are quite responsive.

DNS as generic security risk

As of today, most network traffic is encrypted by default, or tunneled through an encrypted channel. DNS is - by default - the exception. Regarding internal IT infrastructure (cloud or 'onprem'), the network may be considered as a secure environment. An attack on the DNS service, spoofing packets, and so on, can be very disruptive though. Setting up DNSSEC may alleviate this problem, but that also introduces another administrative burden with it's own risk of misconfiguration. It's yet another layer of complexity. And we assume that internal infrastructure supports DNSSEC.

DNS as an Egress Exfiltration risk

Because egress filtering (filtering of outbound connections) can be cumbersome, it's often omitted, because the systems involved are 'trusted'. This is unfortunate as this makes life easier for an attacker. Any kind of resource required for an attack can be acquired on the vulnerable system with a simple outbound query towards the internet. Proper egress filtering of network traffic can be the difference between a succesfull and unsuccessful hacking attempt.

A lack of egress filtering also makes it much easier for an attacker to exfiltrate data. And the thing is: any IP protocol can be used to exfiltrate data, including DNS1.

This is how: the attacker gets a domain runs their internet-accessible authoritative nameserver for this domain. Now the attacker can make DNS requests to said domain like sensitivedata.evil.domain from the hacked system and you can extract all the data from the rogue DNS server logs2.

Although a hacked server may not be able to directly interact with the attacker-controlled DNS server, by issuing DNS requests for the attacker-controlled domain, these requests will pass the local forwarding DNS server and be forwarded towards the attacker-controlled authoritative DNS server. See also tools like dnscat2 or iodine

Due to this risk, there is a case to be made, to - at least - not allow systems to query public DNS records. As servers may need to interfact with services on the internet (update servers, APIs, and so on), such access can be facilitated by a proxy server using allow-listed domains.

Evaluation and closing words

In the end, everything is a tradeoff, where people must balance benefits and drawbacks against the context of their infrastructure, their particular risk appetite and even organisational structure and culture.

That said, I think it's reasonable to explore if DNS can be avoided altogether within the IT infrastructure to increase reliability and robustness.

Feel free to share your thoughts and feelings about this if you feel so inclined. Maybe leave a comment on the Hacker News thread.


  1. Don't forget about services like NTP or ICMP. ↩

  2. I have demonstrated this attack using this exact method with a domain I own for a customer that thought they had properly prevented egress traffic, including blocking NTP and ICMP. ↩

Explore all 55 articles in today's digest

Fresh dev news, AI-digested daily. Never miss a trend at devoured.fyi