DNS Filtering vs Firewall vs VPN: What You Need
DNS filtering does not replace a firewall, a URL filter or a VPN: it blocks known-bad website names before your device connects, so most small offices want a DNS filter on top of the firewall already in their router, and a VPN only when staff work away from the office.
This guide is for owners of homes and small offices who have heard "DNS security" pitched as an all-in-one fix. You will get a plain table of what each tool blocks and misses, a short decision guide, and exact steps to switch to a filtering DNS resolver in about 15 minutes. It does not cover specific vendor firewall products.
What DNS filtering actually does
DNS is the internet's phone book. When you type a website name, your device asks a DNS resolver (a server that looks up names) for the address behind it. Your router usually sends that question to your internet provider's resolver.
A filtering resolver checks the name against lists of known malware, phishing and scam domains. If the name is on a list, it refuses to answer, and the page never loads. Because it works on names, it covers most devices on the network, including phones and smart TVs that cannot run security software, as long as they use the router's DNS.
Governments use the same idea. CISA offers a Protective DNS resolver for agencies that blocks connections to harmful domains. It is a useful layer. It is not a complete defense.
DNS security vs firewall vs URL filter vs VPN
These four tools get mixed up because they all "protect your network." They sit in different places and see different things.
| Tool | What it sees | Blocks well | Misses | Replaces the others? |
|---|---|---|---|---|
| DNS filtering | Website names only | Known malware, phishing and scam domains, optional adult or category blocks | Direct IP connections, bad pages on good sites, brand-new scam domains, anything about your own site's bugs | No |
| Firewall | Traffic by address and port | Unwanted inbound connections, unneeded open ports, outbound rules | Dangerous sites over normal web ports, phishing links, stolen passwords | No |
| URL filter (web proxy) | Full web addresses, sometimes page content | Specific pages or categories, even on an otherwise allowed site | Encrypted traffic it cannot inspect, apps that ignore the proxy | Partly overlaps DNS filtering |
| VPN | Encrypts traffic between a device and a network | Snooping on public Wi-Fi, safe remote access to office systems | Malicious sites (it carries them safely), malware, phishing | No |
The short version: a firewall controls who can connect, a DNS filter controls which names you can look up, a URL filter controls which pages you can open, and a VPN controls who can read your traffic on the way.
DNS security vs URL filtering: the real difference
A DNS filter sees only the domain, such as example.com. It cannot tell a harmless page on that site from a harmful one. It blocks all of the domain or none of it.
A URL filter can look at the whole address, such as example.com/free-prize.html. To see inside HTTPS (encrypted web traffic), it must decrypt and re-encrypt the traffic. That takes extra setup and raises privacy questions. Most small offices do not need it.
If your goal is "keep staff off known scam and malware sites," DNS filtering is a good starting layer. If your goal is "block one page on a site we otherwise use," you need a URL filter.
DNS protection vs VPN: they solve different problems
A VPN builds an encrypted tunnel. It protects traffic from people on the same network, like café Wi-Fi, and lets remote staff reach office files.
A DNS filter encrypts nothing by default. Some resolvers support DNS over HTTPS or TLS, which hides only the lookups, not the sites you visit afterward. Neither one replaces the other. A VPN will happily carry you to a phishing page, and a DNS filter will not protect your laptop on a hostile network beyond the lookups.
What DNS filtering misses
DNS filtering is cheap and useful, but know its limits:
- Compromised legitimate sites. If a real shop's WordPress site was hacked, its domain is not on a blocklist yet.
- Brand-new scam domains. Lists lag behind attackers, even when they update fast.
- Direct IP connections. Malware can skip the lookup entirely.
- Devices that bring their own DNS. Some browsers and apps use DNS over HTTPS to a different provider, bypassing your router's choice.
- IPv6 DNS from your internet provider. If your router hands out an IPv6 DNS server from the provider, devices can bypass the IPv4 resolver settings you entered. Set the IPv6 DNS to your chosen provider's IPv6 addresses (Quad9:
2620:fe::feand2620:fe::9) or turn off IPv6 DNS handout on the router. - Weak passwords, stale software and phishing emails. None of these involve a bad domain lookup.
- Your own website's flaws. A filter protects people browsing out. It does nothing for visitors reaching your site.
Which protection do you need?
| Your situation | What to use |
|---|---|
| Home or small office, everyone on one network | Keep the router firewall on, add a filtering DNS resolver |
| Staff work from home or travel | Add a business VPN or secure remote access, plus filtering on laptops |
| You need to block specific pages or log browsing | A URL filter or web proxy, set up by someone who manages it |
| Kids or guests using the Wi-Fi | Filtering DNS with a family category option |
| You run a website, store or web app | None of the above tests your website. Get the site itself checked |
The firewall is already in almost every router. Start there, confirm it is on, and add DNS filtering as a free second layer.
How to switch to a filtering resolver (DNS security for home or office)
These steps work for a home or a small office. Both providers below are free to use and publish their setup details in official docs.
Resolver addresses
| Provider | What it blocks | IPv4 addresses |
|---|---|---|
| Quad9 | Malicious domains (malware, phishing) | 9.9.9.9 and 149.112.112.112 |
| Cloudflare for Families, malware only | Malware | 1.1.1.2 and 1.0.0.2 |
| Cloudflare for Families, malware and adult content | Malware and adult content | 1.1.1.3 and 1.0.0.3 |
Always enter both addresses. The second is a backup address for the same service. Do not mix addresses from different providers, because some devices will use either one.
- Write down your current DNS settings. Take a screenshot of the router's DNS page so you can roll back.
- Log in to your router. The address is often printed on its label, such as
192.168.1.1. Use the admin password, not the Wi-Fi password. If the admin password is still the factory default, change it first. - Find the DNS setting. Look under Internet, WAN or DHCP. Names vary by router. Enter your chosen primary and secondary addresses and save.
- Restart the router, then reconnect devices. This makes them pick up the new DNS.
- Check it worked. On Windows or macOS, open a terminal and run:
nslookup example.com
The "Server" line may show your router's address, because routers often pass lookups along. To test the resolver directly, run nslookup example.com 9.9.9.9. For Quad9, you can also open https://on.quad9.net to see whether you are using it.
- Cover devices that leave the building. On a laptop, set DNS per device. In Windows 11 go to Settings, Network & internet, your Wi-Fi, Hardware properties, DNS server assignment, Edit. On macOS go to System Settings, Network, your Wi-Fi, Details, DNS.
- Office only: stop the bypass. If your firewall allows it, add a rule that permits outbound DNS (port 53) only to your chosen resolver. Also check browser settings, since a browser set to Secure DNS with another provider ignores your router.
If something legitimate breaks, such as a work tool that fails to load, undo the change using your screenshot and ask the provider whether the domain was blocked in error.
A note on the other kind of DNS security
"DNS security" also means protecting your own domain's records. That covers locking your domain at the registrar, using two-factor login there, and publishing SPF, DKIM and DMARC records, and moving DMARC to an enforcing policy (quarantine or reject), so receiving mail servers can reject most fake email sent as you. You can check the email side with the email spoofing tool. That is a different job from filtering, and it matters for any business with a domain.
Where a filtering resolver stops and testing starts
Everything above protects your office from bad places on the internet. None of it tells you whether your own website, store or login page has holes. For that, start with the free website security check, a passive outside look at a domain you own. If you are wondering how exposed a site is, read is my website hackable. To understand why a person finds more than a scanner, see manual vs automated penetration testing.
Key takeaways
- A DNS filter blocks known-bad domain names. It is not a firewall, a URL filter or a VPN.
- Keep your router's firewall on, then add a free filtering resolver such as Quad9 or Cloudflare for Families.
- Use a VPN only for remote staff or untrusted networks. It encrypts traffic but does not block bad sites.
- Change DNS at the router first, then on laptops that travel, and check that browsers are not bypassing it.
- DNS filtering says nothing about the security of your own website. That needs a separate test.
Next step
If you run a website, a person should test it by hand. Bug Circuit's Essential plan is $49 one-time for 1 website with 3 manual audits to request within a month. Each audit ends in a written report with every issue, its severity, evidence and fix steps. It is a focused small-site audit, not a compliance certificate. See plans and pricing to compare options. Fixing is separate and quoted per issue only if you ask.
A real human security engineer audits your whole site by hand and sends a full report: every issue, its severity, and the exact fix. From $49, with a 14-day money-back guarantee.
See pricing