Код: Выделить всё
//> cat named.conf
options
{
directory "/var/named";
dump-file "data/cache_dump.db";
statistics-file "data/named_stats.txt";
memstatistics-file "data/named_mem_stats.txt";
listen-on port 53 { 127.0.0.1; 192.168.0.254; };
allow-query { localhost; };
allow-query-cache { localhost; };
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
};
logging
{
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view "localhost_resolver" {
match-clients { localhost; };
recursion yes;
# all views must contain the root hints zone:
zone "." IN {
type hint;
file "/var/named/named.ca";
};
include "/etc/named.rfc1912.zones";
};
view "access_zones" {
match-clients { any; };
match-destinations { any; };
allow-query { any; };
recursion no;
zone "yandex.ru" IN {
type forward;
forward first;
forwarders { 8.8.8.8; };
};
# include ""
};
С соседнего сервера (ip 192.168.0.253) запускаю
Код: Выделить всё
cancer@archmail 17:18:40 ~ $ dig @192.168.0.254 yandex.ru
; <<>> DiG 9.3.6-P1-RedHat-9.3.6-20.P1.el5 <<>> @192.168.0.254 yandex.ru
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 31829
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;yandex.ru. IN A
;; Query time: 0 msec
;; SERVER: 192.168.0.254#53(192.168.0.254)
;; WHEN: Fri Jun 8 17:18:40 2012
/var/named/data/named.run
Код: Выделить всё
client 192.168.0.253#52807: view access_zones: query (cache) 'yandex.ru/A/IN' denied