Domain-Name-System
如何為我的 DynDNS 地址設置名稱伺服器?
我正在嘗試在我的 DynDNS 域下設置多個站點。我有一個動態IP,我唯一的域名是來自dydns 的免費域名,例如username.dyndns.org。
我只有一台伺服器,但我希望能夠從這台伺服器託管多個站點。
這是我為綁定設置的,
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
當我這樣做時
$ nslookup mysite.username.dyndns.org username.dyndns.org
,我得到: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
但如果我這樣做,
nslookup mysite.username.dyndns.org
我會得到 NXDOMAIN。這是結果
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
但是如果我這樣做
dig mysite.username.dyndns.org
了,即使我得到了答案,我也沒有得到答案dig username.dyndns.org
我不確定還能嘗試什麼。有任何想法嗎?
注意:姓名和地址已更改以保護無辜者。
免費 dyndns 不支持此功能,您需要萬用字元支持 - 在 dyndns.com 中不再免費。
名稱伺服器需要一個固定的 IP 地址,但萬用字元支持就足夠了——您不需要名稱伺服器。