ポリシーと言える程でもないがこんな感じにしたい
- unity-system.com と e-unity.co.jp 2個のドメインをIP1個で運用
- 内部LANはe-unity.co.jpのドメインで運用
- 外から来るメールはどちらのドメインでも受付可能に
- ウエッブサーバーはどちらのドメインでも受付可能に
- (要するにサーバーはどちらのドメインでも受付可能に(^^;)
- 送信メールのドメインはメーラーで設定
- 外向逆引き設定もおこなう(IP1個だから設定しても意味をなさないのだがやっておく)
1.1 内向きnamed-inner.confの編集
// // named-inner.conf // options { directory "/etc/bind/namedb-inner"; listen-on { 127.0.0.1; 192.168.2.200; }; allow-query { 127.0.0.1; 192.168.2.0/24; }; pid-file "/var/run/named-inner.pid"; }; zone "." { type hint; file "/etc/bind/db.root"; }; zone "localhost" { type master; file "/etc/bind/db.local"; }; zone "127.in-addr.arpa" { type master; file "/etc/bind/db.127"; }; zone "e-unity.co.jp" { //.co.jp用 内側のドメイン用正引き設定 type master; file "inner.zone1"; }; zone "2.168.192.IN-ADDR.ARPA" { //.co.jp用 内側のドメイン用逆引き設定 type master; file "inner.zone1.rev"; }; zone "unity-system.com" { //.com用 内側のドメイン用正引き設定 type master; file "inner.zone2"; }; zone "2.168.192.IN-ADDR.ARPA" { //.com用 内側のドメイン用逆引き設定 type master; file "inner.zone2.rev"; };
1.2 内向きゾーン1正引きファイルの編集
; /etc/bind/namedb-inner/inner.zone1 ; ; e-unity.co.jp の内向けゾーンファイル ; @ IN SOA ns.e-unity.co.jp. postmaster.e-unity.co.jp. ( 2002112201 ; Serial 3600 ; Refresh after 1 hour 300 ; Retry after 5 minutes 604800 ; Expire after 1 week 14400 ) ; Minimum TTL of 4 hour IN A 192.168.2.200 IN NS ns.e-unity.co.jp. IN MX 10 mail.e-unity.co.jp. gw IN A 192.168.2.1 ns IN A 192.168.2.200 mail IN A 192.168.2.200 tetsuya IN A 192.168.2.13 satoru IN A 192.168.2.14 hawkeye IN A 192.168.2.16 print1 IN A 192.168.2.17 pop IN CNAME ns smtp IN CNAME ns www IN CNAME ns ftp IN CNAME ns
1.3 内向きゾーン1逆引きファイルの編集
; /etc/bind/namedb-inner/inner1.zone.rev ; ; e-unity.co.jp の内向けリバースファイル ; @ IN SOA ns.e-unity.co.jp. postmaster.e-unity.co.jp. ( 2002112201 ; Serial 3600 ; Refresh after 1 hour 300 ; Retry after 5 minutes 604800 ; Expire after 1 week 14400 ) ; Minimum TTL of 4 hour IN NS ns.e-unity.co.jp. IN PTR e-unity.co.jp. IN A 255.255.255.0 1 IN PTR gw.e-unity.co.jp. 200 IN PTR ns.e-unity.co.jp. 13 IN PTR tetsuya.e-unity.co.jp. 14 IN PTR satoru.e-unity.co.jp. 16 IN PTR hawkeye.e-unity.co.jp. 17 IN PTR print1.e-unity.co.jp.
1.4 内向きゾーン2正引きファイルの編集
; /etc/bind/namedb-inner/inner.zone2 ; ; unity-system.com の内向けゾーンファイル ; @ IN SOA myns.unity-system.com. postmaster.unity-system.com. ( 2002112201 ; Serial 3600 ; Refresh after 1 hour 300 ; Retry after 5 minutes 604800 ; Expire after 1 week 14400 ) ; Minimum TTL of 4 hour IN A 192.168.2.200 IN NS myns.unity-system.com. IN MX 10 mail.unity-system.com. gw IN A 192.168.2.1 myns IN A 192.168.2.200 mail IN A 192.168.2.200 tetsuya IN A 192.168.2.13 satoru IN A 192.168.2.14 hawkeye IN A 192.168.2.16 print1 IN A 192.168.2.17 pop IN CNAME myns smtp IN CNAME myns www IN CNAME myns ftp IN CNAME myns
1.5 内向きゾーン2逆引きファイルの編集
; /etc/bind/namedb-inner/inner.zone2.rev ; ; unity-system.com の内向けリバースファイル ; @ IN SOA myns.unity-system.com. postmaster.unity-system.com. ( 2002112201 ; Serial 3600 ; Refresh after 1 hour 300 ; Retry after 5 minutes 604800 ; Expire after 1 week 14400 ) ; Minimum TTL of 4 hour IN NS myns.unity-system.com. IN PTR unity-system.com. IN A 255.255.255.0 1 IN PTR gw.unity-system.com. 200 IN PTR myns.unity-system.com. 13 IN PTR tetsuya.unity-system.com. 14 IN PTR satoru.unity-system.com. 16 IN PTR hawkeye.unity-system.com. 17 IN PTR print1.unity-system.com.
1.6 外向きnamed-outer.confの編集
// // named-outer.conf // options { directory "/etc/bind/namedb-outer"; //外向け用設定ファイルのディレクトリ listen-on { 219.101.10.32; }; pid-file "/var/run/named-outer.pid"; }; // reduce log verbosity on issues outside our control logging { category lame-servers { null; }; category cname { null; }; }; zone "." { type hint; file "/etc/bind/db.root"; }; zone "localhost" { type master; file "/etc/bind/db.local"; }; zone "127.in-addr.arpa" { type master; file "/etc/bind/db.127"; }; zone "e-unity.co.jp" { //.co.jp 外側のドメイン用正引き設定。 type master; file "outer.zone1"; notify yes; allow-transfer { 127.0.0.1; xxx.xxx.xxx.xxx; //セカンダリ引受先ネットワーク// }; }; zone "32.10.101.219.IN-ADDR.ARPA" { //.co.jp 外側のドメイン用逆引き設定。 type master; file "outer.zone1.rev"; }; zone "unity-system.com" { //.com 外側のドメイン用正引き設定。 type master; file "outer.zone2"; notify yes; allow-transfer { 127.0.0.1; xxx.xxx.xxx.xxx; //セカンダリ引受先ネットワーク// }; }; zone "32.10.101.219.IN-ADDR.ARPA" { //.com 外側のドメイン用逆引き設定。 type master; file "outer.zone2.rev"; };
1.7 外向きゾーン1正引きファイルの編集
; /etc/bind/namedb-outer/outer.zone1 ; ; e-unity.co.jp の外向けゾーンファイル ; @ IN SOA ns.e-unity.co.jp. postmaster.e-unity.co.jp. ( 2002112301 ; Serial 3600 ; Refresh after 1 hour 300 ; Retry after 5 minutes 604800 ; Expire after 1 week 14400 ) ; Minimum TTL of 4 hour ; ; Name server ; IN NS ns.e-unity.co.jp. ;プライマリ IN NS ns.xxxxxxx.com. ;セカンダリ IN MX 10 mail.e-unity.co.jp. ; ; "e-unity.co.jp" is ; IN A 219.101.10.32 ; ; Host table ; ns IN A 219.101.10.32 ; ; MX レコードに使う名前に、CNAME は使えない ; mail IN A 219.101.10.32 ; ; Alias ; pop IN CNAME ns smtp IN CNAME ns www IN CNAME ns ftp IN CNAME ns
1.8 外向きゾーン1逆引きファイルの編集
; /etc/bind/namedb-outer/outer.zone1.rev ; ; e-unity.co.jp の外向けリバースファイル ; ;(IPアドレス1個のユーザは、プロバイダのDNSサーバからユーザ側の逆引きDNSサーバアドレス ;を検索するようnamed..conf のzone で始まる逆引き Zone名称をいくら正しく設定しても ;その逆引き設定は、プロバイダで無視され、伝播することは、ありません。 ;残念ながら、逆引きに関しては、上位DNSサーバは、プロバイダのDNSサーバであり、 ;逆引き設定は、無視されることになります。 ;グローバルIPアドレス1個は、ネットワークマスク値が、255.255.255.254であり ;ネットワークではないという認識にされています) ; ;。。。。であろうとも逆引き設定しておくのだ! ; @ IN SOA ns.e-unity.co.jp. postmaster.e-unity.co.jp. ( 2002112301 ; Serial 3600 ; Refresh after 1 hour 300 ; Retry after 5 minutes 604800 ; Expire after 1 week 14400 ) ; Minimum TTL of 4 hour ; ; Name Server ; IN NS ns.e-unity.co.jp. ;プライマリ IN NS ns.xxxxxxx.com. ;セカンダリ ; ; Network address ; IN A 255.255.255.254 ; ; Address table ; IN PTR e-unity.co.jp.
1.9 外向きゾーン2正引きファイルの編集
; /etc/bind/namedb-outer/outer.zone2 ; ; unity-system.com の外向けゾーンファイル ; @ IN SOA myns.unity-system.com. postmaster.unity-system.com. ( 2002112301 ; Serial 3600 ; Refresh after 1 hour 300 ; Retry after 5 minutes 604800 ; Expire after 1 week 14400 ) ; Minimum TTL of 4 hour ; ; Name server ; IN NS myns.unity-system.com. IN NS ns.xxxxxxxx.com. IN MX 10 mail.unity-system.com. ; ; "unity-system.com" is ; IN A 219.101.10.32 ; ; Host table ; myns IN A 219.101.10.32 ; ; MX レコードに使う名前に、CNAME は使えない ; mail IN A 219.101.10.32 ; ; Alias ; pop IN CNAME myns smtp IN CNAME myns www IN CNAME myns ftp IN CNAME myns
1.10 外向きゾーン2逆引きファイルの編集
; /etc/bind/namedb-outer/outer.zone2.rev ; ; unity-system.com の外向けリバースファイル ; @ IN SOA myns.unity-system.com. postmaster.unity-system.com. ( 2002112301 ; Serial 3600 ; Refresh after 1 hour 300 ; Retry after 5 minutes 604800 ; Expire after 1 week 14400 ) ; Minimum TTL of 4 hour ; ; Name Server ; IN NS myns.unity-system.com. IN NS ns.xxxxxxxx.com. ; ; Network address ; IN A 255.255.255.254 ; ; Address table ; IN PTR unity-system.com.
1.11 /etc/resolv.confの編集
# eth1 begin nameserver 192.168.2.200 # eth1 end # eth0 begin search e-unity.co.jp unity-system.com nameserver 218.216.192.40 nameserver 218.216.192.132 # eth0 end
2.1 /etc/postfix/main.cfの編集
myhostname = ns.e-unity.co.jp mydomain = e-unity.co.jp mydestination = $mydomain, unity-system.com
3.1 /etc/pcmcia/network.optsの編集/etc/pcmcia/network.optsファイル内のunity-system.comの部分をe-unity.co.jpに全て変更
/etc/dhcpd.confファイル内のunity-system.comの部分をe-unity.co.jpに全て変更