Contents

DNSの設定

nsdの場合

# apt-get install nsd
# cd /etc/nsd
# mkorg nsd.zones
# diff nsd.zones nsd.zones.org →こうなるように設定
< zone  example.com    example.com
# cat example.com →こんなファイルを作る
$TTL    3600    ; Default TTL
$ORIGIN example.com.
@       IN SOA ns (
        postmaster
        2005072101      ; Serial
        3600            ; Refresh
        900             ; Retry
        604800          ; Expire
        3600 )          ; Negative cache TTL
        IN      NS      ns
        IN      MX      10 ns
        IN      A       192.0.34.166
ns      IN      A       192.0.34.166
www     IN      A       192.0.34.166
# cat Makefile →こんなMakefileを作っておく
all:
        -/etc/init.d/nsd rebuild
        -/etc/init.d/nsd reload
# make
/etc/init.d/nsd rebuild
zonec: reading zone "example.com".
zonec: processed 7 RRs in "example.com".

zonec: done with 0 errors.
/etc/init.d/nsd reload
Reloading domain name service: nsd.
* DNSの動作確認
 # apt-get install host
 # host -a example.com localhost
* 参考
- [http://www.net-squares.com/user/shin/sec2005/dnscheck.html DNS問い合わせ]
Last modified: 2006-09-05