Free tech learning for everyone, from basics to pro

Network FundamentalsNetworking SecurityIntermediate

DNS security: spoofing, DNSSEC, DNS over TLS and DNS over HTTPS

In short: Classic DNS is unauthenticated and unencrypted, so answers can be forged and lookups watched. DNSSEC adds digital signatures that let resolvers prove an answer is genuine. DNS over TLS and DNS over HTTPS encrypt queries between clients and resolvers. Companies also use protective DNS to block malicious domains and must plan for browsers that use encrypted DNS by default.

Why DNS is a target

Almost every connection starts with a DNS lookup. If an attacker can change the answer, users go wherever the attacker wants, and the address bar may still show the right name. If an attacker can watch the lookups, they learn which sites and services people use. Original DNS has no protection against either.

Attacks to know

  • Cache poisoning: tricking a resolver into storing a fake answer, which it then gives to every user. Random source ports and query IDs make this much harder today, and DNSSEC stops it.
  • Hijacking: changing the records themselves, often by stealing the login for the domain registrar or DNS provider. Use MFA and registrar lock.
  • Rogue resolvers: malware or a rogue DHCP server points devices at an attacker's DNS server.
  • DNS tunnelling: hiding data or command-and-control traffic inside DNS queries, because DNS is allowed out of almost every network.
  • Typosquatting and look-alike domains: registering names like examp1e.com for phishing.
  • DDoS on DNS providers or using open resolvers to amplify attacks.
Protecting DNSDNSSECSigns recordsProves answers are genuineDoes not encryptZone owner enables itDoT / DoHEncrypts queriesHides lookups from the pathDoes not prove authenticityClient and resolver enable it
Figure 1. DNSSEC protects the integrity of answers; encrypted DNS protects their privacy. They solve different problems.

DNSSEC

With DNSSEC, the zone owner signs every set of records with a private key. Answers come with signatures (RRSIG records), and the public key (DNSKEY) is itself vouched for by a DS record in the parent zone, all the way up to the signed root. A validating resolver checks the chain and returns SERVFAIL if a signature is wrong, so a forged answer is rejected. To use it, turn on signing at your DNS provider and publish the DS record at your registrar. Most large resolvers already validate.

Encrypted DNS: DoT and DoH

  • DNS over TLS (DoT) carries DNS inside TLS on TCP port 853. Easy to identify and allow or block on a firewall. Android's "Private DNS" uses it.
  • DNS over HTTPS (DoH) carries DNS inside normal HTTPS on port 443, so it looks like web traffic. Browsers such as Firefox, Chrome and Edge can use it, and Windows 11 supports it natively.

Both protect queries from being read or altered between the client and the resolver, for example on public Wi-Fi. They do not prove that the resolver's answer is genuine; that is DNSSEC's job.

What this means for company networks

  • Use a protective DNS service or filtering resolver that blocks known malicious and newly registered domains. Many national cyber agencies offer one for the public sector.
  • Force clients to use your resolvers: block outbound DNS (UDP and TCP 53) and DoT (853) to anywhere else, and use browser policies to disable or point DoH at your own resolver. Otherwise DoH quietly bypasses your filtering and logging.
  • Log DNS queries and look for tunnelling signs: very long names, high query rates to one domain, lots of TXT queries.
  • Sign your public zones with DNSSEC and protect registrar accounts with MFA.

Real-world example: the hijacked domain

A small charity's website started redirecting to a fake donation page. The site itself was untouched. An attacker had guessed the password to the charity's domain registrar account, changed the NS records to their own DNS servers, and pointed the website and email at their systems. Recovering the account, enabling MFA and registrar lock, and turning on DNSSEC closed the hole.

Practice

Does DNSSEC encrypt DNS queries?
No. It signs records so resolvers can prove answers are genuine; encryption is provided by DoT or DoH.
Which port does DNS over TLS use?
TCP 853.
Why can DNS over HTTPS bypass a company's DNS filtering?
It is carried inside normal HTTPS on port 443 to an outside resolver, so the company's resolver is never asked.

Key takeaways

  • Classic DNS is unauthenticated and unencrypted.
  • DNSSEC signs records so forged answers are rejected.
  • DoT and DoH encrypt queries between client and resolver.
  • Use protective DNS, control outbound DNS and DoH, and lock registrar accounts.
Tracks your learning on this device only. See your progress on the learning paths.
Verified author✓ Valid
Issued to
Mohamed Fayas
Role
Founder of FM TecHub
Credentials
CCNABTEC HND Network EngineeringBEng (Hons) Computer Networking & Cloud Security
Issuer
FM TecHub · fmtechub.com

He writes practical, plain-English guides on networking, security and cloud.

More about the author →

Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Email updates: coming soon

New notes, tools and security news from FM TecHub by email, explained simply. Free. We're not collecting email addresses yet; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesopening soon

Meanwhile, stay connected: