1071 内部DNSサーバが構築出来ません。

<<トップページへ <<質問BBSへ

内部DNSサーバが構築出来ません。
日時: 2005/05/15 23:10
名前: Taq
初めまして、どなたかご教授下さい。

こちらの手順を参考にサーバ構築しておりましたが、内部DNSサーバの設定がうまくいきません。
サーバIPアドレス 192.168.1.2
BBルーターIPアドレス 192.168.1.1


以下が/var/named/chroot/etc/named.confの内容

file "named.broadcast";
allow-update { none; };
};

zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};

include "/etc/rndc.key";

zone "inspiron-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; };
};


以下が正引きゾーンデータベースの内容

$TTL 86400
@ IN SOA inspiron-web.com. root.inspiron-web.com.(
2004031901 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS inspiron-web.com.
IN MX 10 inspiron-web.com.
@ IN A 192.168.1.2


以下が逆引きゾーンデータベースの内容

$TTL 86400
@ IN SOA inspiron-web.com. root.inspiron-web.com.(
2004031901 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS inspiron-web.com.
IN MX 10 inspiron-web.com.
2 IN PTR inspiron-web.com.


この状態でWindowsクライアントマシンよりnslookupすると正引き・逆引き共にサーバ名を返しますが
yahoo.co.jpやwebmaster様のドメインでnslookupするとServer failedで外部ドメインを確認することが出来ません。

DHCPサーバも構築しましたが、そちらは問題がありません。

何がいけないのかわかりません。
ご教授頂けないでしょうか?
宜しくお願いします。

ちなみに、Windowsクライアントマシンでは
DHCP自動取得、優先DNSサーバを192.168.1.2・代替DNSサーバを192.168.1.1としております。
優先DNSサーバを192.168.1.2のみにするとwebブラウジングが不可能な状態です。
また、サーバ側で
[root@host ~]# /etc/rc.d/init.d/named restartすると
named を停止中:
named: 既に実行中です
と結果を返してしまい、どうにもnamedが正常動作していないように見受けられます。

Re: 内部DNSサーバが構築出来ません。(1)
日時: 2005/05/16 01:17
名前: val99
こんばんわ。
まずは内部DNSサーバの設定をこちらのサイトの通りに
してからの方が良いかと・・・。

いえ、(2)
日時: 2005/05/16 06:50
名前: Taq
webmaster様の内容を自分の環境に置き換えてコピペでも行いましたので、間違いないかと・・・。
ちなみに、/var/named/chroot/etc/named.confの内容が途中で切れていましたので、貼り付け直しておきます。


//
// named.conf for Red Hat caching-nameserver
//

options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
/*
* 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 "localdomain" IN {
type master;
file "localdomain.zone";
allow-update { none; };
};

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; };
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.ip6.local";
allow-update { none; };
};

zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};

zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};

include "/etc/rndc.key";

zone "inspiron-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; };
};

Re: 内部DNSサーバが構築出来ません。(3)
日時: 2005/05/16 12:15
名前: val99
[root@host ~]# /etc/rc.d/init.d/named restart 
する時に

[root@linux ~]# vi /var/log/messages
にエラーは出ていませんか?

いえ、(4)
日時: 2005/05/16 22:16
名前: Taq
返信ありがとうございます。

>[root@host ~]# /etc/rc.d/init.d/named restart 
>する時に
>
>[root@linux ~]# vi /var/log/messages
>にエラーは出ていませんか?

val99様にご指摘を頂いた通り、既に質問BBSの過去ログを検索しログを確認しておりましたが、例えば直前にTeraTermを使用してSSHDセッションが開いたようなログは見受けられますが、その後に実施したnamedのrestartに関するログがまったく見受けられません。

尚、併せてipconfig /allとnslookupの結果もアップするので参考にしていただけますでしょうか?
セカンダリDNSサーバにDefaultGateway(BBルーター:192.168.1.1)を指定しているのは、プライマリのDNSサーバ(Linuxサーバ)のみの場合だとWAN側に接続できないためです。

クライアントマシンIPアドレス:192.168.1.5


C:\Documents and Settings\local_admin>ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : client-1
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter ローカル エリア接続:

Connection-specific DNS Suffix . : inspiron-web.com
Description . . . . . . . . . . . : NVIDIA nForce MCP Networking Adapter
Physical Address. . . . . . . . . : 00-10-DC-DD-86-25
Dhcp Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IP Address. . . . . . . . . . . . : 192.168.1.5
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.2
DNS Servers . . . . . . . . . . . : 192.168.1.2
192.168.1.1
Lease Obtained. . . . . . . . . . : 2005年5月16日 19:25:18
Lease Expires . . . . . . . . . . : 2005年5月17日 1:25:18


C:\Documents and Settings\local_admin>nslookup
Default Server: inspiron-web.com
Address: 192.168.1.2

> 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

Name: inspiron-web.com
Address: 192.168.1.2

> yahoo.co.jp
Server: inspiron-web.com
Address: 192.168.1.2

*** inspiron-web.com can't find yahoo.co.jp: Server failed
> 210.80.242.236
Server: inspiron-web.com
Address: 192.168.1.2

*** inspiron-web.com can't find 210.80.242.236: Server failed

Re: 内部DNSサーバが構築出来ません。(5)
日時: 2005/05/17 00:24
名前: val99
ログがないということは
namedが正常に動作していないようですね。

[root@linux ~]# /etc/rc.d/init.d/named status
の結果とdigコマンドでDNSサーバー確認をすると
どうなりますか?

度々ありがとうございます。(6)
日時: 2005/05/17 00:29
名前: Taq
/etc/rc.d/init.d/named status
      ↓
rndc: connect failed: connection refused


digコマンドを使用したことがなかったのですが、これでよかったのでしょうか?

; <<>> DiG 9.2.5 <<>> 192.168.1.2
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59171
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;192.168.1.2. IN A

;; ANSWER SECTION:
192.168.1.2. 80 IN A 192.168.1.2

;; Query time: 1 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Tue May 17 00:27:54 2005
;; MSG SIZE rcvd: 45


宜しくお願い致します。

Re: 内部DNSサーバが構築出来ません。(7)
日時: 2005/05/17 01:15
名前: val99
現在namedはロックして正常に動いていないようですね。
rndcの制御エラーが出る場合は
[root@linux ~]# vi /var/named/chroot/etc/named.conf の
記述が違っています。

digですが
[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
のように使えます。

named.confですが以前の質問であった
http://fedorasrv.com/bbshtml/webpatio/1057.shtml
くらい簡略化しても問題なく使えます。

named.confを修正してみましたが・・・(8)
日時: 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


もう、何がなんだか・・・。

すみません。(9)
日時: 2005/05/17 03:20
名前: Taq
killでnamedのプロセスを停止させた後にnamedをstartしたところ、/var/log/messagesに以下のログが残りました。

May 17 03:05:15 host named[4669]: starting BIND 9.2.5 -u named -t /var/named/chroot
May 17 03:05:15 host named[4669]: using 1 CPU
May 17 03:05:15 host named[4669]: loading configuration from '/etc/named.conf'
May 17 03:05:15 host named[4669]: listening on IPv4 interface lo, 127.0.0.1#53
May 17 03:05:15 host named[4669]: listening on IPv4 interface eth0, 192.168.1.2#53
May 17 03:05:15 host named[4669]: command channel listening on 127.0.0.1#953
May 17 03:05:15 host named[4669]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
May 17 03:05:15 host named[4669]: zone 1.168.192.in-addr.arpa/IN: loaded serial 2004031901
May 17 03:05:15 host named[4669]: zone ispiron-web.com/IN: loaded serial 2004031901
May 17 03:05:15 host named[4669]: zone localhost/IN: loaded serial 42
May 17 03:05:15 host named: named 起動 succeeded
May 17 03:05:15 host named[4669]: running

但し、ログが残ったとしても、
[root@host ~]# /etc/rc.d/init.d/named status
rndc: connect failed: connection refused
で、状態は変わりません・・・。

Re: 内部DNSサーバが構築出来ません。(10)
日時: 2005/05/17 12:01
名前: 
参照: http://uniunix.net/
ハズレでしたらごめんなさいですが、named.confの
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
の部分の、allow { localhost; }を、allow { 127.0.0.1; }に変えても改善しないですかね??

やはり、(11)
日時: 2005/05/17 22:24
名前: Taq
変わりません。
う゛〜ん゛・・・。

Re: 内部DNSサーバが構築出来ません。(12)
日時: 2005/05/17 22:34
名前: val99
一度
[root@linux ~]# vi /var/named/chroot/etc/named.conf の

forwarders{
192.168.1.1;
};

を削除して、リスタート
[root@host ~]# /etc/rc.d/init.d/named restart

するとどうかわるでしょうか?

また
/etc/resolv.conf
の設定はどうなっていますか?

ご迷惑をおかけしています。(13)
日時: 2005/05/17 23:39
名前: Taq
>一度
>[root@linux ~]# vi /var/named/chroot/etc/named.conf の
>
>forwarders{
>192.168.1.1;
>};
>
>を削除して、リスタート
>[root@host ~]# /etc/rc.d/init.d/named restart



// 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;
};

//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { 127.0.0.1; } 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; };
};

[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

これは
namedをreloadしてからrestartしても状態として変わりませんでした。


>また
>/etc/resolv.conf
>の設定はどうなっていますか?

search inspiron-web.com
nameserver 192.169.1.2
nameserver 61.122.116.174
nameserver 61.122.127.74

USENのDNSサーバを指定しています。
本来は必要ではないのかもしれませんが・・・。
尚、USENのDNSサーバをresolv.confやnamed.confに指定しようとしまいと、変わりません。


自分自身はどちらかというと、namedでstatusしたときに表示される、
rndc: connect failed: connection refused
が気になります。
これに関連して、rndc.confとrndc.keyがあるのかと思いますがどうなのでしょうか?

Re: 内部DNSサーバが構築出来ません。(14)
日時: 2005/05/18 00:50
名前: val99
参照: http://www.jp.redhat.com/manual/Doc9/rhl-rg-ja-9/s1-bind-rndc.html
>これに関連して、rndc.confとrndc.keyがあるのかと思いますがどうなのでしょうか?
rndcの説明は上にあります。
以前はセキュリティの為に鍵の設定が必須でしたが、
最近ではbindをchrootで運用している為、現実あまりrndc.keyを設定しなくなっています。

/etc/resolv.conf の設定は
nameserver 192.168.1.2 だけにした方が良いと思います。

named.confとzoneファイルの設定に間違いがなく、ご自分でrndcの設定の変更をされていなければ
rndc: connect failed: connection refused にはなりません。

あと原因として考えられる事はDHCPサーバーの設定です。
もしPCルーターを構築されていないようでしたら
ルーター機能によるDHCPで運用した方がはるかに簡単かもしれません。

結局、、、(15)
日時: 2005/05/20 01:18
名前: Taq
DNSサーバについては4〜5回ほどFC3のインストールを繰り返し試しましたがうまくいかないためあきらめました(T_T)

しかし、今度は新たな問題が発生したので、別スレッドで質問したいと思います。

ご迷惑をおかけしました。




▲このページのトップへ戻る

LPIロゴ Copyright© 2004-2009 fallenangels, All rights reserved.
ご自由にリンクしてください(連絡は不要です)
本ページへのご意見・ご要望、誤字・脱字・リンク切れ等のご連絡はこちらからお願いします