Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 03 Jan 2015 22:00:07 +0000
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: bind domain and subdomain on same machines
Message-ID:  <54A86667.7010206@FreeBSD.org>
In-Reply-To: <DUB126-W341A65D6B4466832188D89B05A0@phx.gbl>
References:  <DUB126-W341A65D6B4466832188D89B05A0@phx.gbl>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--3ANnFPtge8J6P3KP2dArDDUwgF9vrI6vs
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 03/01/2015 21:40, helen ly wrote:
> can I configure Secondary DNS Server on same primary machine
> I have virtual interfaces
> i want to make as a domain(primary) and a subdomain(secondary)
> can this be archievd only with one zone file for two(domain,subdomain) =
and one named.conf.local

Sure, you can do this, but not with just one zone file.  You will need
two zone definitions in your named.conf.  Something like:

    zone "example.com" {
        type master;
        file "/usr/local/etc/namedb/master/example.com";
        allow-query {
            any;
        };
        allow-transfer {
            secondaries;
        };
    };

    zone "foo.example.com" {
	type "slave";
	masters {
	    192.0.2.1;
	};
	allow-query {
	    any;
        };
    };

But you will definitely need separate zone files for the parent and
child domains.  That's the only way you can have one as primary and the
other as a secondary.  However, when BIND is acting as the secondary it
just transfers the zone data from the primary, and you don't have to do
anything to that file other than provide space for it in your filesystem.=


Consult the Bind9 ARM for the details of what you can put into zone
definitions.  Also remember you need to delegate the sub-zone to
whatever nameservers you're using by adding suitable NS records in your
zone data.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey



--3ANnFPtge8J6P3KP2dArDDUwgF9vrI6vs
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.20 (Darwin)

iQJ8BAEBCgBmBQJUqGZ1XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC
QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkAT8S4P/2yfEktvUP63nutVPw356jQf
ZY/qUjcJp2wH180Or6RsEPpVh/06R7z4rJX34aPQUxWNrv11ikmC31VsEpD2/MGJ
88HG1E07SQUZCZp6kujLgqAJjeuMh3EfBR7uWJAil0KalyrcmJHJv8Pi70Muyeiz
HhX8/2oterqPchTHFr3yB0TD/IRQKjECsX9dS29N0/vAiGgGYa8trro1xQS9XoDn
vWmS11Lq8mk0VUyxqT4mWOkzVJLgo9808dPf0TppvDHmSBU7hMkqMR2JZ2tC9fI/
S9xEPrtfGvuUXfYNZFC1ms713ViAHWDrgFMte2mVwmHl4AYGUbcJscyZ/eYnrGlq
lAY8x3yXvIKeJOBN7L28PBs+PrsqW/q1Lpaq9ZQN83v8R20D3BJoT6XeRlgoAe2b
8KYipoedQUh04le3c0Aq3KKHvAPcT4rV90lpXIZagw76l12E8eVqycKxTB7CfN3E
LjkROKZb+RR+XCmzDrFgiBCA4IdKTcZdsobnFxqZhgaQDhTbmNbPX59WxMKdltwd
ZeJQCi/7HgcqcNDcN+7r47eknFICGejn8bY1RpMYbmo/PDrsyGUyHlwyhWYuLwBy
cL1+2kVRjZ7suWA8EwSQzYYkN20JHnTEwZKfsje+zD9f3ZNB20FhbWXTHs90udmy
dIApfBTLvZQyJTSJjqz8
=8wIu
-----END PGP SIGNATURE-----

--3ANnFPtge8J6P3KP2dArDDUwgF9vrI6vs--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54A86667.7010206>