Disclaimer: This is an advanced tutorial meant for users comfortable setting up routers. If settings get corrupt, you always have the option of resetting the router but make sure you make note of your current settings or back them up first. The instructions and commands are provided AS IS for you to try and may or may not work depending on your actual router and the features available for you.

Click here for an easier method for blocking Google DNS servers on D-Link routers



How to Setup the Blocks


Step 1 - Login to your Router


a. Type http://192.168.0.1 into web browser address bar (also try http://192.168.1.1 or http://192.168.2.1)


b. Enter router username and password. The default username is usually admin, and default password is blank



Step 2 - Add Static Routes


a. Click on 'Manual Setup'


d-link1-w.jpg



b. Click on 'Status' and write down your internet IP address


d-link2-w.jpg



c. Click on 'Advanced' -> 'Routing'


d-link3-w.jpg



d. Add the following to the Route List:




  • Network/Host IP: 8.8.8.8
  • Netmask: 255.255.255.255 or 255.255.252 or 255.255.248
  • Gateway: your internet IP

  • Network/Host IP: 8.8.4.4
  • Netmask: 255.255.255.255 or 255.255.252 or 255.255.248
  • Gateway: your internet IP
  • Interface: LAN

Add the additional addresses below to the route list:
  • Network/Host Address: 8.8.8.8

    Subnet Mask: 255.255.255.255


    Network/Host Address: 8.8.4.4

    Subnet Mask: 255.255.255.255


    Network/Host Address: 108.175.32.0

    Subnet Mask: 255.255.240.0


    Network/Host Address: 23.246.0.0

    Subnet Mask: 255.255.192.0


    Network/Host Address: 45.57.0.0

    Subnet Mask: 255.255.128.0


    Network/Host Address: 185.2.220.0

    Subnet Mask: 255.255.252.0


    Network/Host Address: 198.38.96.0

    Subnet Mask: 255.255.224.0


    Network/Host Address: 198.45.48.0

    Subnet Mask: 255.255.240.0


Network/Host Address: 64.120.128.0

Subnet Mask: 255.255.128.0

 

Network/Host Address: 64.197.128.0

Subnet Mask: 255.255.128.0

  • Gateway: your internet IP
  • Interface: LAN

e. Click on 'Save Setting'



      Step 3 - Ping check


      Please complete one of the following steps from a computer connected to the router:

       

      a. Open the Command Prompt or Terminal.

      • Windows: Press  the Windows Key AND the R Key at the same time on your keyboard. Type in cmd and press Enter.  
      • Mac OSX: In the upper right corner of your screen, where the search function is, type in Terminal and open the program.  

       

      b. Run the following commands:
      • Type in:ping 8.8.8.8

      • Type in:ping 8.8.4.4

       

      The ping tests above should fail. If any of them give you a response, check your Static routes or reboot the router and try this step again until the pings fail. You might also need to use a different gateway IP such as 127.0.0.1, 192.168.0.253, or your router IP. Essentially any unreachable IP that the router accepts should work. 

       

      Step 4 - Power-Cycle Devices

       

      a. Turn off your device.

       

      b. Unplug the power cable from the router.

       

      c. Wait 30 seconds.

       

      d. Plug in router.

       

      e. Turn on your device. 




      Alternate Step 2 - Static Routes for Routers with a different Interface

      If your Router has one of the following interfaces, just enter in the details below and continue with Step 3 above.

       
      OR



      Just add in the following:

      IP Version: IPv4
      Destination IP/prefix length: 8.8.8.8/32
      Interface: LAN/br0
      Gateway:192.168.1.252 (If your router IP is 192.168.1.1, otherwise just use .252 for the last octet of your router IP. )
      Metric: 1
      IP Version: IPv4
      Destination IP/prefix length: 8.8.4.4/32
      Interface: LAN/br0
      Gateway:192.168.1.252
      Metric: 1