讓DD-WRT 幫你阻擋一些 廣告網站&網頁.

刷了DD-WRT 後 總要讓它 做點事.

用 HOSTS 的方法讓它檔掉一些 已知的不良網站 也不錯.
方法如下



在 Administration---->Commands 的Command Shell 貼上下列的東東 後"Save Startup".
重開ROUTER 即可.
sleep 30 -----時間可更改 我的ROUTER 開機後撥接連線比較慢 所以設成 30秒.

http://a9988cd.myweb.hinet.net/ehost/hosts.txt <------這個是我從網路蒐集來一些 AD 網站&網頁列表(包含中國的危險網頁 更新至2007-12-31日)

-----------------------------以下-----------------------------------------------

logger WAN UP Script Executing
sleep 30
test -s /tmp/dlhosts
if [ $? == 1 ] ; then
wget -O - http://a9988cd.myweb.hinet.net/ehost/hosts.txt | grep 127.0.0.1 | sed -e '2,$s/127.0.0.1/0.0.0.0/g' -e '2,\$s/0.0.0.0 localhost/127.0.0.1 localhost/g' -e 's/[[:space:]]*#.*$//' > /etc/hosts
echo -e "#!/bin/sh\nwget -O - http://a9988cd.myweb.hinet.net/ehost/hosts.txt | grep 127.0.0.1 | sed -e '2,\$s/127.0.0.1/0.0.0.0/g' -e '2,\$s/0.0.0.0 localhost/127.0.0.1 localhost/g' -e 's/[[:space:]]*#.*$//' > /tmp/hosts\nlogger DOWNLOADED http://a9988cd.myweb.hinet.net/ehost/hosts.txt\nkillall -1 dnsmasq" > /tmp/dlhosts
chmod 777 /tmp/dlhosts
/tmp/dlhosts
fi
ln -s /tmp/hosts /etc/hosts
echo "45 23 * * 5 root /tmp/dlhosts" >> /tmp/crontab

---------------------------------以上--------------------------------------------------

驗收 :

PING www.bomis.com

回應如下 可判定安裝成功


C:\Documents and Settings\dvd>ping ads.bomis.com

Pinging ads.bomis.com [0.0.0.0] with 32 bytes of data:

Destination specified is invalid.
Destination specified is invalid.
Destination specified is invalid.
Destination specified is invalid.

Ping statistics for 0.0.0.0:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),


2008-01-01 15:45 發佈
感謝~~ a9988cd 大大提供訊息
等等回家改一下
我的玩具 Canon 1D Mark2 Sony Vaio Dopod 818pro@wm6 有回覆留言時,麻煩回一份 到 私人訊息
我試了,但是http://a9988cd.myweb.hinet.net/ehost/hosts.txt無法下載
請問可以再放置檔案嘛?3Q
chuehyen wrote:
我試了,但是http...(恕刪)



很久沒有蒐集 中國的危險網頁 所以......
您可以把網址 改成 下方藍色的網址.

來源
http://www.linksysinfo.org/forums/showthread.php?t=57556


* MVPS HOSTS file: (~18,500 records, 680 Kbyte)

http://www.mvps.org/winhelp2002/hosts.txt


* PGL YOYO: (~2,200 records, 68 Kbyte)
http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts

* hosts-file.net:(~53,000 records, 1.5 Mbyte)
http://www.it-mate.co.uk/downloads/hosts.txt

* The Hosts File Project: (~102,000 records, 3.0 Mbyte) ***requires 6mb free memory***
http://hostsfile.mine.nu/Hosts
無效!
ping 的結果 reply 仍然出來, 是否請重新製作一個造福人群啊?
內文搜尋
X
評分
評分
複製連結
Mobile01提醒您
您目前瀏覽的是行動版網頁
是否切換到電腦版網頁呢?