Posted by ckinikar, 05-28-2013, 08:22 AM | Hi,
I am working on Centos 5 32 bit with apache2 and Bind9.
I have to create CNAME record to point subdomain with external host.
Subdomain is abc.example.com
See below config of example.com zone file
====================================================
/var/named/example.com
example.com. IN NS ns1.example.com.
example.com. IN NS ns2.example.com.
example.com. IN A 10.10.10.10
ns1 IN A 10.10.10.10
ns2 IN A 10.10.10.10
www IN CNAME example.com.
ftp IN CNAME example.com.
abc IN A 10.10.10.10
abc.example.com IN CNAME external host
================================================
abc.example.com is resolving properly, but it is not pointing to external host, I have created this CNAME entry 24hrs back.
Please suggest anything is wrong in this config.
Thanks.
|
Posted by serve-you, 05-28-2013, 09:26 AM | You have an A record pointing to 10.10.10.10 before the CNAME.
|
Posted by netfreak, 05-28-2013, 09:27 AM | It sounds like you need to use an A record not a CNAME here. Remove the CNAME line and then the one you have above that change the IP to your external host.
|
Posted by ckinikar, 05-28-2013, 09:32 AM | 10.10.10.10 is IP of my server.
So what should I do, I want CNAME to point external server.
Should I remove abc IN A 10.10.10.10
|
Posted by serve-you, 05-28-2013, 09:33 AM | Yes, you should remove the A record for abc as it is conflicting with the CNAME.
|
Posted by nixtree, 05-28-2013, 09:57 AM | Hello,
Remove the CNAME entry for "abc" and modify the A entry for "abc" as follows;
abc IN A external host
|
Posted by foobic, 05-28-2013, 11:25 AM | That, and you're missing the period at the end of the new record:
What that does is create a CNAME for abc.example.com.example.com
If you're going to use the full domain name you must include the final period ("abc.example.com.") but it's easier just to use "abc"
|
Posted by ckinikar, 05-29-2013, 11:11 AM | Hi,
Thanks everyone, I have added period (.) at the end of abc.example.com. and external host, it worked.
Just 1 request, I have 16 usable IPv6 IPs.
How to add in zone file.
Should I add as:
ns1 IN AAAA IPV6 address 1
ns2 IN AAAA IPV6 address 2
Can I use remaining 14 IPv6 IPs?
Thanks.
|
|
Add to Favourites
Print this Article |