[Samba] Samba4 DNS - Adding CNAME
charles.tryon at gmail.com
Mon May 21 13:38:26 MDT 2012
I have been working on this too, and found that I needed to add the FQDN as
the target of the CNAME. This is what appears to be happening... When I
just put in the name, for example:
samba-tool dns add dnsserver mydomain.org newname CNAME realname
...and I use the Windows DNS tool to look at the record in the
mydomain.orgzone, it maps "newname" to "realname." <--- NOTICE the
"dot" at the end.
In DNS parlance, that dot usually means, "don't add anything after this."
So, when DNS is trying to resolve the actual IP, it tries to look up
"realname" with no domain, and eventually times out. If you change this to:
samba-tool dns add dnsserver mydomain.org newname CNAME
... then doing a "dig" or "ping" or whatever seems to work correctly.
I may be doing this wrong, but at least this is how I got it to work.
On Sat, May 19, 2012 at 6:57 AM, Mike Howard <mike at dewberryfields.co.uk>wrote:
> On 19/05/2012 11:12, Michael Wood wrote:
>> So, the question is; What am I doing wrong?
>>> I haven't tried the above myself, but it seems you are adding it the
>>>> wrong way around. i.e. it looks like you are saying that the
>>>> canonical name of "centos" is "debian" instead of what you want (i.e.
>>>> that the canonical name of "debian" is "centos".)
>>>> i.e. it looks like you now have this situation:
>>>> centos IN A 192.168.1.11
>>>> centos IN CNAME debian
>>>> Yes, I did wonder about that and did try it the other way around. That
>>> resulted in a new record as follows;
>>> Name=debian, Records=1, Children=0
>>> CNAME: centos. (flags=f0, serial=21, ttl=900)
>>> But it still doesn't resolve.
>> OK, then try specifying the FQDN for "centos" when you add the CNAME
>> record. From the output above it looks like it's adding a CNAME to
>> "centos." instead of "centos.example.com".
>> Also try:
>> dig @192.168.1.254 debian.example.com. IN CNAME
>> If everything is set up correctly you should get something like this:
>> ;; QUESTION SECTION:
>> ;debian.example.com. IN CNAME
>> ;; ANSWER SECTION:
>> debian.example.com. 3600 IN CNAME centos.example.com.
>> Ok, I used;
> samba-tool dns add 127.0.0.1 example.com debian CNAME centos.example.com
> a query now returns;
> Name=centos, Records=1, Children=0
> A: 192.168.1.11 (flags=f0, serial=2, ttl=900)
> Name=debian, Records=1, Children=0
> CNAME: centos.example.com. (flags=f0, serial=23, ttl=900)
> and 'dig @192.168.1.254 debian.example.com. IN CNAME' returns;
> ;; QUESTION SECTION:
> ;debian.example.com. IN CNAME
> ;; ANSWER SECTION:
> debian.example.com. 900 IN CNAME centos.example.com.
> However, neither 'debian' nor 'debian.example.com' resolve to an IP, yet
> the output from dig implies the entry is correct? Of course, 'centos' does
> Any question is easy if you know the answer!
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/**mailman/options/samba<https://lists.samba.org/mailman/options/samba>
“Risks are not to be evaluated in terms of the probability of success,
but in terms of the value of the goal.”
- Ralph D. Winter
More information about the samba