日時: 2005/05/17 02:56
名前: Taq
>named.confですが以前の質問であった >http://fedorasrv.com/bbshtml/webpatio/1057.shtml >くらい簡略化しても問題なく使えます。
namedを [root@host ~]# /etc/rc.d/init.d/named stop しても named を停止中: のままとなり[OK]表示がされないため、Johannさんが実施されたようにkillでnamedのプロセスを停止させた後、yum -y removeで"bind""caching-nameserver""install bind-chroot"を削除しました。 (実際にはbindのみですべてアンインストールされたようにも見えたけど気のせいですかね?)
で、再度上記3つをyum -y installでインストールしnamed.confを以下のように設定し直しました。
// generated by named-bootconf.pl
options { directory "/var/named"; /* * If there is a firewall between you and nameservers you want * to talk to, you might need to uncomment the query-source * directive below. Previous versions of BIND always asked * questions using port 53, but BIND 8.1 uses an unprivileged * port by default. */ // query-source address * port 53; allow-query{ 127.0.0.1; 192.168.1.0/24; }; allow-recursion{ 127.0.0.1; 192.168.1.0/24; }; allow-transfer{ 127.0.0.1; 192.168.1.0/24; }; forwarders{ 192.168.1.1;
};
};
// // a caching only nameserver config // controls { inet 127.0.0.1 allow { localhost; } keys { rndckey; }; };
logging { category lame-servers { null; }; };
zone "." IN { type hint; file "named.ca"; };
zone "localhost" IN { type master; file "localhost.zone"; allow-update { none; }; };
zone "0.0.127.in-addr.arpa" IN { type master; file "named.local"; allow-update { none; }; };
include "/etc/rndc.key";
zone "ispiron-web.com" IN { type master; file "inspiron-web.com.db"; allow-update { none; }; }; zone "1.168.192.in-addr.arpa" IN { type master; file "1.168.192.in-addr.arpa.db"; allow-update { none; }; };
で、val99様よりご指示頂いたように、以下を実施しました。 >[root@linux ~]# dig inspiron-web.com >[root@linux ~]# dig -x 192.168.1.2 >[root@linux ~]# dig www.linux.or.jp >[root@linux ~]# dig -x 210.171.226.47 ↓結果
[root@host ~]# dig inspiron-web.com
; <<>> DiG 9.2.5 <<>> inspiron-web.com ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 623 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION: ;inspiron-web.com. IN A
;; ANSWER SECTION: inspiron-web.com. 80 IN A 220.151.177.60
;; Query time: 1 msec ;; SERVER: 192.168.1.1#53(192.168.1.1) ;; WHEN: Tue May 17 02:47:26 2005 ;; MSG SIZE rcvd: 50
[root@host ~]# dig -x 192.168.1.2
; <<>> DiG 9.2.5 <<>> -x 192.168.1.2 ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 19162 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION: ;2.1.168.192.in-addr.arpa. IN PTR
;; AUTHORITY SECTION: 168.192.in-addr.arpa. 8693 IN SOA prisoner.iana.org. hostmaster.root-servers.org. 2002 040800 1800 900 604800 604800
;; Query time: 9 msec ;; SERVER: 192.168.1.1#53(192.168.1.1) ;; WHEN: Tue May 17 02:48:05 2005 ;; MSG SIZE rcvd: 119
[root@host ~]# dig www.linux.or.jp
; <<>> DiG 9.2.5 <<>> www.linux.or.jp ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55093 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION: ;www.linux.or.jp. IN A
;; ANSWER SECTION: www.linux.or.jp. 80 IN A 210.171.226.47
;; Query time: 1 msec ;; SERVER: 192.168.1.1#53(192.168.1.1) ;; WHEN: Tue May 17 02:48:46 2005 ;; MSG SIZE rcvd: 49
[root@host ~]# dig -x 210.171.226.47
; <<>> DiG 9.2.5 <<>> -x 210.171.226.47 ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18757 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0
;; QUESTION SECTION: ;47.226.171.210.in-addr.arpa. IN PTR
;; ANSWER SECTION: 47.226.171.210.in-addr.arpa. 2859 IN PTR mizuho.linux.or.jp.
;; AUTHORITY SECTION: 226.171.210.in-addr.arpa. 2859 IN NS ns2.jpix.ad.jp. 226.171.210.in-addr.arpa. 2859 IN NS ns1.jpix.ad.jp.
;; Query time: 9 msec ;; SERVER: 192.168.1.1#53(192.168.1.1) ;; WHEN: Tue May 17 02:49:13 2005 ;; MSG SIZE rcvd: 121
このまま以下を実施すると、
[root@host ~]# /etc/rc.d/init.d/named status rndc: connect failed: connection refused [root@host ~]# /etc/rc.d/init.d/named stop named を停止中: [root@host ~]# /etc/rc.d/init.d/named start named を起動中: [ OK ] [root@host ~]# /etc/rc.d/init.d/named status rndc: connect failed: connection refused [root@host ~]# /etc/rc.d/init.d/named restart named を停止中: named: 既に実行中です[root@host ~]# /etc/rc.d/init.d/named status rndc: connect failed: connection refused
となります。 また、Windowsクライアントマシンからnslookupも以下となり、以前と変わりません。
> 192.168.1.2 Server: inspiron-web.com Address: 192.168.1.2
Name: inspiron-web.com Address: 192.168.1.2
> inspiron-web.com Server: inspiron-web.com Address: 192.168.1.2
*** inspiron-web.com can't find inspiron-web.com: Server failed > www.linux.or.jp Server: inspiron-web.com Address: 192.168.1.2
*** inspiron-web.com can't find www.linux.or.jp: Server failed > 210.171.226.47 Server: inspiron-web.com Address: 192.168.1.2
*** inspiron-web.com can't find 210.171.226.47: Server failed
もう、何がなんだか・・・。
|