JP's Room
[
トップ
|
一覧
|
単語検索
|
最終更新
|
バックアップ
|
ヘルプ
]
Misc/内部用DNSサーバー構築 vm-sigel
をテンプレートにして作成
開始行:
#contents
初期設定はUbuntuサーバーインストール時にある程度設定済み
*設定ファイルの作成 [#s8c00929]
**/etc/bind/db.root [#i523696c]
デフォルトのものを利用
**/etc/bind/named.conf [#y83cc5ab]
// This is the primary configuration file for the BIND D...
//
// Please read /usr/share/doc/bind9/README.Debian.gz for...
// structure of BIND configuration files in Debian, *BEF...
// this configuration file.
//
// If you are just adding zones, please do that in /etc/...
include "/etc/bind/named.conf.options";
// prime the server with knowledge of the root servers
zone "." {
// ルート DNS の情報
type hint;
// ファイル名
file "/etc/bind/db.root";
};
// be authoritative for the localhost forward and revers...
// broadcast zones as per RFC 1912
// localhost の正引きの設定
zone "localhost" {
// Master DNS Serverであることを示す
type master;
// ファイル名
file "/etc/bind/db.localhost";
};
// localhost の逆引きの設定
zone "0.0.127.in-addr.arpa" {
// Master DNS Serverであることを明示
type master;
// ファイル名
file "/etc/bind/db.0.0.127";
};
// xx.xxx の正引きの設定(内部用ドメイン)
zone "xx.xxx" {
// Master DNS Serverであることを明示
// 内部から *.xx.xxx を引いたときにきちんと見え...
type master;
// ファイル名
file "/etc/bind/db.xx.xxx";
allow-update{
192.168.1.50;
127.0.0.1;
};
};
// 192.168.1.* の逆引きの設定
zone "1.168.192.in-addr.arpa" {
// Master DNS Serverであることを明示
type master;
// ファイル名
file "/etc/bind/db.1.168.192";
allow-update{
192.168.1.50;
127.0.0.1;
};
};
// yyy.yy の正引きの設定(DDNSドメイン)
zone "yyy.yy" {
// Master DNS Serverであることを明示
// 内部から tldsjp.yyy.yy を引いたときにきちんと...
type master;
// ファイル名
file "/etc/bind/db.yyy.yy";
};
include "/etc/bind/named.conf.local";
**/etc/bind/named.conf.options [#t56fe0ea]
options {
// zone ファイルの格納場所
directory "/var/cache/bind";
// If there is a firewall between you and namese...
// to talk to, you might need to uncomment the q...
// directive below. Previous versions of BIND a...
// questions using port 53, but BIND 8.1 and lat...
// port by default.
// query-source address * port 53;
// BIND の利用を許す範囲を指定
allow-query {
// 自分自身( localhost )
127.0.0.1;
// 192.168.1.* ( Subnet 255.255.255.0 )
192.168.1.0/24;
};
// スレーブ DNS のアドレスを記述。内向き DNS の...
allow-transfer {
// 自分自身( localhost )
127.0.0.1;
// 192.168.1.* ( Subnet 255.255.255.0 )
192.168.1.0/24;
};
// If your ISP provided one or more IP addresses...
// nameservers, you probably want to use them as...
// Uncomment the following block, and insert the...
// the all-0's placeholder.
// forwarders {
// 0.0.0.0;
// };
// 自前で名前解決できないとき、まずはプロバイダ...
forwarders {
aaa.bbb.ccc.ddd; // プロバイダのプライ...
aaa.bbb.ccc.eee; // プロバイダのセカン...
};
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};
**/etc/bind/named.conf.local [#cd7543c6]
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not ...
// organization
//include "/etc/bind/zones.rfc1918";
コメントだけですが…
**/etc/bind/db.localhost [#v6e05141]
$TTL 1D
@ IN SOA xxxxx.xx.net. root.xxxxx.xx.net. (
2006090300 ; シリアル番号
3H
1H
1W
1D )
IN NS xxxxx.xx.net.
localhost. IN A 127.0.0.1
**/etc/bind/db.0.0.127 [#beac0e21]
$TTL 1D
@ IN SOA xxxxx.xx.net. root.xxxxx.xx.net. (
2006090300
3H
1H
1W
1D )
IN NS xxxxx.xx.net.
1 IN PTR localhost.
**/etc/bind/db.xx.net(内部用設定ファイル) [#za68b233]
$TTL 1D
@ IN SOA xxxxx.xx.net. root.xxxxx.xx.net. (
2006090300
3H
1H
1W
1D )
IN NS xxxxx.xx.net.
IN MX 10 xxxxx.xx.net. ; メールサーバのホ...
; 10 は優先順位。
router IN A 192.168.1.1
xxxxx IN A 192.168.1.10
xx.net IN A 192.168.1.10
chrono IN A 192.168.1.3
dns IN CNAME sigel
www IN CNAME sigel
smtp IN CNAME sigel
pop IN CNAME sigel
**/etc/bind/db.1.168.192 [#x5e20b49]
$TTL 1D
@ IN SOA xxxxx.xx.net. root.xxxxx.xx.net. (
2006090300
3H
1H
1W
1D )
IN NS xxxxx.xx.net.
IN PTR xx.net. ; 解決するドメイン
IN A 255.255.255.0 ; サブネットマスク
1 IN PTR router.xx.net.
10 IN PTR sigel.xx.net.
2 IN PTR chrono.xx.net.
**/etc/bind/yyy.yy(DDNSドメイン設定ファイル) [#m10449a6]
$TTL 1D
@ IN SOA yyyyy.yyy.yy. root.yyyyyy.yyy.yy. (
2006090300
3H
1H
1W
1D )
IN NS yyyyyy.yyy.yy.
yyyyyy IN A 192.168.1.10
*その他のファイルの設定 [#s037e918]
**/etc/hosts [#be57c23a]
DNS サーバの情報と hosts の情報が不整合を起こさない為に l...
今回は 127.0.0.1のエントリーしかなかったのと IPv6 のよく...
**/etc/resolv.conf [#l9c2adc3]
search xx.net
nameserver 127.0.0.1
nameserver プロバイダのDNSサーバー
**/etc/nsswitch.conf [#d3d778de]
hostsの行にdnsが含まれていること
hosts: files nisplus nis dns
**/etc/host.conf [#hf618683]
order hosts,bind
*DDNSセットアップ [#x48106f9]
[[DDNSセットアップ>Misc/DDNSセットアップ]]
*参考サイト [#ne008048]
-[[Misc/内部用DNSサーバー構築]]
終了行:
#contents
初期設定はUbuntuサーバーインストール時にある程度設定済み
*設定ファイルの作成 [#s8c00929]
**/etc/bind/db.root [#i523696c]
デフォルトのものを利用
**/etc/bind/named.conf [#y83cc5ab]
// This is the primary configuration file for the BIND D...
//
// Please read /usr/share/doc/bind9/README.Debian.gz for...
// structure of BIND configuration files in Debian, *BEF...
// this configuration file.
//
// If you are just adding zones, please do that in /etc/...
include "/etc/bind/named.conf.options";
// prime the server with knowledge of the root servers
zone "." {
// ルート DNS の情報
type hint;
// ファイル名
file "/etc/bind/db.root";
};
// be authoritative for the localhost forward and revers...
// broadcast zones as per RFC 1912
// localhost の正引きの設定
zone "localhost" {
// Master DNS Serverであることを示す
type master;
// ファイル名
file "/etc/bind/db.localhost";
};
// localhost の逆引きの設定
zone "0.0.127.in-addr.arpa" {
// Master DNS Serverであることを明示
type master;
// ファイル名
file "/etc/bind/db.0.0.127";
};
// xx.xxx の正引きの設定(内部用ドメイン)
zone "xx.xxx" {
// Master DNS Serverであることを明示
// 内部から *.xx.xxx を引いたときにきちんと見え...
type master;
// ファイル名
file "/etc/bind/db.xx.xxx";
allow-update{
192.168.1.50;
127.0.0.1;
};
};
// 192.168.1.* の逆引きの設定
zone "1.168.192.in-addr.arpa" {
// Master DNS Serverであることを明示
type master;
// ファイル名
file "/etc/bind/db.1.168.192";
allow-update{
192.168.1.50;
127.0.0.1;
};
};
// yyy.yy の正引きの設定(DDNSドメイン)
zone "yyy.yy" {
// Master DNS Serverであることを明示
// 内部から tldsjp.yyy.yy を引いたときにきちんと...
type master;
// ファイル名
file "/etc/bind/db.yyy.yy";
};
include "/etc/bind/named.conf.local";
**/etc/bind/named.conf.options [#t56fe0ea]
options {
// zone ファイルの格納場所
directory "/var/cache/bind";
// If there is a firewall between you and namese...
// to talk to, you might need to uncomment the q...
// directive below. Previous versions of BIND a...
// questions using port 53, but BIND 8.1 and lat...
// port by default.
// query-source address * port 53;
// BIND の利用を許す範囲を指定
allow-query {
// 自分自身( localhost )
127.0.0.1;
// 192.168.1.* ( Subnet 255.255.255.0 )
192.168.1.0/24;
};
// スレーブ DNS のアドレスを記述。内向き DNS の...
allow-transfer {
// 自分自身( localhost )
127.0.0.1;
// 192.168.1.* ( Subnet 255.255.255.0 )
192.168.1.0/24;
};
// If your ISP provided one or more IP addresses...
// nameservers, you probably want to use them as...
// Uncomment the following block, and insert the...
// the all-0's placeholder.
// forwarders {
// 0.0.0.0;
// };
// 自前で名前解決できないとき、まずはプロバイダ...
forwarders {
aaa.bbb.ccc.ddd; // プロバイダのプライ...
aaa.bbb.ccc.eee; // プロバイダのセカン...
};
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};
**/etc/bind/named.conf.local [#cd7543c6]
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not ...
// organization
//include "/etc/bind/zones.rfc1918";
コメントだけですが…
**/etc/bind/db.localhost [#v6e05141]
$TTL 1D
@ IN SOA xxxxx.xx.net. root.xxxxx.xx.net. (
2006090300 ; シリアル番号
3H
1H
1W
1D )
IN NS xxxxx.xx.net.
localhost. IN A 127.0.0.1
**/etc/bind/db.0.0.127 [#beac0e21]
$TTL 1D
@ IN SOA xxxxx.xx.net. root.xxxxx.xx.net. (
2006090300
3H
1H
1W
1D )
IN NS xxxxx.xx.net.
1 IN PTR localhost.
**/etc/bind/db.xx.net(内部用設定ファイル) [#za68b233]
$TTL 1D
@ IN SOA xxxxx.xx.net. root.xxxxx.xx.net. (
2006090300
3H
1H
1W
1D )
IN NS xxxxx.xx.net.
IN MX 10 xxxxx.xx.net. ; メールサーバのホ...
; 10 は優先順位。
router IN A 192.168.1.1
xxxxx IN A 192.168.1.10
xx.net IN A 192.168.1.10
chrono IN A 192.168.1.3
dns IN CNAME sigel
www IN CNAME sigel
smtp IN CNAME sigel
pop IN CNAME sigel
**/etc/bind/db.1.168.192 [#x5e20b49]
$TTL 1D
@ IN SOA xxxxx.xx.net. root.xxxxx.xx.net. (
2006090300
3H
1H
1W
1D )
IN NS xxxxx.xx.net.
IN PTR xx.net. ; 解決するドメイン
IN A 255.255.255.0 ; サブネットマスク
1 IN PTR router.xx.net.
10 IN PTR sigel.xx.net.
2 IN PTR chrono.xx.net.
**/etc/bind/yyy.yy(DDNSドメイン設定ファイル) [#m10449a6]
$TTL 1D
@ IN SOA yyyyy.yyy.yy. root.yyyyyy.yyy.yy. (
2006090300
3H
1H
1W
1D )
IN NS yyyyyy.yyy.yy.
yyyyyy IN A 192.168.1.10
*その他のファイルの設定 [#s037e918]
**/etc/hosts [#be57c23a]
DNS サーバの情報と hosts の情報が不整合を起こさない為に l...
今回は 127.0.0.1のエントリーしかなかったのと IPv6 のよく...
**/etc/resolv.conf [#l9c2adc3]
search xx.net
nameserver 127.0.0.1
nameserver プロバイダのDNSサーバー
**/etc/nsswitch.conf [#d3d778de]
hostsの行にdnsが含まれていること
hosts: files nisplus nis dns
**/etc/host.conf [#hf618683]
order hosts,bind
*DDNSセットアップ [#x48106f9]
[[DDNSセットアップ>Misc/DDNSセットアップ]]
*参考サイト [#ne008048]
-[[Misc/内部用DNSサーバー構築]]
ページ名:
注意)このバージョンのsafariではjavascriptがうまく動作しないので、recaptchaはページ切り替え版を利用しています。