BIND9とDottk

僕のドメインは無料のDottkを使っています。
DNSサーバを自前で立てればサブドメインも使えます。


1)zoneファイルの作成

僕の場合、「neko6.info.zone」を作ります。

# vi /etc/bind/neko6.info.zone

$TTL 360
@       IN      SOA     neko6.info. root.neko6.info. (
;
         20111070101 ; serial
        10800      ; refresh sec
        3600       ; retry sec
        604800     ; expire sec
         86400 )    ; neg_ttl sec
;
        IN      NS      ns.neko6.info.
@       IN      A       202.212.90.234
*       IN      A       202.212.90.234	    ; ワイルドカード使うなら
www     IN      A       202.212.90.234
www     IN      AAAA    2001:3e0:b7b::fff

こんな感じw


2)デフォルトゾーンを設定します。

僕の場合は、内部からのアクセスと外からのアクセスを分けています。

・「localnet」として内部ネットワーク192.168.1.0/24、127.0.0.1を許可。
・DOTTKドメインの応答は「any」として「localnet」以外からのアクセスを許可。

# vi /etc/bind/named.conf.default-zones

acl localnet {
      192.168.1.0/24;
      127.0.0.1;
 };

view "localnet" {
        match-clients { localnet; };
         recursion yes;
         allow-query { localnet; };

// prime the server with knowledge of the root servers
zone "." {
	type hint;
	file "/etc/bind/db.root";
};

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

zone "localhost" {
	type master;
	file "/etc/bind/db.local";
};

zone "127.in-addr.arpa" {
	type master;
	file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
	type master;
	file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
	type master;
	file "/etc/bind/db.255";
};


/////////       Local     ///////////

zone "neko6.info" {
	type master;
	file "/etc/bind/neko6.info.zone";
};

};


/////////	      WAN      	///////////

view "wan" {
    match-clients { any; };
    recursion no;
        
zone "neko6.info" {
	type master;
	file "/etc/bind/neko6.info.zone";
	allow-query { any; };
};

};

とりあえず、これで動くはず。
あとは、バージョンを隠したりしたければ、

# vi /etc/bind/named.conf.options

options {
  ・
  ・
version "hogehoge";
  ・
  ・
};

隠れているかは、

$ dig yahoo.co.jp version.bind chaos txt

で確認出来ます。

[tegaki]ドメインいっぱい〜[/tegaki]

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

Enter code * Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.