酷!學園

技術討論區 => Linux 討論版 => 主題作者是: rh551206 於 2019-11-14 22:04

主題: 架設DNS有問題
作者: rh5512062019-11-14 22:04
架設完DNS後
Ping不到且nslookup會顯示
www.test.edu: No response from server
No response from server

vi /etc/named.conf

zone "test.edu" IN{
 type master;
 file "test.edu.txt";
 allow-query{ any; };
 };

vi /var/named/test.edu.txt

$TTL 1D
@   3600   IN   SOA   test.edu.   rname.invalid.   (
      2029420530   ; serial
      7200      ; refresh
      3600      ; retry
      86400      ; expire
      3600)      ; minimum
test.edu.   IN   NS   test.edu.
test.edu.   IN   A   192.168.14.254
www.test.edu.   IN   A   192.168.14.254

請問我這樣設定有錯誤嗎?
主題: Re: 架設DNS有問題
作者: netman2019-11-15 09:25
journalctl -el 先看看 named 的 log 有沒有載入這個 domain 且 serial 號碼是否一致?
再來確認  udp 53 port 是否有再所有界面上提供服務?
最後確認 client 的  resolv.conf 是否將 dns server 設定在第一順位。
主題: Re: 架設DNS有問題
作者: rh5512062019-11-15 09:56
journalctl -el跑出
named[1680]: network unreachable resolving './NS/IN': 199.9.14.201#53
named[1680]: network unreachable resolving './DNSKEY/IN': 192.33.4.12#53
named[1680]: network unreachable resolving './NS/IN': 192.33.4.12#53
named[1680]: network unreachable resolving './DNSKEY/IN': 192.5.5.241#53
named[1680]: network unreachable resolving './NS/IN': 192.5.5.241#53
named[1680]: network unreachable resolving './DNSKEY/IN': 192.112.36.4#53
named[1680]: network unreachable resolving './NS/IN': 192.112.36.4#53
named[1680]: network unreachable resolving './DNSKEY/IN': 199.7.91.13#53
named[1680]: network unreachable resolving './NS/IN': 199.7.91.13#53
named[1680]: network unreachable resolving './DNSKEY/IN': 198.97.190.53#53
named[1680]: network unreachable resolving './NS/IN': 198.97.190.53#53
named[1680]: network unreachable resolving './DNSKEY/IN': 192.58.128.30#53
named[1680]: network unreachable resolving './NS/IN': 192.58.128.30#53
named[1680]: network unreachable resolving './DNSKEY/IN': 193.0.14.129#53
named[1680]: network unreachable resolving './NS/IN': 193.0.14.129#53
named[1680]: network unreachable resolving './DNSKEY/IN': 192.203.230.10#53
named[1680]: network unreachable resolving './NS/IN': 192.203.230.10#53
named[1680]: network unreachable resolving './DNSKEY/IN': 202.12.27.33#53
named[1680]: network unreachable resolving './NS/IN': 202.12.27.33#53
named[1680]: network unreachable resolving './DNSKEY/IN': 198.41.0.4#53
named[1680]: network unreachable resolving './NS/IN': 198.41.0.4#53
named[1680]: managed-keys-zone: Unable to fetch DNSKEY set '.': failure
named[1680]: resolver priming query complete


然後防火牆我是直接關掉的
client端是windows
DNS有設server的IP了
主題: Re: 架設DNS有問題
作者: twnices2020-01-20 09:57
resolv.conf

這個修改你的dns ip 為第一順位