[Pdns-users] CNAMEs to foreign Hosts
Damian
pdns at c64.ch
Mon Dec 1 11:03:31 UTC 2003
>>www1.test.com CNAME www.test.com ## works fine
>>www2.test.com CNAME some.other.server ## does not work at all
>
> That is fine, and does work. How do you ask the question to PowerDNS?
>
> Ie, do you have your powerdns in /etc/resolv.conf? Which version of PowerDNS
> do you run? On which operating system?
PowerDNS is listening on 192.168.0.198 , my resolv.conf looks like this:
nameserver 192.168.0.198
I'm running PowerDNS 2.9.12 on Debian Woody.
>>As a recursor, I use some other DNS (Bind9):
>>recursor=192.168.0.10
>
> Does some.other.server exist? Can 192.168.0.10 find it?
>
Yes, I can ping/dig some.other.server
>
>>Is there a solution to this (except using A instead CNAME )
>
> Try asking the question using dig, and report the exact output here.
>
I've set up another example:
(gubla.com and hosting.local are only test-domains)
mysql> select name, type, left(content,20), ttl, prio from records
where domain_id = 20;
+-----------------+-------+----------------------+-------+------+
| name | type | left(content,20) | ttl | prio |
+-----------------+-------+----------------------+-------+------+
| gubla.com | SOA | ns1.hosting.local po | 86400 | NULL |
| gubla.com | NS | ns1.hosting.local | 86400 | NULL |
| gubla.com | NS | ns2.hosting.local | 86400 | NULL |
| gubla.com | MX | mail.hosting.local | 86400 | 25 |
| www.gubla.com | CNAME | ns1.hosting.local | 86400 | NULL |
| test.gubla.com | CNAME | ns2.dmcnet.ch | 86400 | NULL |
| samba.gubla.com | CNAME | ns1.hosting.local | 86400 | NULL |
+-----------------+-------+----------------------+-------+------+
hosting.local is handeled by PowerDNS (192.168.0.198), dmcnet.ch is
handled by BIND on another Maschine.
linux002:/# dig www.gubla.com
; <<>> DiG 9.2.1 <<>> www.gubla.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14578
;; flags: qr aa rd; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.gubla.com. IN A
;; ANSWER SECTION:
www.gubla.com. 86400 IN CNAME ns1.hosting.local.
ns1.hosting.local. 86400 IN A 192.168.0.198
;; Query time: 4 msec
;; SERVER: 192.168.0.198#53(192.168.0.198)
;; WHEN: Fri Nov 28 18:45:38 2003
;; MSG SIZE rcvd: 78
---- www.gubla.com is working fine :)
linux002:/# dig test.gubla.com
; <<>> DiG 9.2.1 <<>> test.gubla.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 29328
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;test.gubla.com. IN A
;; AUTHORITY SECTION:
com. 10077 IN SOA a.gtld-servers.net.
nstld.verisign-grs.com. 2003113001 1800 900 604800 86400
;; Query time: 12 msec
;; SERVER: 192.168.0.198#53(192.168.0.198)
;; WHEN: Fri Nov 28 18:46:10 2003
;; MSG SIZE rcvd: 105
---- test.gubla.com is not....
from the same machine:
linux002:/# ping ns2.dmcnet.ch
PING ns2.dmcnet.ch (81.6.6.30): 56 data bytes
64 bytes from 81.6.6.30: icmp_seq=0 ttl=254 time=4.8 ms
When digging test.gubla.com, mysql.log says the following:
select content,ttl,prio,type,domain_id,name from records where
name='test.gubla.com'
select content,ttl,prio,type,domain_id,name from records where
name='ns2.dmcnet.ch'
select content,ttl,prio,type,domain_id,name from records where
name='*.dmcnet.ch'
select content,ttl,prio,type,domain_id,name from records where name='*.ch'
As soon as I change the record for test.gubla.com from a CNAME to an A
Record (using an IP), it's working fine. But since ns2.dmcnet.ch may
change its IP, I'd prefer to use CNAMES. Setting up the same scenario on
Bind and also the Micro$oft DNS, everything works.
Best Regards
Damian
More information about the Pdns-users
mailing list