OpenWRT
These instructions may vary based on the OpenWRT version you use.
Contents
Block Google DNS on OpenWRT
- Open the OpenWRT settings page and navigate to: Network > Firewall > Traffic Rules.
- Under New forward rule enter DNS as the name, choose source zone lan, destination zone wan and click Add and edit..
- Enter the following information:
- Name: DNS
- Restrict to address family: IPv4
- Protocol: TCP+UDP
- Match ICMP type: any
- Source zone: lan
- Source MAC address: any
- Source address: any
- Source port:
- Destination zone: wan
- Destination address: choose Custom and enter 8.8.8.8
- Action: Reject
- Extra arguments:
- You'll end up with something like this:
- Click Save & Apply.
- Repeat the same steps for Destination address: 8.8.4.4.
- Click Save & Apply once more on the Firewall - Traffic Rules page.
Power-cycle your devices
To make sure all your devices use the new DNS settings, please follow these steps:
- Turn off the device.
- Unplug the power cable from the router.
- Wait 30 seconds.
- Plug the power cable back in.
- Turn the device back on.
Test your Google DNS block
We recommend that you verify the block by trying to ping Google's DNS servers.
- On Windows, please open a Command Prompt. On OS/X, open a Terminal instead.
- Enter the following command in the Command Prompt or Terminal:
ping 8.8.8.8
This will send a series of pings to the Google DNS server. If they all fail, your block is working properly. - Repeat the test for 8.8.4.4:
ping 8.8.4.4