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!

MarkhamSnappy

New Around Here
I've searched high and low, and I cannot find a tutorial to block ads on my shiny new router. Does ANYONE have an ARM based Merlin setup, with adblocking working yet?!?

The problem I've come across is, the ARM chipset doesn't support ENTWARE yet, only OPTWARE.

I've seen this tutorial, but it would'nt apply to the RT-AC68U, as it requires ENTWARE:
a) http://forums.smallnetbuilder.com/showthread.php?t=9449

And these tutorials, but they don't apply, as they are for Tomato:
b) http://www.shadowandy.net/tag/rt-ac68u
c) http://www.linksysinfo.org/index.php?threads/script-clean-lean-and-mean-adblocking.68464/



Anyone.. If you've managed to tweak an Entware adblocking setup (to work with Optware) on your router, or are simply a router genius and made your own, please respond and help us out here. I really like Merlin, but if I can't block ads in my house with all of my handheld devices (plus through a VPN tunnel), then Tomato is looking better every day.
ALSO... I used to run DD-WRT with Pixelserv, and am used to that and would really like to use it as well. (there is a port of Pixelserv for ARM out now)

:-(
 
Last edited:
I'm also interested in ad blocking on a AC-68U Merlin build router. :)

Coming from a DD-WRT 1043ND TP-Link router I like the Asus and Merlin build a lot.
Now some nice script/pixelserv or other ad blocking solution would be welcome.
DD-wrt solutions are poisening the DNS host table.
I would like a clean simple solution. Not corrupting the router RAM memory.
Easyly maintainable ( black/whitelist/...)

I think the solution is somewhere here:
http://www.shadowandy.net/2012/11/a...e-internet-for-all-your-devices.htm#more-4731

special build for arm typ AC-68U of Pixelserv
 
Last edited:
Hmm, this would be awesome indeed... but I'd rather stick with this firmware, and not install tomatousb.
 
Which method exactly? The first post says it requires Entware?
No, it doesn't require entware. It think the guys posting it already had entware installed so those line were already in their scripts.

My code looks like this. It puts its downloaded files on my USB stick, at "/tmp/mnt/VERBATIM" in a folder called "ASUS". You would have to change all references to "VERBATIM" and "ASUS" to match your setup.

Code:
# cat /jffs/configs/dnsmasq.conf.add
address=/0.0.0.0/0.0.0.0
addn-hosts=/tmp/mnt/VERBATIM/ASUS/hosts.blocked


Code:
# cat /jffs/scripts/post-mount
#!/bin/sh

logger -t $(basename $0) $1

if [ $1 = "/tmp/mnt/VERBATIM" ]
then
        logger -t $(basename $0) "Updating blacklist"
        sleep 5                         # Wait for WAN to come up then update list
        wget -qO- \
                "http://winhelp2002.mvps.org/hosts.txt" \
                "http://someonewhocares.org/hosts/zero/hosts" \
                "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext&useip=0.0.0.0" \
                | grep -w ^0.0.0.0 | sed $'s/\r$//' | sort -u > $1/ASUS/hosts.downloaded

        cat $1/ASUS/hosts.whitelist | sed $'s/\r$//' | grep -v -f - $1/ASUS/hosts.downloaded > $1/ASUS/hosts.blocked
        cat $1/ASUS/hosts.blacklist | sed $'s/\r$//' >> $1/ASUS/hosts.blocked
        logger -t $(basename $0) "Restarting dnsmasq"
        service restart_dnsmasq
fi
UPDATE 15/10/2014: I have changed one line in the script above so that DOS carriage returns are ignored in the whitelist file.

Code:
# cat /tmp/mnt/VERBATIM/ASUS/hosts.blacklist
0.0.0.0 ads.unblocksit.es
Code:
# cat /tmp/mnt/VERBATIM/ASUS/hosts.whitelist
!!! sky player !!!
0.0.0.0 adm.fwmrm.net
0.0.0.0 adserver.adtech.de
!!! shopping !!!
0.0.0.0 www.googleadservices.com
0.0.0.0 pixel.everesttech.net
0.0.0.0 clickserve.dartsearch.net


* Credit goes to thelonelycoder for the original code. I just tweaked it around the edges *
 
Last edited:
@ColinTaylor

Oh I see, thanks! With this method, when an ad is blocked what does it look like? Do you just get a 404-message in place of the ad?

Not sure I understand all the steps needed to implement this but I'll have closer look when I have more time.
 
Oh I see, thanks! With this method, when an ad is blocked what does it look like? Do you just get a 404-message in place of the ad?
I'd say that in 99% of cases the ad just doesn't appear at all, it's completely removed. Sometimes you do see a 404 error though.
 
I'd say that in 99% of cases the ad just doesn't appear at all, it's completely removed. Sometimes you do see a 404 error though.

Sounds good, thanks! So I just follow the original guide and use your code since we know it works? I have the AC68 but that shouldn't matter right?
 
If you read the original thread you will get to understand how it works and the thinking behind the pieces of code.

The code I posted is what I use myself. I've modified it from the original guide to suit my needs (it's slightly simpler). My code puts it's downloaded files on my USB stick, at "/tmp/mnt/VERBATIM" in a folder called "ASUS". You would have to change all references to "VERBATIM" and "ASUS" to match your setup.

I can't think of a reason why this wouldn't work on your AC68.

Good Luck
 
If you read the original thread you will get to understand how it works and the thinking behind the pieces of code.

The code I posted is what I use myself. I've modified it from the original guide to suit my needs (it's slightly simpler). My code puts it's downloaded files on my USB stick, at "/tmp/mnt/VERBATIM" in a folder called "ASUS". You would have to change all references to "VERBATIM" and "ASUS" to match your setup.

I can't think of a reason why this wouldn't work on your AC68.

Good Luck

I'll give a try, thanks for helping out an Asus-noob... :)
 
Do you notice any slowdown in web page loading?
No, very much the reverse. It's a lot quicker* without having to pull in all those ads (even on my 100Mb line).

* How much quicker obviously varies from site to site.
 
Last edited:
No, it doesn't require entware. It think the guys posting it already had entware installed so those line were already in their scripts.

I use this:
Code:
# cat /jffs/configs/dnsmasq.conf.add
address=/0.0.0.0/0.0.0.0
addn-hosts=/tmp/mnt/VERBATIM/ASUS/hosts.blocked


Code:
# cat /jffs/scripts/post-mount
#!/bin/sh

logger -t $(basename $0) $1

if [ $1 = "/tmp/mnt/VERBATIM" ]
then
        logger -t $(basename $0) "Updating blacklist"
        sleep 5                         # Wait for WAN to come up then update list
        wget -qO- \
                "http://winhelp2002.mvps.org/hosts.txt" \
                "http://someonewhocares.org/hosts/zero/hosts" \
                "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=0&mimetype=plaintext&useip=0.0.0.0" \
                | grep -w ^0.0.0.0 | sed $'s/\r$//' | sort -u > $1/ASUS/hosts.downloaded

        grep -v -f $1/ASUS/hosts.whitelist $1/ASUS/hosts.downloaded > $1/ASUS/hosts.blocked
        cat $1/ASUS/hosts.blacklist | sed $'s/\r$//' >> $1/ASUS/hosts.blocked
        logger -t $(basename $0) "Restarting dnsmasq"
        service restart_dnsmasq
fi

Code:
# cat /tmp/mnt/VERBATIM/ASUS/hosts.blacklist
0.0.0.0 ads.unblocksit.es
Code:
# cat /tmp/mnt/VERBATIM/ASUS/hosts.whitelist
!!! sky player !!!
0.0.0.0 adm.fwmrm.net
0.0.0.0 adserver.adtech.de
!!! shopping !!!
0.0.0.0 www.googleadservices.com
0.0.0.0 pixel.everesttech.net
0.0.0.0 clickserve.dartsearch.net

Sorry i do not understand, if it does not require entware as you install it on ac68u ?
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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