| 班長のけろbinです、DNSといえばBIND、なかなか手強かったです。 おいでんさんのページ、とくじさんのページ、etc、大変参考にさせていただきました。この場を借りてお礼いたします。 |
|
| 1 named.confの設定 | |
| 2 localhostの逆引き | |
| 3 kallanet.comのzonefile 取得したドメインを記述 | |
| 4 kallanet.jpのzonefile もひとつ取ったドメイン! | |
| 5 e-kalla.netのzonefile 3つ目のドメインも! | |
| 6 kallanet.comの逆引き | |
| 7 ルーターの設定 YAMAHA RTA50i | |
| 8 TIPS ちょっとしたヒント、受け売りですが、10/8/2002更新 | |
総体的な注意点 ★FQDN指定する際のアドレス指定の最後の「.」(ドット)忘れ! わたしもやりました。コレ ★設定ファイルを修正したらシリアル番号をインクリメントして /etc/rc.d/init.d/named restart ★設定ではまってしまったら、自分以外の目で見てもらう! これって重要(でした。) |
|
| 1 named.confの設定 黄色部分は自分の環境で修正 options { directory "/var/named"; ディストリビューションによって違うそうです。 ←これはVineです。 allow-query { localhost }; 緑部分は TIPSに記載してあります。 auth-nxdomain yes; version ""; }; zone "." IN { type hint; file "named.ca"; これも、named.root なんてのもあった! }; // zone "localhost" IN { 先輩諸氏の設定ではなかったのでコメントアウトした。 // type master; // file "localhost.zone"; // allow-update { none; }; // }; zone "0.0.127.in-addr.arpa" IN { type master; file "local.rev"; }; zone "kallanet.com" IN { type master; file "kallanet.zone"; }; zone "kallanet.jp" IN { type master; file "kallanet.jp.zone"; }; zone "e-kalla.net" IN { type master; file "e-kalla.zone"; }; zone "164.73.115.61.in-addr.arpa" IN { type master; file "kallanet.zone.rev"; }; |
ページTOP |
| 2 localhostの逆引き設定 黄色部分は自分の環境で修正 $origin 0.0.127.in-addr.arpa. $TTL 86400 @ IN SOA dns.kallanet.com. root.kallanet.com. ( 2002090999 ; serial no (yyyy/mm/dd/nn) 10800 ; refresh after 1 hours 3600 ; retry after 30 minutes 604800 ; Expire after 1 week 86400 ) ; Minimum TTL of 2 hours 0.0.127.in-addr.arpa. IN NS dns.kallanet.com. 1.0.0.127.in-addr.arpa. IN PTR localhost. |
ページTOP |
| 3 kallanet.zoneの設定 黄色部分は自分の環境で修正 $origin kallanet.com. $TTL 86400 @ IN SOA dns.kallanet.com. root.kallanet.com. ( 2002100111 ; Serial no (yyyy/mm/dd/nn) 10800 ; Refresh after 1 hour 3600 ; Retry after 30 minutes 604800 ; Expire after 1 week 86400 ) ; Minimum TTL of 2 hours IN A 61.115.73.164 IN NS dns.kallanet.com. IN NS ns2.granitecanyon.com. セカンダリDNSサーバを指定 IN NS dns.tokuji.com. 私はとくじさんに、も一つお願いしてる。 IN MX 10 mail.kallanet.com. localhost IN A 127.0.0.1 dns IN A 61.115.73.164 mail IN A 61.115.73.164 メールサーバはCNAMEで記述しない! www IN CNAME dns smtp IN CNAME dns pop IN CNAME dns proxy IN CNAME dns |
ページTOP |
| 4 kallanet.jp.zoneの設定 3と同じ要領で! $origin kallanet.jp. $TTL 86400 @ IN SOA dns.kallanet.jp. root.kallanet.jp. ( 2002092777 ; Serial no (yyyy/mm/dd/nn) 10800 ; Refresh after 1 hour 3600 ; Retry after 30 minutes 604800 ; Expire after 1 week 86400 ) ; Minimum TTL of 2 hours IN NS dns.kallanet.jp. IN NS ns2.granitecanyon.com. IN NS dns.tokuji.com. IN MX 10 mail.kallanet.jp. localhost IN A 127.0.0.1 dns IN A 61.115.73.164 mail IN A 61.115.73.164 www IN CNAME dns smtp IN CNAME dns pop IN CNAME dns proxy IN CNAME dns |
ページTOP |
| 5 e−kalla.zoneの設定 3と同じ要領で! $origin e-kalla.net. $TTL 86400 @ IN SOA dns.e-kalla.net. root.e-kalla.net. ( 2002100111 ; Serial no (yyyy/mm/dd/nn) 10800 ; Refresh after 1 hour 3600 ; Retry after 30 minutes 604800 ; Expire after 1 week 86400 ) ; Minimum TTL of 2 hours IN NS dns.e-kalla.net. IN NS ns2.granitecanyon.com. IN NS dns.tokuji.com. IN MX 10 mail.e-kalla.net. localhost IN A 127.0.0.1 dns IN A 61.115.73.164 mail IN A 61.115.73.164 www IN CNAME dns smtp IN CNAME dns pop IN CNAME dns proxy IN CNAME dns jomo IN CNAME dns ちょっと、バーチャルホストを実験中!! |
ページTOP |
| 6 kallanet.zone.revの設定 黄色部分は自分の環境で修正 $origin 164.73.115.61.in-addr.arpa. $TTL 86400 @ IN SOA dns.kallanet.com. root.kallanet.com. ( 2002092777 ; Serial no (yyyy/mm/dd/nn) 10800 ; Refresh after 1 hour 3600 ; Retry after 30 minutes 604800 ; Expire after 1 week 86400 ) ; Minimum TTL of 2 hours IN NS dns.kallanet.com. IN NS ns2.granitecanyon.com. IN NS dns.tokuji.com. IN PTR kallanet.com. 164 IN PTR dns.kallanet.com. |
ページTOP |
| 7 ルーターの設定 ???,xxx部分は自分の環境で修正 あまり自信ありませんけどコレで動いてます。 端末型/ネットワーク型どちらか悩みましたが、端末型にしてあります。 # tftpで取得や更新を行うための設定情報です。
# この設定をルータに再設定する場合には、tftpクライアントをご利用ください。
# RTシリーズ専用RT-Tftp(RTユーティリティ)は、以下のURLから入手可能です。
# http://www.rtpro.yamaha.co.jp/RT/utility/index.html
# RTA50i Rev.3.05.40 (beta version) (Mon Apr 9 21:18:00 2001)
# MAC Address : 00:a0:de:03:7b:1a
# Memory 4Mbytes, 1LAN, 1BRI
#
# Reporting Date: Oct 6 01:50:19 2002
# If you want to clear ALL configuration to default,
# remove `#' of next line.
#clear configuration
#dhcp service off
#dhcp delete scope 1
#analog supplementary-service clear
#
# System configuration
#
login password ????????
administrator password ????????
console lines infinity
#
# ISDN configuration
#
remote setup accept none
### BRI 1 ###
isdn local address 0000000000
#
# IP filter configuration
#
ip filter 1 reject * * udp,tcp 135,netbios_ns-netbios_ssn *
ip filter 2 reject * * udp,tcp * 135,netbios_ns-netbios_ssn
ip filter 3 restrict * * tcpfin * www,ftp,nntp
ip filter 4 restrict * * tcprst * www,ftp,nntp
ip filter 5 pass 210.173.160.27 192.168.0.1 udp ntp ntp
ip filter 6 reject * * udp,tcp 445 *
ip filter 10 reject 192.168.0.0/24 * * * *
ip filter 11 pass * 192.168.0.0/24 icmp * *
ip filter 12 pass * 192.168.0.0/24 established * *
ip filter 13 pass * 192.168.0.0/24 tcp,udp * domain,ident
ip filter 14 pass * 192.168.0.0/24 tcp ftpdata *
ip filter 15 pass * 192.168.0.0/24 udp domain *
ip filter 16 pass * 192.168.0.0/24 tcp * smtp,www,pop3,1024-65535
ip filter 17 reject * * udp,tcp netbios_ns-netbios_ssn *
ip filter 18 reject * * udp,tcp * netbios_ns-netbios_ssn
ip filter 40 pass * 192.168.0.2 tcp * www
ip filter 41 pass * 192.168.0.2 tcp * domain
ip filter 42 pass * 192.168.0.2 udp * domain
ip filter 43 pass * 192.168.0.2 tcp * smtp
ip filter 44 pass * 192.168.0.2 tcp * pop3
ip filter 45 pass * 192.168.0.2 tcp * ident
ip filter 80 reject 10.0.0.0/8 * * * *
ip filter 81 reject * 10.0.0.0/8 * * *
ip filter 82 reject 172.16.0.0/12 * * * *
ip filter 83 reject * 172.16.0.0/12 * * *
ip filter 98 pass * 192.168.0.2 tcp,udp * domain
ip filter 100 pass * * * * *
#
# IP configuration
#
ip filter source-route on
ip filter directed-broadcast on
#
# LAN/IP configuration
#
ip lan address 192.168.0.1/24
ip lan routing protocol none
ip lan secure filter in 1 2 100
ip route default gateway pp 1 metric 1
ip route 210.173.160.27 gateway pp 1
#
# Provider Type configuration
#
provider type isdn-terminal
#
# PP configuration
#
pp disable all
### PP 1 ###
pp select 1
pp name PRV/1/1/0:??????
isdn remote address call ??????????
|
ページTOP |
| 8 TIPS 受け売りですが、やってみましょう! (1)無駄なパケットがDNSをおびやかす。 世界に13台ある、ルートサーバの一つの「Mroot」、これは東京大学情報基盤センターにあるそうですが、無駄なパケットが無数に飛び込んでくるのをこう表現したそうです。 jpドメインではマルチプロセッサ構成のサーバ6台で、それぞれ毎秒500〜600クエリを処理している、これがルートサーバになると6000クエリ以上になるとのこと!、 DNSの基本的な設定ミスも必要のないクエリを増やしてしまう。誤りやすいのはMXレコードでCNAMEを記述が多いそうです。たとえば、 nantara.com IN MX mail mail IN CNAME ns ns IN A xxx.xxx.xxx.xxx これは余計な問い合わせと応答が増える! nantara.com IN MX mail mail IN A xxx.xxx.xxx.xxx ns IN A xxx.xxx.xxx.xxx これが正しい設定。 ※出典:日経バイト2002/10より 他のサイトでも同様の指摘がありました。 私も早速直しました。 (2)BINDのバージョンを隠す! 出典:ZDnet Tips for Linux クラッキングの手口として、まずバージョンを確認しておこなうことがあるそうで、不用意に情報公開をしない! named.confに以下を追加する。 緑部分 options { directory "/var/named"; allow-query { localhost }; auth-nxdomain yes; version ""; }; その後、namedを再起動 # /etc/rc.d/init.d/named restart |
ページTOP |
![]()