hosts datei modifizieren

Post new topic   Reply to topic    DD-WRT Forum Index -> Allgemeine Fragen
Author Message
Fleggi
DD-WRT Novice


Joined: 19 Feb 2010
Posts: 6

PostPosted: Fri Feb 19, 2010 19:33    Post subject: hosts datei modifizieren Reply with quote
Hallo zusammen,

ich möchte gerne die Hostsdatei an meinem dd-wrt verändern um unerwünschte werbung etc dierekt umzuleiten und ins nirvana zu verbannen. Meine Frage ist wie kann ich die Datei modifizieren? Gibt es hierfür ein script schnipsel oder eine Anleitung die ich über die Suchfunktion nicht gefunden habe?

Gruß
Thomas

PS:
Hardware: WRT 320 N @ Mega Generic
und der Link zur hosts datei die ich gerne einbinden möchte http://www.mvps.org/winhelp2002/hosts.htm
Sponsor
Fleggi
DD-WRT Novice


Joined: 19 Feb 2010
Posts: 6

PostPosted: Thu Feb 25, 2010 18:43    Post subject: Reply with quote
Danke für die Info Very Happy Klappt prima! Hab das script jedoch noch entsprechend angepasst das es bei jedem "WANUP" ausgeführt wird.
Code:
echo "
wget -O - http://www.mvps.org/winhelp2002/hosts.txt | grep 127.0.0.1 | sed -e '2,$s/127.0.0.1/0.0.0.0/g' -e 's/[[:space:]]*#.*$//' > /etc/hosts
logger "$0: Hosts-file downloaded"
stopservice dnsmasq
startservice dnsmasq
logger "$0: DNSMasq restarted"
" > /tmp/.wanup
chmod 700 /tmp/.wanup
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Allgemeine Fragen All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum