Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

DNS Blockers & Firewalls: Secure Your Network

· 7 min read · Home Networking

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Securing your home and office network starts with two layers: a DNS blocker that filters dangerous and unwanted domains before they load, and a firewall that controls what traffic is allowed in and out. Together they stop most malware, phishing, and unauthorized access attempts. You can set both up in under an hour using a router that supports custom DNS and a firewall app or device. Below is the exact process.

What You'll Need

  • Access to your router's admin panel (usually via a web browser at an IP like 192.168.1.1 or 192.168.0.1 — check your router's label)
  • Router admin username and password (often printed on the router or in its manual)
  • A DNS blocking service account (free tiers exist from NextDNS, Control D, or OpenDNS)
  • For office networks: a dedicated firewall device or software firewall on each computer (Windows Defender Firewall or a third-party app like GlassWire)
  • Optional: a Raspberry Pi or old PC if you want a self-hosted DNS blocker like Pi-hole

Step-by-Step

Step 1: Choose Your DNS Blocker

For most home and small office networks, a cloud-based DNS filter is easiest. Sign up for a free account at NextDNS, Control D, or OpenDNS. These services let you block categories like malware, phishing, adult content, and ads. For a self-hosted option, Pi-hole runs on a Raspberry Pi and blocks ads and trackers network-wide, but it requires more setup. Start with a cloud service — it works immediately and needs no extra hardware.

Step 2: Get Your DNS Server Addresses

After signing up, your DNS provider will give you two or more IP addresses to use as your DNS servers. For example, NextDNS gives you unique IPv4 and IPv6 addresses tied to your account. Write these down. If you use OpenDNS, the addresses are always 208.67.222.222 and 208.67.220.220, but you'll need to register your network's public IP for filtering to work.

Step 3: Change DNS on Your Router

Open a web browser and enter your router's IP address. Log in with your admin credentials. Look for a section called Internet, WAN, or Network Settings. Find the DNS settings — often labeled DNS Server or DNS Address. Change from Obtain automatically from ISP to Use the following DNS servers and enter the addresses from Step 2. Save the settings. The router will now push these DNS servers to every device on your network via DHCP. Note: menu labels vary by router brand and firmware version, so if you don't see these exact words, look for anything mentioning DNS or DHCP.

Step 4: Test Your DNS Filtering

After saving, restart your router or wait a few minutes. On a computer connected to the network, open a command prompt (Windows) or terminal (Mac/Linux) and type ipconfig /all (Windows) or scutil --dns (Mac). Check that the DNS server addresses match the ones you entered. Then visit a test page like internetbadguys.com (from OpenDNS) or test.nextdns.io (from NextDNS) to confirm the filter is active. If the page is blocked, filtering is working.

Step 5: Set Up a Firewall on Each Device

DNS blocking stops bad domains, but a firewall controls actual connections. On Windows, open Control Panel > System and Security > Windows Defender Firewall and ensure it's turned on for both private and public networks. On macOS, go to System Settings > Network > Firewall and enable it. For office networks, consider a dedicated firewall appliance like a Ubiquiti Dream Machine or a software firewall like pfSense on a spare PC — these sit between your modem and switch and filter all traffic. For most small offices, enabling the router's built-in firewall (usually on by default) plus per-device firewalls is sufficient.

Step 6: Configure Firewall Rules (Advanced)

If you need to block specific ports or IP ranges, log into your router's firewall section. Look for Access Control, Firewall Rules, or Port Filtering. Create rules to block inbound connections from the internet to your internal devices (unless you're hosting a server). For outbound, you can block specific IP ranges or ports — but be careful not to block necessary services like email or web browsing. Start with default rules and only add custom ones when you have a clear need.

Step 7: Secure Your Router Admin Panel

Change the default admin password on your router — this is the most common way attackers get in. Go to Administration or Management settings and set a strong password. Also disable remote management (often called Remote Access or WAN-side access) unless you absolutely need it. This prevents outsiders from reaching your router's settings.

Common Mistakes

  • Using only DNS filtering without a firewall: DNS blocks bad domains, but a firewall is what stops direct IP-based attacks. Use both.
  • Forgetting to update DNS settings on devices: Some devices (like phones with static IP settings) may not pick up router DNS. Check each device's network settings if filtering seems inconsistent.
  • Blocking too much: Overly strict DNS categories can block legitimate sites like banking or work portals. Start with malware and phishing blocks, then add categories gradually.
  • Leaving the router admin password as default: This is the #1 way networks get hijacked. Always change it.
  • Disabling the firewall to fix a connectivity issue: If a device can't connect, it's usually a rule problem, not a reason to turn off the firewall. Adjust rules instead.

Tips

  • Use a DNS provider that supports encrypted DNS (DoH or DoT) if your router allows it — this prevents snooping on your DNS queries.
  • For office networks, create separate VLANs for guests and IoT devices so a compromised smart bulb can't reach your computers.
  • Schedule regular firmware updates for your router — check the admin panel for an update section.
  • Test your firewall by using an online port scanner (like portchecker.co) to see which ports are open from the internet. Close any that aren't needed.
  • If you use a VPN, make sure it doesn't bypass your DNS filter — some VPNs route DNS through their own servers. Configure the VPN to use your chosen DNS.

Troubleshooting

DNS filtering isn't working on some devices. First, restart the device. If it still uses the old DNS, check if the device has a manual DNS setting (often in Wi-Fi settings under “Static IP” or “DNS”). Change it to the same DNS servers. On iPhones, go to Settings > Wi-Fi > tap the network > Configure DNS > Manual.

Websites load slowly after changing DNS. This is usually temporary while the DNS cache rebuilds. Wait an hour. If it persists, try a different DNS provider's servers — sometimes one provider's network is slower in your region.

Firewall blocks a legitimate app. On Windows, go to Windows Defender Firewall > Allow an app or feature through the firewall and check the box for that app. On macOS, go to System Settings > Network > Firewall > Options and add the app.

Router admin page doesn't load. Make sure you're connected to the network (via Wi-Fi or Ethernet). Try a different browser or clear your browser cache. If the IP doesn't work, check your router's manual or use the default gateway from your computer's network settings.

After changing DNS, the internet stops working entirely. You likely entered the wrong IP addresses. Double-check them, or temporarily set DNS back to “Obtain automatically” to restore connectivity, then retry with correct addresses.

Frequently Asked Questions

What is the difference between a DNS blocker and a firewall?

A DNS blocker filters domain names — it stops you from visiting known bad sites. A firewall filters data packets — it controls which connections are allowed based on IP addresses, ports, and protocols. They work at different layers and complement each other.

Can I use a free DNS blocker?

Yes. NextDNS and Control D offer free tiers with basic filtering. OpenDNS is also free for home use. These are enough for most home networks.

Will a DNS blocker slow down my internet?

Usually not. DNS lookups are tiny, and most reputable DNS providers have fast global networks. You might see a slight improvement if your ISP's DNS is slow.

Do I need a separate firewall device for my home?

No. Your router's built-in firewall plus the operating system firewalls on your computers are sufficient for most homes. A dedicated firewall device is more for offices with sensitive data or many users.

Can I set up DNS blocking on just one device?

Yes. You can change the DNS settings on a single device (like your laptop) to use a filtering service, leaving the rest of the network unaffected. This is useful if you only want to protect one device.

Is it legal to block ads with a DNS blocker?

Yes, blocking ads on your own network is legal. However, some websites may detect ad blocking and refuse to show content. That's a website's choice, not a legal issue.