The complete guide to configuring DNS filtering on any router. Covers IPv4, IPv6, encrypted DNS (DoH/DoT), brand-specific walkthroughs, verification, and troubleshooting — everything you need to protect every device on your network.
Every time you visit a website, your device sends a DNS (Domain Name System) query to translate the domain name into an IP address. By default, these queries go to your Internet Service Provider's DNS servers — which offer no content filtering, limited privacy, and are often slower than third-party alternatives.
Changing the DNS on your router replaces the ISP defaults with a filtering DNS service like CleanBrowsing. This gives you:
The biggest advantage of configuring DNS at the router level is coverage: one configuration change protects every device on your network — laptops, phones, tablets, smart TVs, gaming consoles, IoT devices, and guest devices. There is no software to install and no per-device setup required.
For a detailed comparison of router-level vs. device-level DNS filtering, see our guide on Router vs Device Deployment.
Your router's admin panel is accessed through a web browser using your gateway IP address. To find it:
On Mac/Linux, open Terminal and run:
netstat -nr | grep '^default'
On Windows, open Command Prompt and run:
ipconfig | findstr /i "Gateway"
Common gateway addresses include:
192.168.1.1 (most TP-Link, Netgear, ASUS, Linksys routers)192.168.0.1 (some D-Link, Netgear, and ISP routers)10.0.0.1 (Comcast/Xfinity, Google Fiber, some enterprise setups)You will need the router's administrator username and password. If you have never changed these, check the sticker on the bottom of your router or consult the manufacturer's documentation. Common defaults are admin/admin or admin/password.
CleanBrowsing offers three free DNS filters. Choose the one that matches your needs:
| Filter | Primary DNS | Secondary DNS | What It Blocks |
|---|---|---|---|
| Family Filter | 185.228.168.168 |
185.228.169.168 |
Adult content, malware, phishing, mixed-content sites |
| Adult Filter | 185.228.168.10 |
185.228.169.11 |
Adult content, malware, phishing |
| Security Filter | 185.228.168.9 |
185.228.169.9 |
Malware and phishing only |
For a full comparison of what each filter blocks, see our DNS Filters page.
These instructions work for most consumer and business routers:
http://192.168.1.1).185.228.168.168185.228.169.168Paid customers: If you have a CleanBrowsing paid plan, use the DNS IPs shown in your dashboard instead of the free filter IPs above. You should also add your network's public IP address under "Your Network" in the dashboard to bind your filtering profile.
Every router brand places DNS settings in a slightly different location. Here are quick walkthroughs for the six most popular brands:
Log in → Advanced → Network → Internet → set DNS to Manual → enter CleanBrowsing IPs → Save.
Full TP-Link guide →
Log in → Basic → Internet → check "Use These DNS Servers" → enter CleanBrowsing IPs → Apply.
Full Netgear guide →
Log in → Advanced Settings → WAN → Internet Connection → set DNS to Manual → enter CleanBrowsing IPs → Apply.
Full ASUS guide →
Log in → Connectivity → Internet Settings → edit → enter CleanBrowsing IPs under Static DNS → Apply.
Full Linksys guide →
UniFi Controller → Settings → Networks → select WAN → DHCP Name Server → Manual → enter CleanBrowsing IPs → Apply.
Full Ubiquiti guide →
Many ISP-provided routers lock the DNS fields. If you cannot edit DNS settings on your ISP router, you have two options: add your own router behind the ISP gateway, or configure DNS on each device individually. See our guide on routers that don't allow DNS changes for detailed workarounds.
If your network uses IPv6 (most modern networks do), you should also configure IPv6 DNS servers. Without this step, IPv6-capable devices may bypass your IPv4 DNS settings entirely by resolving queries over IPv6 using your ISP's default servers.
CleanBrowsing's IPv6 DNS addresses (Family Filter):
2a0d:2a00:1::2a0d:2a00:2::Where to find IPv6 DNS settings: On most routers, IPv6 DNS settings are on the same page as IPv4 DNS settings. Some routers have a separate "IPv6" tab or section. Look under WAN, Internet, or Network settings.
Alternative — disable IPv6: If your router does not support IPv6 DNS configuration, or if you want to eliminate the possibility of IPv6 DNS bypass entirely, you can disable IPv6 on the router's WAN settings. This forces all traffic through IPv4 where your CleanBrowsing DNS is active. Note that disabling IPv6 may slightly reduce performance on networks that rely heavily on IPv6 routing.
Standard DNS queries are sent in plain text, which means your ISP (or anyone on the network) can see and potentially intercept them. Encrypted DNS solves this by wrapping queries in TLS encryption. There are two protocols:
Not all routers support encrypted DNS natively. Routers that do include:
| Protocol | Family Filter Endpoint |
|---|---|
| DoH | https://doh.cleanbrowsing.org/doh/family-filter/ |
| DoT | family-filter-dns.cleanbrowsing.org |
For a deeper explanation of how these protocols work, see our guides on What is DNS over HTTPS (DoH) and What is DNS over TLS (DoT). You can also browse all available endpoints on our Encrypted DNS page.
After configuring DNS on your router, verify that the changes are working correctly.
Visit badexample.com in your browser. If the filter is active, you should see a block page or a "domain not found" error.
On Windows (Command Prompt):
nslookup -q=TXT debug.test.cleanbrowsing.org
On Mac/Linux (Terminal):
dig TXT debug.test.cleanbrowsing.org
The response will confirm which CleanBrowsing filter is active and whether your queries are reaching our servers.
Visit our DNS Leak Test and run a test. The results should show CleanBrowsing's servers (look for IPs in the 185.228.168.x range). If you see your ISP's DNS servers instead, the configuration has not taken effect yet.
If the test still shows your old DNS servers, reboot your router. Many routers cache DNS responses internally, and a reboot clears this cache so all new queries go through the updated DNS servers.
After rebooting the router, you should also flush the DNS cache on your computers and devices to clear any locally cached old DNS records:
Windows (run as Administrator):
ipconfig /flushdns
macOS:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Linux:
sudo systemd-resolve --flush-caches
Chrome browser (if Chrome has its own DNS cache):
Navigate to chrome://net-internals/#dns and click "Clear host cache."
Allow 5–10 minutes for DHCP changes to propagate to all devices on your network. Reconnecting devices to WiFi (toggle WiFi off/on) will speed this up.
For a comprehensive verification walkthrough, see our Verify DNS Configuration guide.
Changing DNS on the router is a strong first step, but tech-savvy users (or apps) can override router DNS by hardcoding their own DNS servers. Here is how to prevent that and troubleshoot common issues.
To prevent any device from using a different DNS server, create a firewall rule on your router that blocks all outbound traffic on port 53 (DNS) except to CleanBrowsing's IP addresses. Alternatively, use a DNAT (destination NAT) rule to transparently redirect all DNS traffic to CleanBrowsing. See our How to Lock DNS Settings guide for step-by-step instructions.
If your ISP router does not allow DNS changes (common with AT&T, Comcast/Xfinity, some Frontier routers), your options are:
Full details: Router Doesn't Allow DNS Changes.
Some ISP and security services override your DNS settings, causing filters to stop working:
See our full guide on Services That Conflict with DNS Filtering.
Some browsers and apps use their own DNS resolution (DNS over HTTPS) to bypass router-level filtering:
about:config in the address bar, search for network.trr.mode, and set it to 5 (disabled).For a comprehensive overview of bypass techniques and how to prevent them, see How to Prevent Filter Bypass.
Confirm your DNS is working correctly with step-by-step verification tests.
View GuideUse firewall rules and DNAT to prevent DNS bypass on your network.
View GuideStart with our free DNS filters or upgrade to a paid plan for custom filtering, usage analytics, and multiple profiles.
Explore Plans