I am trying to set up multiple sites under my DynDNS domain. I have a dynamic-ip and the only domain name I have is a free one from dydns, e.g. username.dyndns.org.
I only have one server, but I want to be able to host multiple sites from this one server.
This is what I have set up for bind,
zone "username.dyndns.org" {
allow-query { any; };
type master;
file "/etc/bind/db.username.dyndns.org";
};
/etc/bind/db.username.dyndns.org
$TTL 1d;
$ORIGIN username.dyndns.org. ;
@ IN SOA ns.username.dyndns.org. joe.username.dyndns.org. (
2011051300 ; serial number
3h ; refresh
10m ; retry
1w ; expiry
3h ; minimum
)
@ IN NS ns.username.dyndns.org.
www IN CNAME username.dyndns.org.
mysite IN CNAME www
When I do $ nslookup mysite.username.dyndns.org username.dyndns.org
, I get:
Server: username.dyndns.org
Address: 12.23.56.78#53
mysite.username.dyndns.org canonical name = www.username.dyndns.org.
Name: www.username.dyndns.org
Address: 12.23.56.78
But if I do, nslookup mysite.username.dyndns.org
, I get NXDOMAIN.
Here is the result of dig @username.dyndns.org mysite.username.dyndns.org
:
; <<>> DiG 9.7.3 <<>> @username.dyndns.org mysite.username.dyndns.org
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30676
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 2
;; QUESTION SECTION:
;mysite.username.dyndns.org. IN A
;; ANSWER SECTION:
mysite.username.dyndns.org. 86400 IN CNAME www.username.dyndns.org.
www.username.dyndns.org. 86400 IN A 12.23.56.78
;; AUTHORITY SECTION:
username.dyndns.org. 86400 IN NS localhost.
;; ADDITIONAL SECTION:
localhost. 604800 IN A 127.0.0.1
localhost. 604800 IN AAAA ::1
;; Query time: 1 msec
;; SERVER: 12.23.56.78#53(12.23.56.78)
;; WHEN: Sat May 14 11:23:49 2011
;; MSG SIZE rcvd: 153
But I get no answer if I do dig mysite.username.dyndns.org
even though I get an answer for dig username.dyndns.org
I'm not sure what else to try. Any ideas?
NOTE: Names and addresses have been changed to protect the innocent.