Mình có 1 file cấu hình như thế này
#cat /etc/named.conf
Code:
options {
listen-on port 53 { any; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { any; };
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
Test thử
#dig google.com
Code:
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.6 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26323
;; flags: qr rd ra; QUERY: 1, ANSWER: 16, AUTHORITY: 4, ADDITIONAL: 4
;; QUESTION SECTION:
;google.com. IN A
;; ANSWER SECTION:
google.com. 300 IN A 113.171.245.163
google.com. 300 IN A 113.171.245.168
google.com. 300 IN A 113.171.245.167
google.com. 300 IN A 113.171.245.152
google.com. 300 IN A 113.171.245.162
google.com. 300 IN A 113.171.245.153
google.com. 300 IN A 113.171.245.182
google.com. 300 IN A 113.171.245.148
google.com. 300 IN A 113.171.245.187
google.com. 300 IN A 113.171.245.178
google.com. 300 IN A 113.171.245.158
google.com. 300 IN A 113.171.245.157
google.com. 300 IN A 113.171.245.177
google.com. 300 IN A 113.171.245.173
google.com. 300 IN A 113.171.245.172
google.com. 300 IN A 113.171.245.183
;; AUTHORITY SECTION:
google.com. 172798 IN NS ns1.google.com.
google.com. 172798 IN NS ns4.google.com.
google.com. 172798 IN NS ns3.google.com.
google.com. 172798 IN NS ns2.google.com.
;; ADDITIONAL SECTION:
ns2.google.com. 172798 IN A 216.239.34.10
ns1.google.com. 172798 IN A 216.239.32.10
ns3.google.com. 172798 IN A 216.239.36.10
ns4.google.com. 172798 IN A 216.239.38.10
;; Query time: 1936 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Wed Sep 11 21:43:58 2013
;; MSG SIZE rcvd: 420
Mình thắc mắc là tại sao trong file named.conf không có phần thông tin cho root server hay thông tin forwarders mà nó vẫn lấy được thông tin truy vấn?