質問編集履歴
1
named.confの修正行いました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -48,16 +48,142 @@
|
|
48
48
|
|
49
49
|
```named
|
50
50
|
|
51
|
+
//
|
52
|
+
|
53
|
+
// named.conf
|
54
|
+
|
55
|
+
//
|
56
|
+
|
57
|
+
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
|
58
|
+
|
59
|
+
// server as a caching only nameserver (as a localhost DNS resolver only).
|
60
|
+
|
61
|
+
//
|
62
|
+
|
63
|
+
// See /usr/share/doc/bind*/sample/ for example named configuration files.
|
64
|
+
|
65
|
+
//
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
options {
|
70
|
+
|
71
|
+
#DNSサーバの待ち受けIPアドレスの設定
|
72
|
+
|
73
|
+
listen-on port 53 {
|
74
|
+
|
75
|
+
52.222.222.222;
|
76
|
+
|
77
|
+
172.11.11.11; #DNSサーバのプライベートIPを指定
|
78
|
+
|
79
|
+
};
|
80
|
+
|
81
|
+
#listen-on-v6 port 53 { ::1; }; #IPv6は使用しないためコメントアウト
|
82
|
+
|
83
|
+
directory "/var/named";
|
84
|
+
|
85
|
+
dump-file "/var/named/data/cache_dump.db";
|
86
|
+
|
87
|
+
statistics-file "/var/named/data/named_stats.txt";
|
88
|
+
|
89
|
+
memstatistics-file "/var/named/data/named_mem_stats.txt";
|
90
|
+
|
91
|
+
allow-query { localhost; };
|
92
|
+
|
93
|
+
recursion yes;
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
dnssec-enable yes;
|
98
|
+
|
99
|
+
dnssec-validation yes;
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
/* Path to ISC DLV key */
|
104
|
+
|
105
|
+
bindkeys-file "/etc/named.iscdlv.key";
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
managed-keys-directory "/var/named/dynamic";
|
110
|
+
|
111
|
+
};
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
logging {
|
116
|
+
|
117
|
+
channel "default-log" {
|
118
|
+
|
119
|
+
file "/var/log/named/default.log" versions 5 size 10M;
|
120
|
+
|
121
|
+
severity debug;
|
122
|
+
|
123
|
+
print-time yes;
|
124
|
+
|
125
|
+
print-severity yes;
|
126
|
+
|
127
|
+
print-category yes;
|
128
|
+
|
129
|
+
};
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
category default { "default-log"; };
|
134
|
+
|
135
|
+
};
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
#ローカルネットワークを定義する
|
140
|
+
|
141
|
+
acl localnet {
|
142
|
+
|
143
|
+
許可したいIPを書いてます。
|
144
|
+
|
145
|
+
};
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
#内部向け用の記述
|
150
|
+
|
151
|
+
view "internal" {
|
152
|
+
|
153
|
+
match-clients { localnet; }; #定義したローカルネットワークに合致した場合、view内の処理をする
|
154
|
+
|
155
|
+
allow-query { localnet; }; #定義したローカルネットワークのみ問い合わせを許可する
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
zone "." IN {
|
160
|
+
|
161
|
+
type hint;
|
162
|
+
|
163
|
+
file "named.ca";
|
164
|
+
|
165
|
+
};
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
#正引きゾーン
|
170
|
+
|
51
|
-
zone "hogege.jp" IN {
|
171
|
+
zone "hogege.jp" IN {
|
52
|
-
|
172
|
+
|
53
|
-
type s
|
173
|
+
type master;
|
54
174
|
|
55
175
|
file "/etc/named/hogege.jp.zone";
|
56
176
|
|
57
|
-
masters { 52.222.222.222; };
|
58
|
-
|
59
177
|
};
|
60
178
|
|
179
|
+
|
180
|
+
|
181
|
+
include "/etc/named.rfc1912.zones";
|
182
|
+
|
183
|
+
include "/etc/named.root.key";
|
184
|
+
|
185
|
+
};
|
186
|
+
|
61
187
|
```
|
62
188
|
|
63
189
|
|