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)
- Install the DNS Server package on your Synology.
- Under “Zones”, “Create” a new “Master zone”
- Domain type: “Forward Zone”
- Domain name: “null.zone.file”
- Master DNS Server: Your-Synology-IP-Address (Ex: “192.168.1.2”)
- Serial format: “Date (YYYYMMDDNN)”
- 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
- Download the ad-blocker.sh script from: https://www.dropbox.com/s/xz1i7hxb9sfug36/ad-blocker.sh?dl=0
- Copy the script to your NAS in the following directory: /var/packages/DNSServer/target/script/ad-blocker.sh
- Give the script execute permissions:
chmod +x /var/packages/DNSServer/target/script/ad-blocker.sh
- Run the following command to execute the script:
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!