Re: bindの動作確認
( No.1 )
|
 |
- 日時: 2007/07/04 01:42
- 名前: milu
-
言葉たらずでしたので追記いたしました。
設定は下記の通りに致しました。
IPアドレス:192.168.24.115 ホスト名:www.test-server.com 別名:www.test-server.com
client1 client1.test-server.com(192.168.24.120) client2 client2.test-server.com(192.168.24.130)
グローバルIPアドレスというものは下記のURLの現IPと同様のものと考えるのは正しいでしょうか? http://www.ugtop.com/spill.shtml
該当部分の解説のページのイラストにある別名というものは、value domainで取得したもので正しいでしょうか? そう思って今回は設定しております。
また、上記の文字化け以外に、GUIですがファイヤーウォールの部分も文字化けしておりました・・。
また、解説のページにある、bind設定ファイルとcaching-nameserver設定ファイルについて の項目なんですが、 「/var/log/messages」を見る事で確認できます。とありますように、そのまま同じように打つと下記のようになってしまいます。
[root@www ~]# /var/log/messages bash: /var/log/messages: 許可がありません [root@www ~]#
やり方が間違っていると思いますが、どのようにしたらいいのか分かりません・・・。
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{
any; }; };
// // 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"; };
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 "test-server.com" { type master; file "test-server.com.lan"; allow-update { none; }; };
zone "24.168.192.in-addr.arpa" { type master; file "24.168.192.in-addr.arpa.db"; allow-update { none; }; }; };
view "external" {
match-clients { any; };
recursion no;
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; }; };
zone "test-server.com" { type master; file "test-server.com.wan"; allow-update { none; }; };
zone "56.138.58.in-addr.arpa" { type master; file "56.138.58.in-addr.arpa.db"; allow-update { none; }; }; };
|
Re: bindの動作確認
( No.2 )
|
 |
- 日時: 2007/07/04 01:43
- 名前: milu
-
named.caching-nameserver.conf
// // named.caching-nameserver.conf // // Provided by Red Hat bind-config package to configure the // ISC BIND named(8) DNS server as a caching only nameserver // (as a localhost DNS resolver only). // // See /usr/share/doc/bind*/sample/ for example named configuration files. // // DO NOT EDIT THIS FILE - use system-config-bind or an editor // to create named.conf - edits to this file will be lost on // bind-config package upgrade. // options { // listen-on port 53 { 127.0.0.1; }; // 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"; query-source port 53; // query-source-v6 port 53; allow-query { any; }; }; logging { channel default_debug { file "data/named.run"; severity dynamic; }; }; view localhost_resolver { match-clients { localhost; }; match-destinations { localhost; }; recursion yes; include "/etc/named.rfc1912.zones";
include "/etc/named.test-server.com.lan"; };
view internal { match-clients { localnets; }; match-destinations { localnets; }; recursion yes; include "/etc/named.rfc1912.zones"; include "/etc/named.test-server.com.lan"; };
view external { match-clients { any; }; match-destinations { any; }; recursion no; include "/etc/named.rfc1912.zones"; include "/etc/named.test-server.com.wan"; };
named.test-server.com.wan
zone "test-server.com" IN { type master; file "test-server.com.wan"; allow-update { none; }; }; zone "56.138.58.in-addr.arpa" IN { type master; file "56.138.58.in-addr.arpa.db"; allow-update { none; }; };
named.test-server.com.lan
zone "test-server.com" IN { type master; file "test-server.com.lan"; allow-update { none; }; }; zone "24.168.192.in-addr.arpa" IN { type master; file "24.168.192.in-addr.arpa.db"; allow-update { none; }; };
24.168.192.in-addr.arpa.db
$TTL 86400 @ IN SOA test-server.com. root.test-server.com.( 2007031400 ; serial 3600 ; refresh (1 hour) 900 ; retry (15 minutes) 604800 ; expire (1 week) 86400 ; negative (1 day) ) IN NS test-server.com. 115 IN PTR test-server.com. 120 IN PTR client1.test-server.com. 130 IN PTR client2.test-server.com.
56.138.58.in-addr.arpa.db
$TTL 86400 @ IN SOA test-server.com. root.test-server.com.( 2007031400 ; serial 3600 ; refresh (1 hour) 900 ; retry (15 minutes) 604800 ; expire (1 week) 86400 ; negative (1 day) ) IN NS test-server.com. 142 IN PTR test-server.com.
|
Re: bindの動作確認
( No.3 )
|
 |
- 日時: 2007/07/04 01:46
- 名前: milu
-
test-server.com.lan
$TTL 86400 @ IN SOA test-server.com. root.test-server.com.( 2007031400 ; serial 3600 ; refresh (1 hour) 900 ; retry (15 minutes) 604800 ; expire (1 week) 86400 ; negative (1 day) ) IN NS test-server.com. IN MX 10 test-server.com. IN A 192.168.24.115 client1 IN A 192.168.24.120 client2 IN A 192.168.1.130 www IN CNAME test-server.com. www IN CNAME test-server.com.
test-server.com.wan
$TTL 86400 @ IN SOA test-server.com. root.test-server.com.( 2007031400 ; serial 3600 ; refresh (1 hour) 900 ; retry (15 minutes) 604800 ; expire (1 week) 86400 ; negative (1 day) ) IN NS test-server.com. IN MX 10 test-server.com. IN A 58.138.56.142 www IN CNAME test-server.com. www IN CNAME test-server.com.
nsswitch.conf
# # /etc/nsswitch.conf # # An example Name Service Switch config file. This file should be # sorted with the most-used services at the beginning. # # The entry '[NOTFOUND=return]' means that the search for an # entry should stop if the search in the previous entry turned # up nothing. Note that if the search failed due to some other reason # (like no NIS server responding) then the search continues with the # next entry. # # Legal entries are: # # nisplus or nis+ Use NIS+ (NIS version 3) # nis or yp Use NIS (NIS version 2), also called YP # dns Use DNS (Domain Name Service) # files Use the local files # db Use the local database (.db) files # compat Use NIS on compat mode # hesiod Use Hesiod for user lookups # [NOTFOUND=return] Stop searching if not found so far #
# To use db, put the "db" in front of "files" for entries you want to be # looked up first in the databases # # Example: #passwd: db files nisplus nis #shadow: db files nisplus nis #group: db files nisplus nis
passwd: files shadow: files group: files
#hosts: db files nisplus nis dns hosts: files dns
# Example - obey only what nisplus tells us... #services: nisplus [NOTFOUND=return] files #networks: nisplus [NOTFOUND=return] files #protocols: nisplus [NOTFOUND=return] files #rpc: nisplus [NOTFOUND=return] files #ethers: nisplus [NOTFOUND=return] files #netmasks: nisplus [NOTFOUND=return] files
bootparams: nisplus [NOTFOUND=return] files
ethers: files netmasks: files networks: files protocols: files rpc: files services: files
netgroup: nisplus
publickey: nisplus
automount: files nisplus aliases: files nisplus
hosts
# Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost 192.168.24.115 www.test-server.com www 192.169.24.120 client
このような感じになっております。Firewall、SELinuxはDisabledにしてあります。 また、3回目コメントで気づいたのですが、value domainで取得したものを使うのですか?と上記で述べたのですが、それを使用するのでしたら、wwwは不要ではないのか と思った次第であります。そうなると独自ドメインではないような気がしてなりません・・・ 質問ばかりで申し訳ございません。 お忙しいところ申し訳ありませんが、どうかご教授お願いいたします。
|
Re: bindの動作確認
( No.4 )
|
 |
- 日時: 2007/07/04 09:05
- 名前: 管理者
-
> IPアドレス:192.168.24.115
> ホスト名:www.test-server.com > 別名:www.test-server.com > > > >nslookup > DNS request timed out. > timeout was 2 seconds. > *** Can't find server name for address 192.168.24.110: Timed out > *** Default servers are not available > Default Server: UnKnown > Address: 192.168.24.110 > > > hosts > > # Do not remove the following line, or various programs > # that require network functionality will fail. > 127.0.0.1 localhost.localdomain localhost > 192.168.24.115 www.test-server.com www > 192.169.24.120 client
まず、DNS設定ファイルは置いておいてネットワーク構成(設定)が未完全であり誤っていると思われますので、先に正しておいてください。 開示された情報を整理すると以下となりますよね?
【サーバ】 ・IPアドレス :192.168.24.115 ・ホスト名 :www ・FQDN :www.test-server.com
【クライアント】 「1機目」 ・コンピュータ名 :client1 ・IPアドレス :192.168.24.120 「2機目」 ・コンピュータ名 :client2 ・IPアドレス :192.168.24.130
まず、「nslookup」をクライアントから実行した時に「*** Can't find server name for address 192.168.24.110: Timed out」と出ています。 IPアドレスが「192.168.24.110」となっておりサーバのIPではありません。これでは応答があるはずがないのでエラーとなります。
クライアントのネットワークプロパティにある「DNSサーバのIPアドレス」を「192.168.24.115」に正しくしてください。
次に「/etc/hosts」ですが、自分自身が名前解決する順番として「files」→「dns」となります。 hostsファイルの設定内容に誤りはありませんが「DNSサーバ」で名前解決を一元管理する為にもループバックアドレスのみ残し後は削除してください。(以下参照)
「/etc/hosts」
# Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost
> また、解説のページにある、bind設定ファイルとcaching-nameserver設定ファイルについて の項目なんですが、 > 「/var/log/messages」を見る事で確認できます。とありますように、そのまま同じように打つと下記のようになってしまいます。 > > [root@www ~]# /var/log/messages > bash: /var/log/messages: 許可がありません > [root@www ~]# > > やり方が間違っていると思いますが、どのようにしたらいいのか分かりません・・・。
「/var/log/messages」はログファイルであるので、そのまま実行すると上記の様にエラーとなります。 「cat」や「less」・「vi」などでファイルの中身を見てください。
上記まで取りあえず確認してみてから、再度レスをお待ちしております。 ちなみに、「named.conf」と「named.caching-nameserver.conf」双方とも定義しておられますが、紹介ページにも書かせて頂いているように優先される設定ファイルは「named.conf」となります。 困惑されない為にもどちらかを削除される事をお勧め致します。
|
Re: bindの動作確認
( No.6 )
|
 |
- 日時: 2007/07/04 14:08
- 名前: 管理者
-
「test-server.com.lan」(test-server.com.wan)ゾーンファイルについて
> $TTL 86400 > @ IN SOA test-server.com. root.test-server.com.( > 2007031400 ; serial > 3600 ; refresh (1 hour) > 900 ; retry (15 minutes) > 604800 ; expire (1 week) > 86400 ; negative (1 day) > ) > IN NS test-server.com. > IN MX 10 test-server.com. > IN A 192.168.24.115 > client1 IN A 192.168.24.120 > client2 IN A 192.168.1.130 > www IN CNAME test-server.com. > www IN CNAME test-server.com.
まず、「client2」ですが「192.168.1.130」となっております。「192.168.24.130」に直してください。 次に、別名「www」が2つ定義されています。1つにして下さい。
これ以外に、全ゾーンに対して全ての各設定名(値)の間をスペースになっているかも確認してください。(以下例) タブが混入していると正しく応答しない場合があります。
client1 IN A 192.168.24.120 ↑ ~~↑~~ ~~~~~~~↑~~~~~~ ここの部分
変更後のサービス再起動を忘れずに・・・
|
Re: bindの動作確認
( No.7 )
|
 |
- 日時: 2007/07/07 10:29
- 名前: milu
-
間を空けてしまい申し訳ありませんでした。
何度か確認して修正したところ、現状から改善されませんでした。 なので、試しに別のHDDにFedoraをインストールしてみることにしました。 多分、全然理解してないのにいろんな情報を掻い摘んで設定してたのが問題だと思います。
新規で用意した方では、CTUにあるDHCPサーバ機能設定(LAN側固定IP払い出し)を利用してみようと思った次第です。 これを利用した場合、webサーバを構築するにあたって今後設定する項目は、管理人様のサイトで言うと、どれが最低限の必須項目なのでしょうか?
windowsで立てた時を参考にして、自分なりに考えてみたのですが、下記の順序で正しいのでしょうか…? bindから離れてしまい申し訳ございません。ご教授お願いいたします。
Fedora Core 5のインストール(GUIベース) ↓ インストール後の設定(+各サーバサービスの最新化) ↓ IPアドレスの自動更新(DiCE) ↓ Webサーバの構築(Apache
|
Re: bindの動作確認
( No.8 )
|
 |
- 日時: 2007/07/08 08:09
- 名前: 管理者
-
上記の順番でも良いと思いますが、『インストール後の設定(+各サーバサービスの最新化)』の後に
『セキュリティ強化』を導入した方が良いかと思います。
|
Re: bindの動作確認
( No.9 )
|
 |
- 日時: 2007/07/09 14:39
- 名前: milu
-
いつもご丁寧に回答していただきありがとうございました。
おかげさまでうまくいくことができ満足しております。 ありがとうございました。
|