Bind 9 zone fle question

phn at icke-reklam.ipsec.nu phn at icke-reklam.ipsec.nu
Mon Apr 26 20:35:30 UTC 2004


Tom Diehl <tdiehl at rogueind.com> wrote:
> Hi all,
> I am trying to configure bind 9 to use the same zone file for
> 2 different zones. Normally If I have a zone called example.com and
> example.net and they both point to the same ip address, I can point
> the config file at the same zone file and all is ok. (ie: example.com.d=
b)
> The problem comes in if I would like to be able to have someone be able=
 to=20
> enter example.com instead of www.example.com to get to the web server. =
If I use
> 2 seperate zone files it is simply a matter of making an A record that
> contains "example.com." in 1 zone file and "example.net." in the other =
zone
> file. So my question is, is there a way to specify example.com. and exa=
mple.net
> in the same zone file or do I have to use 2 seperate zone files to do t=
his?

> Regards,

> Tom

Yes.

make the zonefile contain only "current ORIGIN" :

$TTL 86400
@ IN SOA  <whatever you use here >

	IN NS	<nameservers of zone >
	IN NS	<repeat..>
	IN A	<your.dotted.ip.address>
www	IN CNAME @

 or=20

www	IN A	<your.dotted.ip.address>


--=20
Peter H=E5kanson        =20
        IPSec  Sverige      ( At Gothenburg Riverside )
           Sorry about my e-mail address, but i'm trying to keep spam out=
,
	   remove "icke-reklam" if you feel for mailing me. Thanx.


More information about the bind-users mailing list