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!

I've had that in Chrome at first. After a while it goes away. Try delete local contents and flush DNS.
 
guys, I used the steps in post#11 and all seems fine, however, on both IOS devices and windows - searching & clicking on search result links does redirect me to www.googleservices.com cannot find the page you are looking for or the server is down.
PS - I can see that 0.0.0.0 [www.googleadservices.com] is added to the whitelist file, any idea what needs to be modified?

cheers
 
Last edited:
It sounds like your whitelist is not being processed correctly. Look in hosts.blocked for googleservices.com. If it's still there then the whitelist is not working.

Make sure that you have created the whitelist file on the router (using something like vi or cat). Do not create the file using a Windows editor (like notepad). If there are any Windows/DOS carriage returns in the whitelist file it will stop it working. [NB Carriage returns are stripped out of the other files but I was too lazy to do it for the whitelist :rolleyes:]
 
I have updated the script in post #11 so that DOS carriage returns are ignored in the whitelist file.

This line:
Code:
grep -v -f $1/ASUS/hosts.whitelist $1/ASUS/hosts.downloaded > $1/ASUS/hosts.blocked
has been changed to this:
Code:
cat $1/ASUS/hosts.whitelist | sed $'s/\r$//' | grep -v -f - $1/ASUS/hosts.downloaded > $1/ASUS/hosts.blocked
 
It sounds like your whitelist is not being processed correctly. Look in hosts.blocked for googleservices.com. If it's still there then the whitelist is not working.

Make sure that you have created the whitelist file on the router (using something like vi or cat). Do not create the file using a Windows editor (like notepad). If there are any Windows/DOS carriage returns in the whitelist file it will stop it working. [NB Carriage returns are stripped out of the other files but I was too lazy to do it for the whitelist :rolleyes:]

thanks for your comment - will give this a go when I get home this evening

Update @ 20:41 -
I updated the post-mount script to reflect you recent change and then recreated hosts.whitelist using vi command and restarted router, here are the log -
dnsmasq[1914]: using nameserver 127.0.0.1#65053
Oct 16 19:56:56 dnsmasq[1914]: read /etc/hosts - 9 addresses
Oct 16 19:56:56 dnsmasq[1914]: read /tmp/mnt/My_NAS/Adblock/hosts.blocked - 23924 addresses
Oct 16 19:56:56 dnsmasq[1914]: read /etc/hosts.dnsmasq - 0 addresses

However, clicking on some search result link via chrome / FF and getting the below error message -
The server at www.googleadservices.com can't be found, because the DNS lookup failed. DNS is the network service that translates a website's name to its Internet address. This error is most often caused by having no connection to the Internet or a misconfigured network. It can also be caused by an unresponsive DNS server or a firewall preventing Google Chrome from accessing the network.

cheers
 
Last edited:
@ColinTaylor - I forgot to mention my dnsmasq.conf.add has the blow file for dnscrypt use, so I just added your dnsmasq.con.add code below it

### Use dnscrypt-proxy as a resolver
no-resolv
server=127.0.0.1#65053
address=/0.0.0.0/0.0.0.0
addn-hosts=/tmp/mnt/My_NAS/Adblock/hosts.blocked
 
It seems likely that dnscrypt-proxy is the cause of the problem, in which case I don't know how to fix it. You'll have to do some debugging to understand what's going on.

I'd start by issuing the following command on one of your client PC's and seeing what it says:
Code:
# nslookup www.googleadservices.com
 
It seems likely that dnscrypt-proxy is the cause of the problem, in which case I don't know how to fix it. You'll have to do some debugging to understand what's going on.

I'd start by issuing the following command on one of your client PC's and seeing what it says:
Code:
# nslookup www.googleadservices.com


Response -

\Admin> nslookup www.googleadservices.com
Server: router.asus.com
Address: 192.168.1.1

Name: www.googleadservices.com
Address: 0.0.0.0

PS - I don't think its the dnscrypt-proxy as issue started after setting up the adblock
 
Last edited:
Response -

\Admin> nslookup www.googleadservices.com
Server: router.asus.com
Address: 192.168.1.1

Name: www.googleadservices.com
Address: 0.0.0.0

PS - I don't think its the dnscrypt-proxy as issue started after setting up the adblock
OK, so it's returning 0.0.0.0 which means the blocklist is working but the whitelist isn't being applied to hosts.blocked. Double check all your spelling.
 
I mean check everything in your script for typing mistakes. Can you paste the script you're using here so I can see if I can spot something wrong with it?

Also double check the lines in the whitelist file. They must be in exactly this format:

0.0.0.0<space><URL>

There's only 1 space between 0.0.0.0 and the URL. There are no spaces after the URL.
 
Last edited:
Problems with Privoxy crashing regularly

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

I've been using this method to block ads on my iPad and Android phone, and it works for a time, but then privoxy crashes during the day when I'm at work and when I get home, I can't access the internet on my iPad or phone. I set up a check every hour to see if privoxy is running and if not, to restart it, but that doesn't seem to help keep privoxy going. Even refreshing it at hourly intervals, I still get the dreaded "no access to the internet" message when I use my iPad or phone after having been away for the day.

Does anyone know of a more stable (older?) version of privoxy I could use? Is this a recent problem with privoxy?

Thanks!
 
I mean check everything in your script for typing mistakes. Can you paste the script you're using here so I can see if I can spot something wrong with it?

Also double check the lines in the whitelist file. They must be in exactly this format:

0.0.0.0<space><URL>

There's only 1 space between 0.0.0.0 and the URL. There are no spaces after the URL.

@ColinTaylor - below is what am using

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

hosts.blacklist
0.0.0.0 ads.unblocksit.es

post-mount
#!/bin/sh

logger -t $(basename $0) $1

if [ $1 = "/tmp/mnt/My_NAS" ]
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/Adblock/hosts.downloaded

cat $1/Adblock/hosts.whitelist | sed $'s/\r$//' | grep -v -f - $1/Adblock/hosts.downloaded > $1/Adblock/hosts.blocked
cat $1/Adblock/hosts.blacklist | sed $'s/\r$//' >> $1/Adblock/hosts.blocked
logger -t $(basename $0) "Restarting dnsmasq"
service restart_dnsmasq
fi
 
@sammyano: Well I'm totally stumped. Can you do the following and post all the output please:
Code:
# ls -l /tmp/mnt/My_NAS/Adblock/hosts.*
# /jffs/scripts/post-mount /tmp/mnt/My_NAS
# ls -l /tmp/mnt/My_NAS/Adblock/hosts.*
 
@sammyano: Well I'm totally stumped. Can you do the following and post all the output please:
Code:
# ls -l /tmp/mnt/My_NAS/Adblock/hosts.*
# /jffs/scripts/post-mount /tmp/mnt/My_NAS
# ls -l /tmp/mnt/My_NAS/Adblock/hosts.*

@ColinTaylor - below are the output -


Admin@RT-AC66U:/tmp/home/root# ls -l /tmp/mnt/My_NAS/Adblock/hosts.*
-rw-rw-rw- 1 Admin root 26 Oct 17 18:39 /tmp/mnt/My_NAS/Adblock/host
s.blacklist
-rw-rw-rw- 1 Admin root 687171 Oct 17 18:56 /tmp/mnt/My_NAS/Adblock/host
s.blocked
-rw-rw-rw- 1 Admin root 687340 Oct 17 18:56 /tmp/mnt/My_NAS/Adblock/host
s.downloaded
-rw-rw-rw- 1 Admin root 182 Oct 17 18:45 /tmp/mnt/My_NAS/Adblock/host
s.whitelist
Admin@RT-AC66U:/tmp/home/root# /jffs/scripts/post-mount /tmp/mnt/My_NAS

Done.
Admin@RT-AC66U:/tmp/home/root# ls -l /tmp/mnt/My_NAS/Adblock/hosts.*
-rw-rw-rw- 1 Admin root 26 Oct 17 18:39 /tmp/mnt/My_NAS/Adblock/host
s.blacklist
-rw-rw-rw- 1 Admin root 687143 Oct 17 21:23 /tmp/mnt/My_NAS/Adblock/host
s.blocked
-rw-rw-rw- 1 Admin root 687312 Oct 17 21:23 /tmp/mnt/My_NAS/Adblock/host
s.downloaded
-rw-rw-rw- 1 Admin root 182 Oct 17 18:45 /tmp/mnt/My_NAS/Adblock/host
 
Last edited:
@sammyano: Well, I've just run the script on my router with exactly the same black and white lists and it results in exactly the same files as you have. But it's working fine for me.

It almost sounds like your router is using hosts.downloaded instead of hosts.blocked

There must be something different between our setups and the only thing you have mentioned is you using dnscrypt-proxy. Can you try disabling that and seeing if it makes a difference?
 
Thanks for your time man - I think I will just leave it as I don't want to mess with the dnscrypt as it took me a while to get that working
PS - now am nolonger prompted for googleadservices.com, but ad.doubleclick.net .
 
Thanks for your time man - I think I will just leave it as I don't want to mess with the dnscrypt as it took me a while to get that working
PS - now am nolonger prompted for googleadservices.com, but ad.doubleclick.net .
Well it sounds like it might be working again as ad.doubleclick.net is in the blocklist. You can whitelist that site as well if you want to, but of course you will start seeing adverts from them again.

Bear in mind that if you want to block ad sites you won't be able to click on most of the sponsored "Ad" links returned by Google search. They are, by definition, Ad's.
 
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'm an uber n00b trying to get this going...

Rryzhov_al's script seems to imply that you have some working knowledge of all of this already... I've got the RT-AC68-U and I'm lost right out of the gate with this:

(quoted from Ryzhov_al's post)
Setup
1. Install necessary packages:

Quote:
opkg install bash wget sed privoxy

Where/how do I install this? Within a .txt file on a hard drive connected via USB to the router? Flash drive connected to the router? Connect drive to pc, install, then plug into router? Do I need to create a folder structure on the drive first?

2. Install prepared privoxy configuration file:

Quote:
cd /opt/etc/privoxy/
rm ./config
wget http://files.ryzhov-al.ru/Routers/adblock-plus/config

Says to install "prepared" config file...how do I prepare the file? These look like DOS commands. Does this go in a CMD prompt? Or by installing a file somewhere in some way? Is this interacting with the ROUTER in some way? I'm sure I sound dim right now, but I am starting from ground zero and I would love these ad blocking features.
 
Last edited:
Says to install "prepared" config file...how do I prepare the file? These look like DOS commands. Does this go in a CMD prompt? Or by installing a file somewhere in some way? Is this interacting with the ROUTER in some way? I'm sure I sound dim right now, but I am starting from ground zero and I would love these ad blocking features.
All the commands referred to in this thread are issued from the command line on the router. The router runs a version of Linux called Busybox. Everything here assumes you have a working knowledge of unix-like systems and have the tools installed on your PC to use it.

If you have no knowledge of command line Unix systems then it would be beyond the scope of this forum to teach you. :(
 

Similar 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