Re: bindの設定に関して
( No.1 )
|
 |
- 日時: 2008/03/01 21:45
- 名前: Kelp
-
ここに書いてあるよ。
http://kajuhome.com/bind.shtml
|
Re: bindの設定に関して
( No.2 )
|
 |
- 日時: 2008/03/01 22:45
- 名前: master
-
kelpさん有難うございます。
確かに書いてあります。 私もその通り構成しました。 ですから、bindの設定、dhcpの設定までは順調でした。
しかし、連携の設定を85行移行に追加してから、起動しなくなりました。
namedを起動しても85行目を指摘してきます。
// 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.0.0/24; }; //allow-transfer{ // xxx.xxx.xxx.xxx; // }; forwarders{ 202.248.37.74; 202.248.20.133; }; };
// // a caching only nameserver config // controls { inet 127.0.0.1 allow { localhost; } keys { rndckey; }; };
include "/etc/rndc.key";
view "internal" { match-clients { localhost; localnets; }; recursion yes; zone "." IN { type hint; file "named.ca"; };
include "/etc/named.rfc1912.zones"; // 正引きゾーン(elines.jp)の指定 zone "elines.jp" { type master; file "elines.jp.lan"; allow-update { none; }; }; // 逆引きゾーン(192.168.0.0/24)の指定 zone "0.168.192.in-addr.arpa" { type master; file "0.168.192.in-addr.arpa.db"; allow-update { none; }; }; };
view "external" { match-clients { any; }; recursion no;
zone "." IN { type hint; file "named.ca"; };
include "/etc/named.rfc1912.zones"; // 正引きゾーン(elines.jp)の指定 zone "elines.jp" { type master; file "elines.jp.wan"; allow-update { none; }; }; // 逆引きゾーン(222.158.○○.△△)の指定 zone "○○.158.222.in-addr.arpa" { type master; file "○○.158.222.in-addr.arpa.db"; allow-update { none; }; }; };
85行目 ↓ これ移行を連携のために追加
// 正引きゾーン(elines.jp)の指定 zone "elines.jp" { type master; file "elines.jp.db"; allow-update { 192.168.0.5; }; };
// 逆引きゾーン(192.168.0.0/24)の指定 zone "0.168.192.in-addr.arpa" { type master; file "0.168.192.in-addr.arpa.db"; allow-update { 192.168.0.5; }; };
|
Re: bindの設定に関して
( No.3 )
|
 |
- 日時: 2008/03/01 22:59
- 名前: Kelp
-
よくわからないけど、
>when using 'view' statements, all zones must be in views
とあるように view の中にすべて入ってますか?
|
Re: bindの設定に関して
( No.4 )
|
 |
- 日時: 2008/03/01 23:05
- 名前: master
-
有難うございます。
http://kajuhome.com/cooperation_dhcp_bind.shtml#n05 によると 最終行に下記を追加すると記述しております。
最終行にゾーン指定(以下)を追加 // 正引きゾーン(kajuhome.com)の指定 zone "kajuhome.com" { type master; file "kajuhome.com.db"; Dynamic DNS機能を付加(更新するサーバのIPアドレスを指定) allow-update { 192.168.1.5; }; }; // 逆引きゾーン(192.168.1.0/24)の指定 zone "1.168.192.in-addr.arpa" { type master; file "1.168.192.in-addr.arpa.db"; Dynamic DNS機能を付加(更新するサーバのIPアドレスを指定) allow-update { 192.168.1.5; };
85行目移行がここと同じということになるはずなのですが・・。
知識がないがためにこの様な降らない質問になってしまってもうしわけありませんが、
どのようにviewの中に納めればよいのでしょうか? おしえてください。
|
Re: bindの設定に関して
( No.5 )
|
 |
- 日時: 2008/03/01 23:42
- 名前: Kelp
-
私もやったことないのでよく分からないのですけど、
Bindのバージョンが9.5以上の場合には すべての zone は view の中に置かなければ ならなくなったわけですよね、たぶん。
http://kajuhome.com/cooperation_dhcp_bind.shtml#n05 に最終行に追加するようにと 書いてありますが、以前のバージョンでは最終行に追加されていたzoneの定義が 今では view の中にあるわけですから、viewの中にある zone の定義を変更してやれば いいのでは?(実際にやったことが無いのであまり自信がありませんが)
具体的には、view の中にある zone の中の allow-update { none; }; を allow-update { 192.168.1.5; }; のようにしろということでは?(もちろん192.168.1.5はこの場合サーバーのIP)
(違ってたら、どなたか訂正してくださいね)
|
Re: bindの設定に関して
( No.6 )
|
 |
- 日時: 2008/03/02 08:08
- 名前: 管理者
-
> 有難うございます。
> http://kajuhome.com/cooperation_dhcp_bind.shtml#n05 > によると > 最終行に下記を追加すると記述しております。
わかり難くて申し訳ありません。 『DNSサーバの構築(BIND) 』と『DHCPサーバとDNSサーバの連携(DHCP/DNS) 』で大きな設定違いは、 「view」定義をしてある方は『DNSサーバの構築(BIND) 』で、『DHCPサーバとDNSサーバの連携(DHCP/DNS) 』は 「view」定義してありません。
よって、『DHCPサーバとDNSサーバの連携(DHCP/DNS) 』は最終行に設定しても問題ないわけです。 もし、新たに「view」定義を追加したならば当然、各ゾーンは「view」の中に設定する必要があります。
まだ不明な場合は、ご自身の設定ファイルを開示して頂ければ幸いです。
|
Re: bindの設定に関して
( No.7 )
|
 |
- 日時: 2008/03/02 09:13
- 名前: master
-
kelpさん有難うございます。
残念ながらご指摘いただいたとおりやってみましたが変化はありませんでした。 むろん私の理解不足かもしれません。
管理人さん有難うございます。
設定ファイルというのは下記のものでよろしいのでしょうか?
elines.jp.lan
$TTL 86400 @ IN SOA elines.jp. root.elines.jp.( 2007031400 ; serial 3600 ; refresh (1 hour) 900 ; retry (15 minutes) 604800 ; expire (1 week) 86400 ; negative (1 day) ) IN NS elines.jp. IN MX 10 elines.jp. IN A 192.168.0.5 kingyodaneo IN A 192.168.0.10 kingyodanote1 IN A 192.168.0.20 kingyoda IN CNAME elines.jp. firststep-gym IN CNAME elines.jp. medical IN CNAME elines.jp. education IN CNAME elines.jp.
0.168.192.in-addr.arpa.db
$TTL 86400 @ IN SOA elines.jp. root.elines.jp.( 2007031400 ; serial 3600 ; refresh (1 hour) 900 ; retry (15 minutes) 604800 ; expire (1 week) 86400 ; negative (1 day) ) IN NS elines.jp. 5 IN PTR elines.jp. 10 IN PTR kingyodaneo.elines.jp. 20 IN PTR kingyodanote1.elines.jp.
elines.jp.wan
$TTL 86400 @ IN SOA elines.jp. root.elines.jp.( 2007031400 ; serial 3600 ; refresh (1 hour) 900 ; retry (15 minutes) 604800 ; expire (1 week) 86400 ; negative (1 day) ) IN NS elines.jp. IN MX 10 elines.jp. IN A 222.158.○○..△△ kingyoda IN CNAME elines.jp. firststep-gym IN CNAME elines.jp. medical IN CNAME elines.jp. education IN CNAME elines.jp.
220.158.222.in-addr.arpa.db
$TTL 86400 @ IN SOA elines.jp. root.elines.jp.( 2007031400 ; serial 3600 ; refresh (1 hour) 900 ; retry (15 minutes) 604800 ; expire (1 week) 86400 ; negative (1 day) ) IN NS elines.jp. △△ IN PTR elines.jp.
elines.jp.db
$TTL 86400 @ IN SOA elines.jp. root.elines.jp. ( 2005062001 ; serial 3600 ; refresh (1 hour) 900 ; retry (15 minutes) 604800 ; expire (1 week) 86400 ; negative (1 day) ) NS elines.jp. MX 10 elines.jp. A 192.168.0.5 kingyoda CNAME elines.jp. firststep-gym CNAME elines.jp. medical CNAME elines.jp. education CNAME elines.jp.
よろしくお願いします。
|
Re: bindの設定に関して
( No.8 )
|
 |
- 日時: 2008/03/02 09:19
- 名前: 管理者
-
> 設定ファイルというのは下記のものでよろしいのでしょうか?
後、「named.conf」もお願いします。
|
Re: bindの設定に関して
( No.9 )
|
 |
- 日時: 2008/03/02 09:30
- 名前: master
-
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.0.0/24; }; //allow-transfer{ // xxx.xxx.xxx.xxx; // }; forwarders{ 202.248.37.74; 202.248.20.133; }; };
// // a caching only nameserver config // controls { inet 127.0.0.1 allow { localhost; } keys { rndckey; }; };
include "/etc/rndc.key";
view "internal" { match-clients { localhost; localnets; }; recursion yes; zone "." IN { type hint; file "named.ca"; };
include "/etc/named.rfc1912.zones"; // 正引きゾーン(elines.jp)の指定 zone "elines.jp" { type master; file "elines.jp.lan"; allow-update { none; }; }; // 逆引きゾーン(192.168.0.0/24)の指定 zone "0.168.192.in-addr.arpa" { type master; file "0.168.192.in-addr.arpa.db"; allow-update { none; }; }; };
view "external" { match-clients { any; }; recursion no;
zone "." IN { type hint; file "named.ca"; };
include "/etc/named.rfc1912.zones"; // 正引きゾーン(elines.jp)の指定 zone "elines.jp" { type master; file "elines.jp.wan"; allow-update { none; }; }; // 逆引きゾーン(222.158.○○.△△)の指定 zone "○○.158.222.in-addr.arpa" { type master; file "○○.158.222.in-addr.arpa.db"; allow-update { none; }; }; };
// 正引きゾーン(elines.jp)の指定 zone "elines.jp" { type master; file "elines.jp.db"; allow-update { 192.168.0.5; }; };
// 逆引きゾーン(192.168.0.0/24)の指定 zone "0.168.192.in-addr.arpa" { type master; file "0.168.192.in-addr.arpa.db"; allow-update { 192.168.0.5; }; };
|
Re: bindの設定に関して
( No.10 )
|
 |
- 日時: 2008/03/02 09:41
- 名前: 管理者
-
> // 正引きゾーン(elines.jp)の指定
> zone "elines.jp" { > type master; > file "elines.jp.db"; > allow-update { 192.168.0.5; }; > }; > > // 逆引きゾーン(192.168.0.0/24)の指定 > zone "0.168.192.in-addr.arpa" { > type master; > file "0.168.192.in-addr.arpa.db"; > allow-update { 192.168.0.5; }; > };
最後の上記部分は不要です。まず、ここが「view」スコープ外に定義されています。 (同様の定義が「view "internal"」にあります。)
view "internal" { match-clients { localhost; localnets; }; recursion yes; zone "." IN { type hint; file "named.ca"; };
include "/etc/named.rfc1912.zones"; // 正引きゾーン(elines.jp)の指定 zone "elines.jp" { type master; file "elines.jp.lan"; allow-update { none; }; }; // 逆引きゾーン(192.168.0.0/24)の指定 zone "0.168.192.in-addr.arpa" { type master; file "0.168.192.in-addr.arpa.db"; allow-update { none; }; }; };
それから、DHCPと連携させる為に「view "internal"」内の「allow-update { none; };」はサーバに許す必要があります。 よって、以下が「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.0.0/24; }; //allow-transfer{ // xxx.xxx.xxx.xxx; // }; forwarders{ 202.248.37.74; 202.248.20.133; }; };
// // a caching only nameserver config // controls { inet 127.0.0.1 allow { localhost; } keys { rndckey; }; };
include "/etc/rndc.key";
view "internal" { match-clients { localhost; localnets; }; recursion yes;
zone "." IN { type hint; file "named.ca"; };
include "/etc/named.rfc1912.zones"; // 正引きゾーン(elines.jp)の指定 zone "elines.jp" { type master; file "elines.jp.lan"; allow-update { 192.168.0.5; }; }; // 逆引きゾーン(192.168.0.0/24)の指定 zone "0.168.192.in-addr.arpa" { type master; file "0.168.192.in-addr.arpa.db"; allow-update { 192.168.0.5; }; }; };
view "external" { match-clients { any; }; recursion no;
zone "." IN { type hint; file "named.ca"; };
include "/etc/named.rfc1912.zones"; // 正引きゾーン(elines.jp)の指定 zone "elines.jp" { type master; file "elines.jp.wan"; allow-update { none; }; }; // 逆引きゾーン(222.158.○○.△△)の指定 zone "○○.158.222.in-addr.arpa" { type master; file "○○.158.222.in-addr.arpa.db"; allow-update { none; }; }; };
※:上記をコピー&ペースト時はご注意ください。 空白の全角スペースが入ってしまいます。(全角スペースを半角スペースに置き換えてください。)
|
bindの設定について
( No.11 )
|
 |
- 日時: 2008/03/02 10:12
- 名前: master
-
管理人さま
おかげさまで、正常に稼働しました。
物事の本質をとらえるということの大切さを改めて痛感いたしました。
もっと勉強しなければ。
Web・メールとサーバー構築がんばります。
|