折腾了下DD-WRT去广告 - Leo's Utopia

折腾了下DD-WRT去广告

leo.zhao posted @ Fri, 04 Oct 2013 19:55:52 +0800 in linux with tags 广告 路由器 , 11177 readers

十一长假怕各种堵,且缺钱,没有出去玩。

无聊在家折腾了一下路由器DD-WRT固件的去广告。

简单介绍一下:路由器型号是TL-WRT841ND V7,两年前购于京东,老早就刷了DD-WRT固件。

这种DD-WRT固件去广告的教程,网上一搜一大堆,出处我就不引用了。具体操作一共两步:

1. 添加获取Chinalist广告列表的脚本为启动命令。

路由器菜单:管理-〉命令

#!/bin/sh
logger WAN up script executing
if test -s /tmp/dnsmasq.ads
then
	rm /tmp/dnsmasq.ads
fi

logger Downloading China Lazy List
wget -O - http://adblock-chinalist.googlecode.com/svn/trunk/adblock-lazy.txt | grep ^\|\|[^\*]*\^$ |
sed -e 's:||:address\=\/:' -e 's:\^:/127\.0\.0\.1:' > /tmp/dnsmasq.ads
grep conf-file /tmp/dnsmasq.conf ||
echo -e "\nconf-file=/tmp/dnsmasq.ads" >> /tmp/dnsmasq.conf
logger Restarting dnsmasq
killall dnsmasq
dnsmasq --conf-file=/tmp/dnsmasq.conf

2. 给路由器增加定时自动更新列表的命令。

路由器命令:管理-〉管理-〉CRON

* 1 * * * root /tmp/.rc_startup

备注:网上很多地方的教程中有个由于浏览器自动断行导致的小坑,启动指令的wget那行(第9行)命令和之后的grep命令应该是放在同一行的。我一开始直接抄过来的命令,结果导致路由器把所有的网址都给屏蔽了。

看来,这网上的东西还是得留个心眼的!

rock said:
Wed, 18 Dec 2013 17:09:27 +0800

hi,按照这个方法走路由器屏蔽了广告后,火狐会出现不少弹筐,提示输入用户名和密码,如我访问163网站,代码中屏蔽了img1.126.net , 不知道这个是什么原因,如何解决。 谢谢。
ie似乎弹筐较少。
见图
http://xfire.sinaapp.com/5ddae285916903f3ddc03b701e7ebc6d.png

jimmy yang said:
Fri, 17 Jul 2015 14:50:41 +0800

好样的 ,,,,,,,,,,

Taylor said:
Mon, 21 Nov 2022 19:42:59 +0800

If you're looking to improve your home network and want to take things to the next level, consider tossing DD-WRT onto your router. DD-WRT is a powerful open-source firmware that can improve your router's performance and add a variety of features. One of the best features of DD-WRT is that it can be used to create a VPN server, allowing you to securely access your home network from anywhere in the world. restaurant pos system dubai DD-WRT is also great for increasing the range of your wireless network and for improving speeds.

reese said:
Sat, 26 Nov 2022 19:58:13 +0800

Through this post, you will get a brief idea of how to advertise the router DD-WRT firmware discussed here. Actually, I am home real estate Circle Pines not really aware of this topic and just go through it, when I visit this link. Good to see the program shared here and I am looking for more updates on that.

rov said:
Thu, 01 Dec 2022 23:51:47 +0800

If you're looking to increase your home Wi-Fi signal, you may want to consider tossing DD-WRT onto your router. DD-WRT is home real estate Sarasota a firmware that can be installed on many routers that allows for increased functionality and better performance. One of the great features of DD-WRT is that it can be used to create a Wi-Fi repeater, which can help extend your home Wi-Fi signal.

zaiya said:
Fri, 27 Jan 2023 13:37:00 +0800

If you are looking for an easy to use router with all the advanced features, then the DD-WRT firmware is worth considering. With just a couple of steps, it can easily block all kinds of advertisements, so that you can enjoy smooth web browsing without interruption. Not only that, but it also offers you a wide range of features such as dual-core processor, and high performance wireless networking. All these features cheap real diamond rings online make the DD-WRT firmware an ideal choice for those who are looking for a hassle-free router experience.

jnanabhumiap.in said:
Fri, 12 Jan 2024 17:56:09 +0800

JNANABHUMI AP offers the most recent information on education. The primary idea or goal of this website has been to offer comprehensive resources with information on any subject that can be accessed online. To make sure that every reader finds out what they should know about the subject they are interested in and jnanabhumiap.in links to our content.Jnanabhumi AP is a startup founded by enthusiastic bloggers and webmasters who are driven to produce interesting, factual, and well-written content. We are similar to an online community where you can find a variety of resources, information, and topics about newsworthy events or daily occurrences.


Login *


loading captcha image...
(type the code from the image)
or Ctrl+Enter
Host by is-Programmer.com | Power by Chito 1.3.3 beta | © 2007 LinuxGem | Design by Matthew "Agent Spork" McGee