This is an old revision of the document!
Using DNSMasq to Block Ads on Edgerouter
This guide will explain how to install a dnsmasq blacklist in order to have built in ad blocking functionality within an Edgerouter.
Pre-requisite
You must be logged in as root in the router
Installation
curl https://community.ubnt.com/ubnt/attachments/ubnt/EdgeMAX/78132/74/install_dnsmasq_blklist.v3.7.8.tgz | tar zvx
bash ./install_dnsmasq_blklist.v3.7.8
If you are installing the DNSmasq blacklist for the first time, select option 0 on the menu.
If you are updating the DNSmasq blacklist
select menu option #1 to remove the integration
if you have a previous version, run install again and select option #0
Uninstall
/tmp/install_dnsmasq_blklist.v3.7.8
select option #1
For reference please see: https://community.ubnt.com/t5/EdgeRouter/CLI-Integrated-dnsmasq-Adblocking-amp-Blacklisting-v3-7-8-Easy/td-p/1344740
=== Force a DDNS Update and/or Display Status on either USG or EdgeRouter ===
\\
__**Force a DDNS Update**__
To force a DDNS update, SSH into your USG or Edgerouter and type:
<code>update dns dynamic interface {WAN IP}
For Example:
update dns dynamic interface eth0 (USG 3)
or
update dns dynamic interface eth2 (USG Pro)
To show the current status:
show dns dynamic status
which will show
interface : eth2 ip address : WAN IP host-name : unifi.example.com last update : Tue May 15 15:27:41 2018 update-status: good