Difference between revisions of "Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up Ad blocking with dnsmasq"
From bering-uClibc
(Created page with "Objectives There is a lot of info on the net about setting dnsmasq to block advertisements, trackings... etc. Bering-uClibcx.x comes with dnsmasq already installed, so here i...") |
|||
Line 1: | Line 1: | ||
− | Objectives | + | ==Objectives== |
There is a lot of info on the net about setting dnsmasq to block advertisements, trackings... etc. Bering-uClibcx.x comes with dnsmasq already installed, so here is a quick guide that shows a simple setup that will filter out advertisements sites from web pages on your networked devices, how lucky can we get ! | There is a lot of info on the net about setting dnsmasq to block advertisements, trackings... etc. Bering-uClibcx.x comes with dnsmasq already installed, so here is a quick guide that shows a simple setup that will filter out advertisements sites from web pages on your networked devices, how lucky can we get ! | ||
− | Prerequisites | + | ==Prerequisites== |
− | + | * You will need Bering-uClibc 5.x or higher. | |
− | + | * The curl.lrp package. | |
− | Manual setup | + | ==Manual setup== |
− | (treading carefully :-)) | + | ====(treading carefully :-))==== |
Enter the command: | Enter the command: | ||
− | curl -s -d mimetype=plaintext http://pgl.yoyo.org/as/serverlist.php?hostformat=dnsmasq-server > /root/tmpfile.list | + | curl -s -d mimetype=plaintext http://pgl.yoyo.org/as/serverlist.php?hostformat=dnsmasq-server > /root/tmpfile.list |
Check your file tmpfile.list, you should have a list of server with the following format: | Check your file tmpfile.list, you should have a list of server with the following format: | ||
− | server=/yieldlab.net/ | + | server=/yieldlab.net/ |
− | server=/yieldmanager.com/ | + | server=/yieldmanager.com/ |
− | server=/yieldmanager.net/ | + | server=/yieldmanager.net/ |
− | server=/... etc / | + | server=/... etc / |
Then: | Then: | ||
− | cp /root/tmpfile.list /etc/dnsmasq.d/addblock.list | + | cp /root/tmpfile.list /etc/dnsmasq.d/addblock.list |
Edit /etc/dnsmasq.conf and enter: | Edit /etc/dnsmasq.conf and enter: | ||
− | conf-dir=/etc/dnsmasq.d | + | conf-dir=/etc/dnsmasq.d |
Restart dnsmasq with: | Restart dnsmasq with: | ||
− | /etc/init.d/dnsmasq restart | + | /etc/init.d/dnsmasq restart |
That's it, all the nasty adds should be gone ! (well a bunch of them !) | That's it, all the nasty adds should be gone ! (well a bunch of them !) | ||
Line 37: | Line 37: | ||
Hum yeah! don't forget to save your configuration, a simple: | Hum yeah! don't forget to save your configuration, a simple: | ||
− | lrcfg and s) Save configuration | + | lrcfg and s) Save configuration |
will suffice. | will suffice. |
Revision as of 02:45, 15 November 2016
Objectives
There is a lot of info on the net about setting dnsmasq to block advertisements, trackings... etc. Bering-uClibcx.x comes with dnsmasq already installed, so here is a quick guide that shows a simple setup that will filter out advertisements sites from web pages on your networked devices, how lucky can we get !
Prerequisites
* You will need Bering-uClibc 5.x or higher. * The curl.lrp package.
Manual setup
(treading carefully :-))
Enter the command:
curl -s -d mimetype=plaintext http://pgl.yoyo.org/as/serverlist.php?hostformat=dnsmasq-server > /root/tmpfile.list
Check your file tmpfile.list, you should have a list of server with the following format:
server=/yieldlab.net/ server=/yieldmanager.com/ server=/yieldmanager.net/ server=/... etc /
Then:
cp /root/tmpfile.list /etc/dnsmasq.d/addblock.list
Edit /etc/dnsmasq.conf and enter:
conf-dir=/etc/dnsmasq.d
Restart dnsmasq with:
/etc/init.d/dnsmasq restart
That's it, all the nasty adds should be gone ! (well a bunch of them !)
Hum yeah! don't forget to save your configuration, a simple:
lrcfg and s) Save configuration
will suffice.