Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Local (Privete) domain?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Local (Privete) domain?
Authored by: macmedics_josh on Dec 21, '01 07:08:29AM

I have always wanted to do this sort of thing, and infact back in my days of linux and NatD, I ran a Chach only server... what I would like to do, is run such a DNS server, for my entire private network, (Behind a Hardware router) and have it also serve a .local domain for my local 192.168.1.x domain... this would decrease my relience on charters overburdened DNS Servers, AND let my local macs use names not just numbers to find servers, etc.

Is thare a way to do this?

Josh



[ Reply to This | # ]
Local (Privete) domain?
Authored by: dlandrith on Dec 21, '01 09:11:17AM

Any machine on your private network should be able to use the IP address of your machine as a DNS server. There shouldn't be any need to change the configuration or set up any 192.x.x.x specific information for your private network.

You may want to change the controls part of the named.conf file so that you can run rndc on it from a different machine from the one that you are running bind on.



[ Reply to This | # ]
Local (Privete) domain?
Authored by: macmedics_josh on Dec 21, '01 10:29:41AM

I know that it's not nessary for normal internet use.. I have been doing this for YEARS... but thare are some things that really would work a LOT better with a Local DNS information system. Appleshare (or other) servers that do a reverse lookup to find thare own address and name... being able t o tell users, "log on to myserver.local" is a lot easer than telling users..."Logon to teh server at 192.168.1.100... 192....dot... 168... dot... 1... dot... "



[ Reply to This | # ]
Local (Privete) domain?
Authored by: dlandrith on Dec 29, '01 11:50:40AM
What you want to do is setup pointer records for your virtual IP blocks. I haven't tested this, and I'm writing this off the top of my head.

You will want to add a reference to your zone in /usr/local/etc/named.conf. Insert the following lines into your /usr/local/etc/named.conf file.

// Provide a reverse mapping for the 192.168.1.*
zone "1.168.192.in-addr.arpa" {
type master;
file "virtual.rev";
notify no;
};

Next, you will want to create your virtual.rev file in the /usr/local/etc/namedb directory. Create this with your favorite text editor, and make it look like this:

$TTL 86400
; $ORIGIN 1.168.192.in-addr.arpa.
@ IN SOA localhost.localdomain.com. user.mac.com. (
12 ; Serial number
172800 ; Refresh every 2 days
3600 ; Retry every hour
1728000 ; Expire every 20 days
172800 ; Minimum 2 days
)
;
IN NS localhost.localdomain.
;
x IN PTR namex
y IN PTR namey
...
z IN PTR namez

Here, x, y, and z are the last octet in the ip address for each machine; e.g., if the address is 192.168.1.12, then x would be 12. namex is whatever name you want to give to return for reverse lookup of the ip address.

This should do it.

You probably don't need to setup normal lookup tables (i.e., ones that contain A records) since you will probably not need to get these resolved. If you do, post a reply, and I'll add the instructions.

At some point, you should spring for O'Reilly's DNS and Bind, since its a damned useful reference even if you don't wish to become a DNS expert.

[ Reply to This | # ]
Local (Privete) domain?
Authored by: darrendavid on Jan 13, '02 02:33:41PM
this is exactly what i'm trying to do. i basically ported over my named.conf and namedb files from my linux box, but no luck... yet. dig shows correct responses for my local domain, "27":
%dig dev.27 +pfmin

;; res options: init recurs defnam dnsrch
;; got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59568
;; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 1
;; QUERY SECTION:
;;      dev.27, type = A, class = IN

;; ANSWER SECTION:
dev.27.                 3D IN CNAME     ns.27.
ns.27.                  3D IN A         192.168.1.1

even reverse lookups work fine with dig. no errors in the system.log on starting named. HOWEVER, if i try to 'ping dev.27' i get:
ping: unknown host dev.27
what have i missed?

[ Reply to This | # ]