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: 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 | # ]