Blocking sites in a zone file

Evan Platt evan at theobvious.espphotography.com
Thu Feb 28 06:52:35 UTC 2008


So I use my OS/X 10.4 server as my DNS server for my LAN.

I figured instead of using a hosts file on my desktop machines, why
not have the hosts file essentially on the Mac as the Mac does the
DNS?

I looked at

127.0.0.1 somespamsite.com to

zone "somespamsite.com" { type master; notify no; file
"null.zone.file"; };

I looked at http://pgl.yoyo.org/adservers/hosts2bind.php . You can
paste a hosts file and it will convert it from say

127.0.0.1 somespamsite.com to

zone "somespamsite.com" { type master; notify no; file
"null.zone.file"; };

so where do I place those entries?

In my /private/var/named, I have

-rw-r--r--  1 root wheel  200 Jan 22 15:59 192.168.1.3.rev
-rw-r--r--  1 root wheel  230 Feb 27 15:43 db.127.0.0.1
-rw-r--r--  1 root wheel  229 Feb 27 15:42 db.127.0.0.1.bak
-rw-r--r--  1 root wheel  433 Mar 24  2007 db.127.0.0.1.dist
-rw-r--r--  1 root wheel 2517 Mar 10  2007 db.cache
-rw-r--r--  1 root wheel  632 Feb 27 15:53 espphotography.com
-rw-r--r--  1 root wheel  337 Mar 10  2007 espphotography.com..bak
-rw-r--r--  1 root wheel  629 Feb 27 15:53 espphotography.com.bak
-rw-r--r--  1 root wheel  121 Mar 10  2007 localhost.zone
-rw-r--r--  1 root wheel 2517 Mar 10  2007 named.ca
-rw-r--r--  1 root wheel  180 Mar 10  2007 named.local

Do I simply add the zone "somespamsite.com" line into one of the
above? The link on yoyo.org says into named.conf .

I added
www.acezip.net	IN	A	127.0.0.1 
into named.conf, and when I restart named, I get in my system.log

Feb 27 22:51:50 espphotography named[12846]: starting BIND 9.4.0
Feb 27 22:51:50 espphotography named[12846]: /etc/named.conf:72:
unknown option 'www.acezip.net'
Feb 27 22:51:50 espphotography named[12846]: /etc/named.conf:74:
unexpected token near end of file
Feb 27 22:51:50 espphotography named[12846]: loading configuration:
unexpected token
Feb 27 22:51:50 espphotography named[12846]: exiting (due to fatal
error)


Any help appreciated...

Thanks. :)

Evan
-- 
To reply via e-mail, remove The Obvious from my e-mail address.


More information about the bind-users mailing list