treewalk dns bind info

14 Jul

something along these lines may help. (reposted info)

Well, you’ll need to manually edit some files to accomplish
your scope, if you feel accustomed in doing so, just fire up
your favourite text editor and let’s go

As a starting note I’ll the files you’ll need to edit/create
are located into the %SYSTEMROOT%\System32\dns\etc
folder (e.g. winnt\system32\dns\etc)
so whenever I’ll write create/edit a file, I assume it will
be in that folder, now..

Create a new file and name it “liquinas.db”, add the
following text to it (keep in mind that the below config
is *not* complete and it’s only a guideline)

liquinas.net. 3600 IN SOA ns1.liquinas.net. admin.liquinas.net. (
2003011300 ; serial (yyyymmddXX)
3600 ; refresh (1 hour)
600 ; retry (10 minutes)
86400 ; expire (1 day)
3600 ; minimum (1 hour)
)

; base infos
liquinas.net. 3600 IN NS ns1.liquinas.net.
liquinas.net 3600 IN MX 10 mx1.liquinas.net.

; A records
liquinas/net. 3600 IN A 1.2.3.4
ns1.liquinas.net. 3600 IN A 1.2.3.4
mx1.liquinas.net. 3600 IN A 1.2.3.4

; Aliases
www.liquinas.net. 3600 IN CNAME liquinas.net.
ftp.liquinas.net. 3600 IN CNAME liquinas.net.

replace the “1.2.3.4” address above with the real
host address(es) you have, then save the file
(in “etc” as seen above), now open the file
“local.conf” and add the following text to its
bottom (after the last blank line)

zone “liquinas.net” {
type master;
file “liquinas.db”;
};

as I previously wrote the above is only a minimal sample,
you may need to add more options to better suit your
needs, in any case the above should work; now save the
file and open “named.conf” this is the master configuration
file, here we’ll need to change the config so that BIND-PE
will answer to queries made from the internet for all the
domains it handles directly, to do so locate the line which
reads

listen-on port 53 { ….some IPs here… };

and change it so that it will be

listen-on port 53 { any; };

this tells BIND-PE to listen on port 53 on all the IPs
available on your machine, this will allow it to receive
queries from the internet, now we’ll need to allow it to
*answer* to such queries, so locate the line which reads

allow-query { “private”; };

and add a “//” (comment sign) in front of it
so that it will look like

// allow-query { “private”; };

this will remove the “private-only” query “lock”
and allow internet hosts to query the local BIND-PE
and get an answer (although since another
option -namely the allow-recursion- is still in place,
it will only answer to queries directed to local zones
but won’t recurse for internet clients) at this point
save this file too.

Now stop/start the BIND service and check if it’s
running as needed, if all’s ok just try to run nslookup
and query the local DNS for some infos about your
domain (e.g. the www address or the like), if it answers
with correct data you’ll be up and running.

As a note, the zone file (the first we’ve seen)
would need some more records to be ok, namely
two MX and NS records instead of a single one and
some RP/MB/TXT records, but this would take us too far,
to complete your zone setup I suggest you to look at
the many examples you can find on the ‘net, in any
case the above config should work and be ok as a
starting point (hopefully I didn’t make mistakes but
in any case the people on the NG will correct me I think 🙂
– or add any other info which I forgot to include)

NB..download this zip (is a bind9 pdf inside)
http://ntcanuck.com/DL/Bv9ARM.zip

NT Canuck