Zimbra on EC2 tips: Difference between revisions

Jump to navigation Jump to search
/usr/local/etc/bind/templates/zone.tmpl
<syntaxhighlight lang="text" enclose="div">
;
; BIND data file for Split DNS
;
@ 604800 IN SOA localhost. root.localhost. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ 604800 IN NS localhost.
@ 604800 IN A $localipv4
@ 604800 IN MX 10 @
</syntaxhighlight>
 
/usr/local/etc/bind/templates/zone.tmpl
<syntaxhighlight lang="text" enclose="div">
;
; BIND data file for Split DNS
;
@ 604800 IN SOA localhost. root.localhost. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ 604800 IN NS localhost.
@ 604800 IN PTR $fqdn.
</syntaxhighlight>
 
/usr/local/etc/bind/templates/conf.tmpl
<syntaxhighlight lang="text" enclose="div">
zone "$fqdn" {
type master;
file "/etc/bind/db.myzone";
};
 
zone "$arpa" {
type master;
file "/etc/bind/db.myarpa";
};
</syntaxhighlight>
 
/etc/bind/named.conf.local に以下を追加する
<syntaxhighlight lang="text" enclose="div">
include "/etc/bind/myzone.conf";
</syntaxhighlight>
 
/etc/bind/named.conf.options の forwarders を EC2 の内部 DNS サーバに設定
<syntaxhighlight lang="text" enclose="div">
forwarders {
172.16.0.23;
};
</syntaxhighlight>
 
/etc/bind/named.conf.options の listen address 制限しておく
<syntaxhighlight lang="text" enclose="div">
// listen-on-v6 { any; };
listen-on { 127.0.0.1; };
listen-on-v6 { ::1; };
</syntaxhighlight>
 
起動スクリプトとしてリンク
<syntaxhighlight lang="bash" enclose="div">