Forum Moderators: bakedjake

Message Too Old, No Replies

Primary DNS Examples

Setting up DNS with IP Alias

         

quebrada

5:32 am on Jun 30, 2004 (gmt 0)

10+ Year Member



Hello,

I am setting up a new server running FreeBSD 4.10 with Bind9. I will be the primary DNS, the colo will act as secondary. This web server will host multiple IP based sites.

The host server, name server, and one web site will all be on one IP. The other web sites will be on individual IP's.

I have configured the servers zone data file as such

;definitions of zone company.com
$TTL 1d
company.com IN SOA bob.company.com. webmaster.company.com.
us (
2004062701 ; version number
1d ; refresh
2h ; retry
100d ; expire
1h ) ; negative expiry

; set for all to come here
IN A 125.123.123.120

; name server
IN NS ns

; mx records

IN MX 10 mail.company.com

ns IN A 125.123.123.120

; hosts
localhost IN A 127.0.0.1
bob IN A 125.123.123.120

; cannonicals
www IN CNAME bob
ftp IN CNAME bob
mail IN CNAME bob

So how would I configure the next zone file for another domain on this computer with its' own IP?

Thanks

MattyMoose

4:02 pm on Jul 2, 2004 (gmt 0)

10+ Year Member




So how would I configure the next zone file for another domain on this computer with its' own IP?

I'm not quite sure what you mean. I'm guessing that you mean "how can I add different zones in different files, but with their own IP addresses".

Here's what we do:

in named.conf:
add the following lines:


zone "fakedomain.com" IN {
type master;
file "s/fakedomain.com";
};

Then we create a new file called "fakedomain.com" (under the bind root in the "s" directory -- usually /etc/namedb/s).

Then add the normal zone information in that file:

;definitions of zone fakedomain.com
$TTL 1d
fakedomain.com IN SOA bob.fakedomain.com. webmaster.fakedomain.com.
us (
2004062701 ; version number
1d ; refresh
2h ; retry
100d ; expire
1h ) ; negative expiry

; set for all to come here
IN A 125.123.123.120

; name server
IN NS ns

; mx records

IN MX 10 mail.fakedomain.com

ns IN A 125.123.123.120

; hosts
localhost IN A 127.0.0.1
bob IN A 125.123.123.120

; cannonicals
www IN CNAME bob
ftp IN CNAME bob
mail IN CNAME bob

I hope that's what you were looking for!