DNS to block ads
phn at icke-reklam.ipsec.nu
phn at icke-reklam.ipsec.nu
Wed Apr 24 16:01:56 UTC 2002
Don Sutter <_drs at hevanet.com> wrote:
> I'm somewhat new at this DNS stuff but is it possible to somehow use my
> local copy of bind to make unwanted URL's disappear? Unwanted URL's meaning
> known Ad Servers and by disappear I mean lookups resolve locally to
> 127.0.0.1 or 0.0.0.0 ... kinda' like RBL but for browsers.
Shure. Just create the zones IN THE SERVER THAT YOUR CLIENT USE
zone "doubleclick.net" in {
type master;
file "fake/fake";
};
zone "doubleclick.com" in {
type master;
file "fake/fake";
};
zone "targetnet.com" {
type master;
file "fake/fake";
};
Then create the zonefiles :
$TTL 86400
@ IN SOA sweet.manet.nu. peter.sweet.manet.nu. (
40 ; Serial
3600 ; Refresh
300 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS sweet.manet.nu.
IN NS ture.manet.nu.
;* IN A 127.0.0.1
* IN A 62.20.110.227
Various browsers do react differently depending on "if the link does
not exists", they might display ugly icons. In those cases one could
redirect to a http-server that just presents a small/fast icon.
Local experimentation is recommended.
> I tried using my hosts file for this purpose but it didn't seem to totally
> make the "advert" problem go away. I don't know why.
> I'm running FreeBSD 4.3 and bind 8.2.3. The system uses ipfw and natd to
> provide a gateway for all my internal systems (192.168) to connect to the
> internet. It seems like such a logical place to discriminate against
> unwanted URL's...
> Thanks
--
Peter Håkanson
IPSec Sverige (At the Riverside of Gothenburg, home of Volvo)
Sorry about my e-mail address, but i'm trying to keep spam out.
Remove "icke-reklam" and it works.
More information about the bind-users
mailing list