SmallNetBuilder Forums
Go Back   SmallNetBuilder Forums > Wireless Networking > ASUS Wireless > Asuswrt-Merlin

Reply
 
Thread Tools Search this Thread Display Modes
  #61  
Old 11-29-2014, 08:26 PM
waffles waffles is offline
Member
 
Join Date: Mar 2013
Posts: 44
Thanks: 12
Thanked 0 Times in 0 Posts
waffles is just starting out
Default

Quote:
Originally Posted by ryzhov_al View Post
.....
6. Add web traffic interception rule to iptables.

Quote:
Quote:
echo \#!/bin/sh > /jffs/scripts/firewall-start
echo iptables -t nat -A PREROUTING --source 192.168.0.101 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128 >> /jffs/scripts/firewall-start
chmod +x /jffs/scripts/firewall-start
where 192.168.0.101 is an IP address from step above.

Reboot router and check web surfing on chosen device.

If you want to change AdBlock subscriptions, please remove old ones first:

then repeat step #4 only.
I cannot seem to get past this point 6. I am not clear what I need to do. I see the file called 'firewall-start'. It only contains one line:
Quote:
#!/bin/sh
I replaced it with the entire part from what is in quotes above (and updated the IP address to the one for my device).
However after rebooting the router, adblocking still does not work and the the 'firewall-start' file has changed back to the one line from above.

What am I doing wrong??
Reply With Quote
  #62  
Old 11-29-2014, 11:34 PM
waffles waffles is offline
Member
 
Join Date: Mar 2013
Posts: 44
Thanks: 12
Thanked 0 Times in 0 Posts
waffles is just starting out
Default

never mind - I got it to work. Not sure what I did differently though.
Reply With Quote
  #63  
Old 12-02-2014, 03:14 PM
aph aph is offline
New Member
 
Join Date: Nov 2013
Posts: 15
Thanks: 0
Thanked 3 Times in 3 Posts
aph is just starting out
Default

Quote:
Originally Posted by ryzhov_al View Post
Shell script can be used on any platform. You need to find privoxy package for ARM platform.
That was my assumption last time I tried it on optware. I believe there was a syntax error in one of the parsing commands (possibly sed). I will try again and post back with detailed results
Reply With Quote
  #64  
Old 01-28-2015, 04:06 PM
yorgi yorgi is offline
New Member
 
Join Date: Jan 2015
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
yorgi is just starting out
Default

Quote:
Originally Posted by ryzhov_al View Post
This is HOW-TO for using Adblock Plus filters on router with Merlin's firmware. Better to use it with iOS/Android devices. Using with PC will slow down web surfing because of router performance limitations.
It's based on privoxy — a proxy server, which will intercept and filter all web-traffic from chosen iOS/Android device.

Requirements:
1. Asuswrt-Merlin driven RT-N16/RT-N66U/RT-AC66U router with USB-drive.
2. Working Entware environment. Please, refer to Eric's how-to for details.

Setup
1. Install necessary packages:

2. Install prepared privoxy configuration file:

3. Install script for converting AdBlock Plus rules:

4. Choose AdBlock Plus subscriptions.
Please, find "URLS=" string in privoxy-blocklist_0.2.sh and put your own subscriptions here. You may sneak subscription URLs in you favourite browser or here. The default subscriptions is a easylistgermany and easylist.
Now convert AdBlock Plus rules to privoxy format by running:

5. Choose iOS/Android/PC device where filtering needed.
Please, go to router's web interface, "LAN > DHCP Server" page, and select "Enable Manual Assignment" button.
Add your device to "Manually Assigned IP around the DHCP list". Better to do it while device is connected to router: you may select it's MAC from drop-down list and assign an IP address for it, for example "192.168.0.101". Don't forget to push "Apply" button (I did)
6. Add web traffic interception rule to iptables.

where 192.168.0.101 is an IP address from step above.

Reboot router and check web surfing on chosen device.

If you want to change AdBlock subscriptions, please remove old ones first:

then repeat step #4 only.
I installed this script and it works great.

I need an ip range from 192.168.11.97-192.168.11.99 to work with my 3 devices

I read this thread several times but its still not clear to me on how to do this.

is it possible to use more then one device with this script?

Also I tried this script http://www.dondeg.com/vpn/tut3a.html
It's to direct traffic over the vpn.
I have it setup for these ip address's 192.168.11.97, 192.168.11.98 and 192.168.11.99 which will be excluded from the vpn and every other ip will go to the VPN

it works great alone but when i enable your ad-block script together
the ad-block script stops working.

Can this router support more then one script at a time?
If you can take a look at this script it would be greatly appreciated.

Last edited by yorgi; 01-28-2015 at 04:14 PM.
Reply With Quote
  #65  
Old 01-28-2015, 11:06 PM
hankydysplasia hankydysplasia is offline
New Member
 
Join Date: Mar 2013
Posts: 7
Thanks: 1
Thanked 1 Time in 1 Post
hankydysplasia is just starting out
Default

I have a range of 10 IP's which adblock for 2 iPhones, an iPad, a Kindle, and guests.

Follow the tutorial, but in place of Step 6 use this:
Quote:
echo \#!/bin/sh > /jffs/scripts/firewall-start
echo iptables -t nat -A PREROUTING -m iprange --src-range 192.168.11.97-192.168.11.99 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128 >> /jffs/scripts/firewall-start
chmod +x /jffs/scripts/firewall-start
I don't know about the 2nd option you are mentioning with VPN traffic.
Reply With Quote
The Following User Says Thank You to hankydysplasia For This Useful Post:
Reply

Tags
adblock, howto, privoxy, tutorial

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -4. The time now is 06:43 PM.


Top 10 Stats
Top Posters* Top Thanked
RMerlin  539
john9527  188
System Error...  171
huotg01  160
stevech  152
L&LD  149
jegesq  143
hggomes  88
azazel1024  83
RussellInCinc...  71
RMerlin  6989
john9527  668
stevech  375
ryzhov_al  311
L&LD  275
TeHashX  271
RogerSC  211
hggomes  176
sinshiva  156
sfx2000  145
Most Viewed Threads* Hottest Threads*
Old [CLOSED]...  45435
Old SECURITY:...  18710
Old ASUS...  11022
Old ASUS...  8249
Old Asuswrt-Merli...  5797
Old Asus...  5457
Old choose a new...  3547
Old dd-wrt for...  2527
Old Bulding...  2347
Old Horrible...  2167
Old [CLOSED]...  338
Old Asus...  108
Old Asuswrt-Merli...  79
Old SECURITY:...  74
Old choose a new...  73
Old ASUS...  59
Old dd-wrt for...  48
Old What is dual...  44
Old ASUS...  43
Old Can you help...  40


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
© 2006-2015 Pudai LLC All Rights Reserved.