• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Setting up BIND: Can't understand FAQ

E

eric.carlson

Guest
This FAQ seems to be exactly what I need
http://faq.swsoft.com/article_20_410_en.html

I have done step 1. ok. On a new plesk 7.5 installation, I got 4 IP's so chose 2 to be dedicated as the nameservers. I added 1 client, and to that client added 1 domain. Before this I pointed the clients ns in the registrars panel to the 2 new nameservers I'm trying to set up.

Step 2 says create "A" and "PTR" recs in "a" local domains zone - I went to the target domain, chose DNS and all I can do is create <sub>domain.com records - is this the correct place to complete this step please?

Thanks very much in advance
 
Yes, that is the correct place. You would need to create the 'sub' called ns1.yourdomain.com and ns2.yourdomain.com

So for the first sub name, you fill in 'ns1' and give the IP address, then do it again and give 'ns2' and the other IP address.

This will create A records (which are used to point names to IPs). But you only need to do these A records for your main hosting domain, not for all of your hosting client domains.
 
Thanks very much for your help - almost there now, but one more problem.

Ok, so the machine has 4 IP's and I set up 2 exclusively as the ns recs externally and told the registrar to use them as the ns for the domain. The IP of the domain is a 3rd one of my set. So when I added the entry www.<example>.com NS ns0.<example-ns1>.com and also www.<example>.com CNAME <example>.com it resolved ! Great, must have got it right...until I tried adding a subdomain the same way, I added NS and CNAME test.<example>.com recs the same way yesterday but it won't find them. Do I have to wait 24 hours or something like my old hoster used to? Thanks.
 
try it again and restart bind.... let me know if this works/helps
 
Wierd! I did that and now even the www. is not resolving. Ok, heres the rec its created, gosh I feel so out of my depth here, anyway I swapped example & the IP but theis is it, spot anything please?

$TTL 86400

@ IN SOA ns0.otamate.com. enquiries.example.com. (
1132566185 ; Serial
10800 ; Refresh
3600 ; Retry
604800 ; Expire
86400 ) ; Minimum

www.example.com. IN NS ns0.otamate.com.
wibble.example.com. IN NS ns0.otamate.com.
example.com. IN NS ns0.otamate.com.
ns.example.com. IN A 1.2.3.4
example.com. IN A 1.2.3.4
webmail.example.com. IN A 1.2.3.4
mail.example.com. IN A 1.2.3.4
ftp.example.com. IN CNAME example.com.
www.example.com. IN CNAME example.com.
wibble.example.com. IN CNAME example.com.
example.com. IN MX 10 mail.example.com.
 
I just noticed that you are running plesk 7.5.0; I don't think this is an issue, but you never know.
 
www.example.com. IN NS ns0.otamate.com.
wibble.example.com. IN NS ns0.otamate.com.
example.com. IN NS ns0.otamate.com.
For NS records, these should not include the www., wibble.

These should still be CNAME records pointing to example.com, something more like the following:
Code:
example. com.		NS		ns0. otamate. com.
example. com.		A		xx. yy. zz. aaa
mail. example. com.	A		xx. yy. zz. aaa
webmail. example. com.	A		xx. yy. zz. aaa
ftp. example. com.		CNAME		example. com.
*. example. com.		CNAME		example. com.
[url]www.[/url] example. com.		CNAME		example. com.
example. com.		MX 10		mail. example. com.
xx. yy. zz. aaa/32		PTR		example. com.
I am assuming this is not your main hosting domain, but a client's hosted domain on your server. Please correct me if it IS your hosting domain, which would have a slightly different setup.
 
Spot on! Thanks most sincerely.

So, the bottom line once all this is set up is to add new subdomains *all* you need to do is create one CNAME entry in the domains dns record right?
 
Actually once the DNS for a domain is setup properly, all you need to do is create the subdomain in the Plesk interface (subdomain create) to get the Apache files sorted, and the wildcard DNS which is posted above will already take care of DNS for all subdomains, hence it is the wildcard entry...
Code:
*. example. com.		CNAME		example. com.

Unless you plan on doing other things, like pointing a subdomain to an external server or something like that....
 
Cheers all, a lot clearer now.
One final thing - it was mentioned there is a difference if the domain is the actual one where the ns points to, rather than a separate client as above - what would that need please?

When I do add a subdomain, is it unreasonable to expect it to resolve immediately (even after the named restart?)
 
For the main hosting domain, I would put A records for the nameservers themselves:

Code:
ns0. yourhostingdomain. com.		A		xx. yy. zz. aaa
ns1. yourhostingdomain. com.		A		xx. yy. zz. bbb
ns2. yourhostingdomain. com.		A		xx. yy. zz. ccc
(one per nameserver you run, assuming separate IPs for each)

This record would not be needed for the client domains, those would just have NS records

clientdomain1.com		NS		ns0.yourhostingdomain.com
clientdomain1.com		NS		ns1.yourhostingdomain.com
clientdomain1.com		NS		ns2.yourhostingdomain.com
(one per nameserver you run)
Your posts only indicate a single nameserver (ns0), so you would ignore the additional lines for ns1 and ns2. I only show them for example's sake since I think most people run more than a single nameserver.

Note: I made an error in my earlier post and have corrected it now. It should not have included the following A record since it looks like you want all hosted client domains to use your ns0.otamate.com nameserver:

ns0. example. com. A xx. yy. zz. aaa (removed from earlier post)
 
Back
Top