What's new

MERLIN: RT-AC68U + ADBLOCKing...

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Ok, got it. I've used Ubuntu and Backtrack so I am somewhat familiar, but it sounds like there is a lot of backstory to this that I don't have yet...

I appreciate the reply.
 
I'm using some sort of combo of Colin and wuyanxu version of this, and it well works but I get a lot of ads anyway. So out of pure lack of knowing why, I decided to use the URL filter function on the GUI for ASUS admin. And after entering a few words like "adtoma, fusion, and so on" I kind of get it to work. The bad news about this is that it stops everything with the words inside the URL - however it does work.

Does anyone know how this URL filter function works under the GUI? Is there any way one could get that to work with say wild cards? Or something more "selective"?

As the dnsmasq version just don't seem to stop anything here in Sweden anyway?!
 
I'm using some sort of combo of Colin and wuyanxu version of this, and it well works but I get a lot of ads anyway. So out of pure lack of knowing why, I decided to use the URL filter function on the GUI for ASUS admin. And after entering a few words like "adtoma, fusion, and so on" I kind of get it to work. The bad news about this is that it stops everything with the words inside the URL - however it does work.

Does anyone know how this URL filter function works under the GUI? Is there any way one could get that to work with say wild cards? Or something more "selective"?

As the dnsmasq version just don't seem to stop anything here in Sweden anyway?!

I posted a little script that I used to temporarily test keys words for URL and Keyword filtering:

http://forums.smallnetbuilder.com/showpost.php?p=146582&postcount=6http://

Basically the URL GUI invokes the iptables directive

Code:
-m webstr --url

and the KEYWORD GUI invokes the iptables directive

Code:
-m string --string

Strangely the 'm webstr' is also capable of providing two other functions 'host' and 'content'; use command to see them:

Code:
iptables -m webstr -help

so I'm not clear on the reason why the '-m string' directive is used rather than the available '-m webstr --content' filter?

Using my script allowed me to quickly guage the effectiveness of various URL/KEYWORD filtering tests from the command line.

NOTE: Simply have the following clause in /jffs/configs/dnsmasq.conf.add

Code:
addn-hosts=/jffs/configs/ADBlock.hosts

seems to work fine for AD blocking - with approx 14,000 entries in my specified file.

Regards,
 
First off, a big thanks to wuyanxu and ColinTaylor for providing the scripts to allow noobies like me to have adblocking on their routers.


I was wondering if the scripts could be tweaked so adblocking would be either limited to certain LAN IP addresses / ranges, or alternatively, certain LAN IP ranges could be excluded from filtering.
(background: I would like to have adblocking only on my mobile devices, but not on my PCs.)
 
Hi waffles, I don't think my script can be modified to do what you want. The raison d'être of the script was to be as simple as possible, not a complete solution.

I think you'll have to look at some of the other threads that make use of a proxy server or ipset/iptables to give you the flexibility you're after.
 
Thanks much Collin.

After some trial and error, I was able to install the Adblock Plus Filtering on my (other) AC66 router. This allows me to assign the blocking to defined IP addresses.
 
Last edited:
Thanks much Collin.

After some trial and error, I was able to install the Adblock Plus Filtering on my (other) AC66 router. This allows me to assign the blocking to defined IP addresses.

Details please. Starting to configure my new-to-me AC66R, and adblocking is a function I have on the current/soon to be retired Buffalo G.

Looking at how in integrate this feature in the AC66
 
kenhlan;
Sorry, I had posted a broken link in my post above. I have fixed it now. I simply followed the steps from there.
Good luck!
 
Would someone please sum up the adblock solutions, cause I'm really confused after reading all the comments here...I've tried using Colin's script, but I ended up without Internet, so I had to do a factory reset.

Appreciate the help.
 
I've modified ryzhov_al's script to use curl, as wget on the ac68u and optware were not compiled with https support.

You can use ryzhov_al's guide here http://forums.smallnetbuilder.com/showthread.php?t=9449

In step 1, instead use this command: ipkg install bash libcurl sed privoxy libiconv

You might have issues on your next logons since bash will replace shell, I had to edit a file as noted in this post: http://www.smallnetbuilder.com/forums/showpost.php?p=100299&postcount=2

In step 3 download this file instead:

Code:
wget http://pastebin.com/raw.php?i=aHBYQcxs -O- | tr -d '\r' >privoxy-blocklist_0.2.sh

Hi,

I am using ASUS AC56U and optware and after complete steps made by you, all sites that contains the only ad from exlude list are blocked at all. Do you have for me any advice?

BTW: link http://www.smallnetbuilder.com/forums/showpost.php?p=100299&postcount=2 does not longer works.
 
Last edited:
I'm sorry, I forgot to copy+paste my dnsmasq file. Make sure "/jffs/configs/dnsmasq.conf.add" file is exactly as the the 2nd quote box above. (it's been updated)

then run
Code:
service restart_dnsmasq

If the log file says something like this, it's configured correctly.
Code:
Sep 12 16:29:13 dnsmasq[4521]: read /tmp/adblock/hosts.blocked - 23817 addresses

I committed a lot of time on script 'adblock' and 'dnsmascq.conf.add':

black and white files lists are regularly added
the hosts file downloads and blocked are created

unfortunately something does not work because it does not appear in the log:
-----------------------------------------------------------------------------
Feb 22 11:27:50 adblock: wyxscript: Waiting for internet to come up
Feb 22 11:27:50 adblock: wyxscript: Internet is now up.
Feb 22 11:27:50 adblock: wyxscript: Downloading new blacklists
Feb 22 11:27:58 adblock: wyxscript: Whitelist found, applying it.
Feb 22 11:27:59 adblock: wyxscript: Restarting dnsmasq
Feb 22 11:27:59 rc_service: service 15982:notify_rc restart_dnsmasq
Feb 22 11:27:59 dnsmasq[13400]: exiting on receipt of SIGTERM
Feb 22 11:28:00 dnsmasq[15991]: started, version 2.73test6 cachesize 1500
Feb 22 11:28:00 dnsmasq[15991]: warning: interface ppp1* does not currently exist
Feb 22 11:28:00 dnsmasq[15991]: asynchronous logging enabled, queue limit is 5 messages
Feb 22 11:28:00 dnsmasq-dhcp[15991]: DHCP, IP range 192.168.1.1 -- 192.168.1.254, lease time 8m20s
Feb 22 11:28:00 dnsmasq[15991]: read /etc/hosts - 5 addresses
Feb 22 11:28:00 dnsmasq[15991]: read /etc/hosts.dnsmasq - 24 addresses
Feb 22 11:28:00 dnsmasq-dhcp[15991]: read /etc/ethers - 36 addresses
Feb 22 11:28:00 dnsmasq[15991]: ignoring nameserver 192.168.1.1 - local interface
-----------------------------------------------------------------------------------
I made many checks for possible my mistakes but i surrendered.
you have suggestions / ideas to help me?
 
I committed a lot of time on script 'adblock' and 'dnsmascq.conf.add':

black and white files lists are regularly added
the hosts file downloads and blocked are created

unfortunately something does not work because it does not appear in the log:
-----------------------------------------------------------------------------
Feb 22 11:27:50 adblock: wyxscript: Waiting for internet to come up
Feb 22 11:27:50 adblock: wyxscript: Internet is now up.
Feb 22 11:27:50 adblock: wyxscript: Downloading new blacklists
Feb 22 11:27:58 adblock: wyxscript: Whitelist found, applying it.
Feb 22 11:27:59 adblock: wyxscript: Restarting dnsmasq
Feb 22 11:27:59 rc_service: service 15982:notify_rc restart_dnsmasq
Feb 22 11:27:59 dnsmasq[13400]: exiting on receipt of SIGTERM
Feb 22 11:28:00 dnsmasq[15991]: started, version 2.73test6 cachesize 1500
Feb 22 11:28:00 dnsmasq[15991]: warning: interface ppp1* does not currently exist
Feb 22 11:28:00 dnsmasq[15991]: asynchronous logging enabled, queue limit is 5 messages
Feb 22 11:28:00 dnsmasq-dhcp[15991]: DHCP, IP range 192.168.1.1 -- 192.168.1.254, lease time 8m20s
Feb 22 11:28:00 dnsmasq[15991]: read /etc/hosts - 5 addresses
Feb 22 11:28:00 dnsmasq[15991]: read /etc/hosts.dnsmasq - 24 addresses
Feb 22 11:28:00 dnsmasq-dhcp[15991]: read /etc/ethers - 36 addresses
Feb 22 11:28:00 dnsmasq[15991]: ignoring nameserver 192.168.1.1 - local interface
-----------------------------------------------------------------------------------
I made many checks for possible my mistakes but i surrendered.
you have suggestions / ideas to help me?

Firmware 378.50 has the custom /jffs/scripts disabled by default?...just spent 20 mins wondering why the dnsmasq message didn't appear on a brand new RT-AC56U install for my parents....had simply forgot to enable them on Administration-System :eek:
 
Firmware 378.50 has the custom /jffs/scripts disabled by default?...just spent 20 mins wondering why the dnsmasq message didn't appear on a brand new RT-AC56U install for my parents....had simply forgot to enable them on Administration-System :eek:

Martineau thanks !! ;)

scripts scripts
passwords, , upgrade, change log, firmware, IP, DNS, DHCP, file cfg, log files , config, backup etc.. etc... Arggh !!
Working the night sometimes I get confused with little :D

You have discovered the problem, thx!
 

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top