Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Anyone good at BIND?

Anyone good at BIND?
Thread Tools
plaidpjs
Senior User
Join Date: Mar 2001
Location: Wethersfield, CT, USA
Status: Offline
Reply With Quote
Jun 12, 2001, 10:08 PM
 
So, I'm attempting to set up internal DNS for my network using BIND (I previouslky had MacDNS running on a 9.1 install). But, I'm at a point of confusion for multiple zones and redirects.

The situation is this, I have a primary domain record setup for abc.com, now i want to add records for abc.net and abc.org, both of which should point to abc.com (as redirects or aliases) but I have no idea how those records should be set-up.

Anybody know enough to lend a hand?

Ciao!
G4/533 DP, 768 MB RAM, 40GB HDD, 32MB GeForce2 MX, 30GB VST Firewire Drive, and an Apple Cinema Display.
     
iYeat
Junior Member
Join Date: Jan 2000
Location: Northern California
Status: Offline
Reply With Quote
Jun 13, 2001, 12:35 AM
 
Originally posted by plaidpjs:
<STRONG>So, I'm attempting to set up internal DNS for my network using BIND (I previouslky had MacDNS running on a 9.1 install). But, I'm at a point of confusion for multiple zones and redirects.

The situation is this, I have a primary domain record setup for abc.com, now i want to add records for abc.net and abc.org, both of which should point to abc.com (as redirects or aliases) but I have no idea how those records should be set-up.

Anybody know enough to lend a hand?

Ciao!</STRONG>
I don't believe you can set it to automatically do this.. Were you able to do this in MacDNS? If so, How? As far as I know, you have to set up a master record for each domain zone. So you'd have to have separate zones (ie abc.com, nbc.com, cbs.com) for each domain.. abc.com and abc.net cannot be in the same zone, so you have to create a zone for each of them.

hope that helps.

-Caio
"My software never has bugs. It merely develops random, undocumented features."
-Anonymous
     
johann
Forum Regular
Join Date: Nov 2000
Location: Seattle, Wa, USA
Status: Offline
Reply With Quote
Jun 13, 2001, 01:41 AM
 
here are some config files...
there is alot of info below so beware!
i have it setup to use /var/named as the zone file directory... you might use the /etc/namedb structure. but everything should just copy and paste over fine.

okay... put this in your named.conf file in /etc


//***********options********
//****i use /var/named for directory and this is where you set that****
options {
directory "/var/named";
};

//******zones*******
//********localhost zones first*****
zone "." {
type hint;
file "named.root";
};

zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.IN-ADDR.ARPA" {
type master;
file "localhost.rev";
};

//****put this in if you want reverse zone for internal network***
//****change the IPs for your number scheme if different than mine***

zone "1.168.192.in-addr.arpa" {
type master;
file "/var/named/192.168.1.rev";
};

//****your internal network zones*****

zone "yourdomain.com" {
type master;
file "yourdomain.com.hosts";
};

zone "yourdomain.net" {
type master;
file "yourdomain.net.hosts";

};

zone "yourdomain.org" {
type master;
file "yourdomain.org.hosts";
};

//*****end of file*****


okay now put these in your /var/named/ directory each named yourdomain.com etc....


; Zone file for yourdomain.com
; Change IPs and names to your own
; The full zone file
$TTL 7D
;
@ IN SOA nameserver.yourdomain.com. hostmaster. (
2001061200 ; serial, date and serial #
1200 ; refresh, in seconds
600 ; retry, seconds
7D ; expire, seconds
3600 ) ; minimum, seconds
;
@ NS nameserver.yourdomain.com. ; your nameserver
@ MX 10 mail.yourdomain.com.
;
@ A 192.168.1.xxx
mail A 192.168.1.xxx
www A 192.168.1.xxx
ftp A 192.168.1.xxx
;
; End of File

next one... .net domain... make this file called yourdomain.net.hosts. just make everything the same as .com zone file but just name it yourdomain.net instead. also internally if you want to get mail for you .net domain separatly name you MX record .net. instead of .com.... but just leave it all the same if your for now so it'll work how you want.

; Zone file for yourdomain.net
; Change IPs and names to your own
; The full zone file
$TTL 7D
;
@ IN SOA nameserver.yourdomain.com. hostmaster. (
2001061200 ; serial, date and serial #
1200 ; refresh, in seconds
600 ; retry, seconds
7D ; expire, seconds
3600 ) ; minimum, seconds
;
@ NS nameserver.yourdomain.com. ; your nameserver
@ MX 10 mail.yourdomain.com.
;
@ A 192.168.1.xxx
mail A 192.168.1.xxx
www A 192.168.1.xxx
ftp A 192.168.1.xxx
;
; End of File


now .org.... again this file is called yourdomain.org.hosts. just the same as other two files.

; Zone file for yourdomain.com
; Change IPs and names to your own
; The full zone file
$TTL 7D
;
@ IN SOA nameserver.yourdomain.com. hostmaster. (
2001061200 ; serial, date and serial #
1200 ; refresh, in seconds
600 ; retry, seconds
7D ; expire, seconds
3600 ) ; minimum, seconds
;
@ NS nameserver.yourdomain.com. ; your nameserver
@ MX 10 mail.yourdomain.com.
;
@ A 192.168.1.xxx
mail A 192.168.1.xxx
www A 192.168.1.xxx
ftp A 192.168.1.xxx
;
; End of File


ok that should be it! hopefully i didn't leave any typos.. (probably did knowing me)

so to add hosts just add more A records.
for example:

my-pimp-g4 A 192.168.1.xxx
my-little-imac A 192.168.1.xxx


also at if you don't have these files in your /var/named directory add them:

name this one localhost.zone

;
;
;
$TTL 86400
$ORIGIN localhost.
@ 1D IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum

1D IN NS @
1D IN A 127.0.0.1

; End Of File


name this one localhost.rev

;
;
;
$TTL 86400
@ IN SOA localhost. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS localhost.

1 IN PTR localhost.

;End of File

to get the named.root file type this in the console:

[console]%dig &gt; /var/named/named.root

(this get the root servers names and addresses and puts them in a file)

here is the file for a reverse zone set up as referenced in the named.conf file up top:

;
;
;where xxx is the last octet of your IP address
;and hostx represents your computer names
$ORIGIN 168.192.in-addr.arpa.
1 38400 IN SOA nameserver.yourdomain.com. hostmaster. (
2001061200
10800
3600
432000
38400 ) ;Cl=5
38400 IN NS nameserver.yourdomain.com. ;Cl=5
xxx 38400 IN PTR host1.yourdomain.com. ;Cl=5
xxx 38400 IN PTR host2.yourdomain.com. ;Cl=5


;
;end of file
;

Lots of writing i know....!!!
but... good luck and hope this helps!

john...

[ 06-13-2001: Message edited by: johann ]
     
plaidpjs  (op)
Senior User
Join Date: Mar 2001
Location: Wethersfield, CT, USA
Status: Offline
Reply With Quote
Jun 13, 2001, 10:56 AM
 
iYeat - You do have to make seperate zones in macDNS, but setting them up as redirects is fairly simple. I just didn't know how to do the redirect portion for BIND.

John - Thanks for all of the information. Most of that i already knew and had set up, but if i understand correctly, you have supplied a vital piece I needed.

So, essentially, what this all boils down to is to make abc.net point to abc.com, i simply copy the abc.com file and rename it abc.net, everything inside stays the same, correct? I'll try it that way nonetheless and see what results I get.

I do have a question, however. What is the prupose of the localhost files? Is that something you needed in 4.3 or is that the equivalent to the 127.0.0 and 0.0.127.in-addr.arpa files I already have?

Ciao!
G4/533 DP, 768 MB RAM, 40GB HDD, 32MB GeForce2 MX, 30GB VST Firewire Drive, and an Apple Cinema Display.
     
johann
Forum Regular
Join Date: Nov 2000
Location: Seattle, Wa, USA
Status: Offline
Reply With Quote
Jun 13, 2001, 01:30 PM
 
great. just have the same files with different names will do it for you then.

and the 127* stuff just keeps the local resolver happy when it talks to itself.

good luck!
     
BMWDrum
Forum Regular
Join Date: Oct 2000
Location: Portland, Or
Status: Offline
Reply With Quote
Jun 14, 2001, 11:59 AM
 
So does anybody know to get OS X and BIND to work? I am having a hell of a time just trying to get it started! (I am a linux guy and this BSD stuff is throwing me off. I guess I am just to used to linuxconf)

I am basically trying to setup my G4 with OS X instead of Linux. I have all of the config files for BIND setup on the Linux OS, so I just need help getting BIND to start at boot.


Thanks for everyones help!

drum
Some days you're the dog, and some days you're the hydrant.
     
johann
Forum Regular
Join Date: Nov 2000
Location: Seattle, Wa, USA
Status: Offline
Reply With Quote
Jun 16, 2001, 10:42 AM
 
this is what i did to get bind to start up on my iMac.

in the folder /Library/StartupItems/ i created another folder called named
in the folder /Library/StartupItems/named i created two files called:
StartupParameters.plist &
named

here are their contents:

StartupParameters.plist:

Description = "the name daemon";
Provides = ("named");
Requires = ("Network", "Network Configuration");
OrderPreference = "None";
Messages =
{
start = "Starting BIND 8.2.3-REL";
stop = "Stopping BIND 8.2.3-REL";
};
}

named:

#!/bin/sh

##
# Start named daemon
##

. /etc/rc.common


ConsoleMessage "Starting BIND 8.2.3-REL"

/usr/sbin/named

fi


that's it!

good luck
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 09:53 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,