Link to home
Avatar of GCI_SUPPORT
GCI_SUPPORT

asked on

bind dns server

i have installed bind and have configure it out for my first domain
but my problem is i have 4 other domain but there are identical to the first  one

there is a way to configure it faster
Avatar of arnold
arnold
Flag of United States of America image

Do you mean you have four subdomains?
mydomain.com
subdomain1.mydomain.com
subdomain2.mydomain.com
etc?

Within the mydomain.com you would do the following if the subdomains are hosted elsewhere, you would delegate the subdomains:
subdomain1 IN NS nameserver_responsible_for_this refer back to itself
subdomain2 IN NS nameserver_responsible_for_thisone
etc.

Within the bind configuration, you would
zone "mydomain.com"
zone "subdomain1.mydomain.com"
etc.
If you are talking about making the domain appear/ respond differently depending on the source of the request, look at using viewes.
The view will determine which response will be sent to the client

http://www.zytrax.com/books/dns/ch7/view.html 
Avatar of GCI_SUPPORT
GCI_SUPPORT

ASKER

i got domain

domain1.com
domain2.com
domain3.com

i will explain myself better

let say that i create a new (A) record for my domain1

newalias.domain1.com

but it need to work with domain2 and domain3

there is a way to do it without addind the a record to each domain
can it be a foward or a stub zone ?
what is the difference between this 2
ASKER CERTIFIED SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GCI,

you can point many domain to the same zone file. In this manner when you change
one zone file, all the zone of all the domain are reloaded and change at the same time.

zone "domain1.com" {
        type master;
        file "/etc/bind/zone/domainX.com";
};

zone "domain2.com" {
        type master;
        file "/etc/bind/zone/domainX.com";
};

zone "domain3.com" {
        type master;
        file "/etc/bind/zone/domainX.com";
};

N.B.: remember to increment the serial in the SOA when you change the file and before doing a reload of bind
One caveate to the above, you must not use domain1.com. on the left side nor use fully qualified Domain names of the domain on the right unless it has to be that for all.
i.e.
A record such as

a.domain1.com. IN A 10.10.10.10

Will generate errors on domain2.com, domain2.com and domain3.com and will prevent its loading into bind.  These zones will continue to function until the expire time is met.

record IN MX 0 mail.domain1.com.
This will work, but will stop, should something happen to the domain1.com's registration.

IMHO, this is a bad practice. An error where this file is deleted, and you are .....
arnold,

it's obvious that you cannot use the fully qualified name for the "name" that you want "expanded"

for the MX record you can put the following
                      IN      MX          5 mail

note the missing point at the end of mail, and this expand as mail.domain1.com or mail.domain2.com or mail.domain3.com for every domain context

IMHO i don't get your point ... also if you delete /boot/vmlinuz and you are ... ;-)
the only solution that i see for the problem of GCI is what i've posted
and i use this technique from many year and for many internet provider without a single problem ...


Have seen occations not related to bind, where people used the same configuration for multiple implementations ran a mock later on when the behavior needed to change, so the change to the common configuration affected all others and were not noticed until later on.

IMHO, a separate domain, should have a separate configuration file.