忍者ブログ
×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

bindでnameserverを構築

まずは、bindがインストールされていることを確認
# rpm -qa | grep bind
PackageKit-device-rebind-0.5.8-19.el6.centos.i686
bind-utils-9.7.3-8.P3.el6_2.2.i686
ypbind-1.20.4-29.el6.i686
rpcbind-0.2.0-8.el6.i686
samba-winbind-clients-3.5.10-114.el6.i686
bind-9.7.3-8.P3.el6_2.2.i686
bind-libs-9.7.3-8.P3.el6_2.2.i686

なんか使わないものもありそうな来もするが、こんな感じでパッケージがインストールされている。
samba-winbind-clients-3.5.10-114.el6.i686 なんかは削っちゃってもいいよなー。
結局は、bindとbind-utilsあたりが入っていて、あとは引きずられて入ってくるものだよなー。

/etc/named.conf を設定

//
// named.conf
//
// Provided by Red Hat bind 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.
//

options {
        listen-on port 53 { any; };
//      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";
        allow-query     { any; };
        recursion yes;
        forwarders {192.168.15.1;};

        dnssec-enable yes;
        dnssec-validation yes;
        dnssec-lookaside auto;

        /* Path to ISC DLV key */
        bindkeys-file "/etc/named.iscdlv.key";


};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
    category lame-servers { null; };

};

view "internal" {
    match-clients { localhost; localnets; };
    recursion yes;

        zone "." IN {
                type hint;
                file "named.ca";
        };

    include "/etc/named.rfc1912.zones";
    include "/etc/named.root.key";


        // 逆引きのループバックのゾーン設定
        zone "0.0.127.in-addr.arpa" IN {
                type master;
                file "named.local";
        };


        // 正引きの宅内のゾーン設定
        zone "example.com" IN {
                type master;
                file "example.com.zone";
        };

        // 逆引きのサーバゾーンの設定
        zone "15.168.192.in-addr.arpa" IN {
                type master;
                file "192.168.15.rev";
        };
};

次に/var/named/ に移って、各ファイルを作成する。

# cd /var/named/

# less example.com.zone

$TTL 86400
@         IN SOA   main.example.com. admin.main.example.com. (
                        2012031800    ; serial
                        3H            ; refresh
                        15M           ; retry
                        1W            ; expiry
                        1H )          ; minimum

          IN NS    main.example.com.
          IN MX    10 vz1.example.com.

main      IN A     192.168.1.100
vz1       IN A     192.168.1.101


# less 192.168.15.rev

$TTL 86400
@       IN SOA   main.example.com. admin.main.example.com (
                        2012031800    ; serial
                        3H            ; refresh
                        15M           ; retry
                        1W            ; expiry
                        1H )          ; minimum

          IN NS    main.example.com.
100       IN PTR   main.example.com.
101        IN PTR   vz1.example.com.


VE側のnameserverを変更する
# vi /etc/resolv.conf
nameserver 192.168.15.100

これでVE側のnameserverはmainのサーバになった。
 

PR
この記事にコメントする
お名前
タイトル
文字色
メールアドレス
URL
コメント
パスワード   Vodafone絵文字 i-mode絵文字 Ezweb絵文字
カレンダー
08 2024/09 10
S M T W T F S
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
ブログ内検索
VEのapacheでphpを動かす  HOME  VEの作成2

material:web*citron  template:ゆずろぐ

忍者ブログ [PR]