What's new

AdBlocking with combined hosts file

  • 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!

yes i have read them.
you mention windows computers.
I am testing on my android smartphone wich i have rebooted after each attempt.
So i hope cache aint a problem.
Is it working on a PC?
 
Is it working on a PC?

Unfortionally it isnt working on a pc either.
I did the ipconfig /flushdns and rebooted my laptop to see pages filled with adds.
Is there a command i can do on the router itself to see if everything is running correctly?
When i manually execute post-mount or update-hosts.sh i get a done message after a few seconds.
The AC68U is running latest John fork and i enabled settings for jffs in system.
 
Unfortionally it isnt working on a pc either.
I did the ipconfig /flushdns and rebooted my laptop to see pages filled with adds.
Is there a command i can do on the router itself to see if everything is running correctly?
When i manually execute post-mount or update-hosts.sh i get a done message after a few seconds.
The AC68U is running latest John fork and i enabled settings for jffs in system.
Look at post #508 to enable logging for hints
 
Unfortionally it isnt working on a pc either.
I did the ipconfig /flushdns and rebooted my laptop to see pages filled with adds.
Is there a command i can do on the router itself to see if everything is running correctly?
When i manually execute post-mount or update-hosts.sh i get a done message after a few seconds.
The AC68U is running latest John fork and i enabled settings for jffs in system.
Is your host.blocked file full of addresses?
If its not check you didn't have a blank line in your whitelist.txt file like me.

The file was created for me too but was empty

That was the start of my troubles
 
Is your host.blocked file full of addresses?
If its not check you didn't have a blank line in your whitelist.txt file like me.

The file was created for me too but was empty

That was the start of my troubles

I am using the standard version not the advanced one, when i open the hosts.clean file i see a lot of entries.
Just re-read post 1 and i see even without using the black/whitelist the advanced verison has more entries to block.
I might as well build everything for the 4th time but now using the advanced version/scripts.
Is entware needed as i dont have installed now.
 

Attachments

  • adblock.PNG
    adblock.PNG
    31.2 KB · Views: 726

Thanks for the help:)
I believe it is working, looking at post 508 i made the adjustments and opend the logging.
I read a few more posts and made the changes to update-service to renew the file every Friday although i think i will turn it off entirly as it will use resources that are not needed.
The adds are gone now and i see a lot of entries in the log
Code:
Jan 17 12:56:37 dnsmasq[903]: /tmp/mnt/sda/hosts.blocked googleads.g.doubleclick.net is 0.0.0.0
Jan 17 12:56:37 dnsmasq[903]: query[A] googleads.g.doubleclick.net from 192.168.1.3
Jan 17 12:56:37 dnsmasq[903]: /tmp/mnt/sda/hosts.blocked googleads.g.doubleclick.net is 0.0.0.0
Jan 17 12:56:49 dnsmasq[903]: query[A] static.xx.fbcdn.net from 192.168.1.76
Jan 17 12:56:49 dnsmasq[903]: cached static.xx.fbcdn.net is <CNAME>
Jan 17 12:56:49 dnsmasq[903]: forwarded static.xx.fbcdn.net to 84.116.46.23
Jan 17 12:56:49 dnsmasq[903]: query[A] static.xx.fbcdn.net from 192.168.1.76
Jan 17 12:56:49 dnsmasq[903]: forwarded static.xx.fbcdn.net to 84.116.46.22
Jan 17 12:56:49 dnsmasq[903]: forwarded static.xx.fbcdn.net to 84.116.46.23
Jan 17 12:56:49 dnsmasq[903]: reply static.xx.fbcdn.net is <CNAME>
Jan 17 12:56:49 dnsmasq[903]: reply scontent.xx.fbcdn.net is 31.13.91.6

One thing though, when i use custom DNS servers like Google DNS it doesnt work, im geussing it is using the DNS server of my ISP now.
Is there a way i can still use custom DNS servers as the ones from ISP arent that fast:(
 
Last edited:
Is there a way i can still use custom DNS servers as the ones from ISP arent that fast
Sure:
1. WAN / Internet Connection: In WAN DNS Setting set:
Connect to DNS Server automatically: No
Set DNS Server1 and Server2 to your desired DNS Server, eg 8.8.8.8 and 4.4.4.4 for google.
2. LAN / DHCP Server:
Set Forward local domain queries to upstream DNS to: No
 
Out of curiosity with Merlin taking a sabbatical, will this work with stock firmware?

As in is there a way to get this setup to work with stock?
 
This is amazing. Thank you so much. I was about to purchase a pi to try out a pi-hole, but this did everything I need without any extra hardware. Thanks again!!
 
Hello guys, I installed everything and got it to work.
One notice why it fails sometimes -> the copy pasting generates lines breaks, so this breaks the script... just a notice as I experienced this.

Anyway I have two issues.
First one is, it blocks other host which are not in the hosts.blocked sometimes.
Second, openvpn-routing: Skipping, client 1 not in routing policy mode, which I don't know what it means, but shows up as connection error in the VPN status (VPN still working).

I'm using VPN on the asuswrt, maybe it's somehow the combination and I've added to firewall start:
iptables -I FORWARD -i br0 -o eth0 -j DROP
so my connection stops when the VPN drops.

So second issue doesn't concern me that much, but the first one does.
For example some pages are not loading at all, even placed in the whitelist (and I checked they are def not in blocked hosts!).
Going to zippyshare.com works, but going to zippyshare.com/XYZ/file.html doesn't. Streaming content from it on other pages also doesn't load. Someone has in idea?
Using a VPN connection on a local machine makes everything work (this way hosts doesn't affect the transfer, it's a VPN in a VPN tunnel in that case), so it's not the VPN host or block or something, it has something to do with the hosts!

Tnx!
uU
 
Hello guys, I installed everything and got it to work.
One notice why it fails sometimes -> the copy pasting generates lines breaks, so this breaks the script... just a notice as I experienced this.

Anyway I have two issues.
First one is, it blocks other host which are not in the hosts.blocked sometimes.
Second, openvpn-routing: Skipping, client 1 not in routing policy mode, which I don't know what it means, but shows up as connection error in the VPN status (VPN still working).

I'm using VPN on the asuswrt, maybe it's somehow the combination and I've added to firewall start:
iptables -I FORWARD -i br0 -o eth0 -j DROP
so my connection stops when the VPN drops.

So second issue doesn't concern me that much, but the first one does.
For example some pages are not loading at all, even placed in the whitelist (and I checked they are def not in blocked hosts!).
Going to zippyshare.com works, but going to zippyshare.com/XYZ/file.html doesn't. Streaming content from it on other pages also doesn't load. Someone has in idea?
Using a VPN connection on a local machine makes everything work (this way hosts doesn't affect the transfer, it's a VPN in a VPN tunnel in that case), so it's not the VPN host or block or something, it has something to do with the hosts!

Tnx!
uU
Thanks for the input. I am aware of the problem with line breaks (and Windows formatted files, they need to be Unix EOL).

I am currently working on a automated install script to save you all the hassle of manually copy-pasting the files to the router.
The beta version is out for testing in [Beta] Adblock WCHFA, need some beta testers.
The next release 0.9.6 will address some of the problems you or other users had.

0.9.6_beta will be out soon, with new features and improvements.
 
AB-Solution 1.0 is out. The first stable release that automates the install for the hosts file based Ad blocking.
 

Similar threads

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