Use Synology as an ad-blocker

Today I wondered if it was possible to use my Synology as an ad blocker.

I got the following steps from a thread at the synology forum: http://forum.synology.com/enu/viewtopic.php?f=39&t=78126

I combined these steps and tested them succesfully using my DS211+ with DSM 5.2 (update 3)

GUI Settings

  1. Install the DNS Server package on your Synology.
  2. Under “Zones”, “Create” a new “Master zone”
  3. Domain type: “Forward Zone”
  4. Domain name: “null.zone.file”
  5. Master DNS Server: Your-Synology-IP-Address (Ex: “192.168.1.2”)
  6. Serial format: “Date (YYYYMMDDNN)”
  7. Activate resolutions just in case the requested ip address can’t be resolved by the DNS Server. I am using alternate DNS addresses from Opennic

Telnet /SSH settings

  1. Download the ad-blocker.sh script from: https://www.dropbox.com/s/xz1i7hxb9sfug36/ad-blocker.sh?dl=0
  2. Copy the script to your NAS in the following directory: /var/packages/DNSServer/target/script/ad-blocker.sh
  3. Give the script execute permissions: chmod +x /var/packages/DNSServer/target/script/ad-blocker.sh
  4. Run the following command to execute the script: sh /var/packages/DNSServer/target/script/ad-blocker.sh

Now the DNS server is installed and configured on the NAS.

How to use the DNS Server?

There are several options. You can set the new DNS address on every single device you’re using.

But it is easier to reconfigure the DNS address centrally. In my case I decided to set the new DNS address on my router.

So, there you go, no more annoying ads!

Credits go to nebulus and dMajo

Use Synology as an ad-blocker