刷了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),
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
內文搜尋
X




























































































