mosakabe @ ウィキ
DNSサーバ設定
最終更新:
mosakabe
-
view
DNSサーバ設定
正引き /etc/bind/totto.local
$TTL 86400 @ IN SOA totto.local. ns.totto.local.( 2011102700 ; Serial 28800 ; Refresh 14400 ; Retry 3600000 ; Expire 86400 ) ; Minimum ; IN NS ns.totto.local. IN A 192.168.11.1 ns IN A 192.168.11.1 www IN A 192.168.11.100 google IN A 74.125.31.106
逆引き /etc/bind/11.168.192.in-addr.arpa
$TTL 86400 @ IN SOA shiten.info. ns.totto.local.( 2011102700 ; Serial 28800 ; Refresh 14400 ; Retry 3600000 ; Expire 86400 ) ; Minimum IN NS ns.totto.local. 100 IN PTR www.totto.local.
BIND9 を再起動します。
$ sudo /etc/init.d/bind9 restart * Stopping domain name service... bind9 [ OK ] * Starting domain name service... bind9 [ OK ]
各サーバ設定
各サーバのDNSを変更するために /etc/resolv.conf を編集します。
nameserver 192.168.11.100 search totto.local
search に totto.local を指定したことで、ネットワーク内ではwww.totto.local を www だけで引くことができます。
/etc/resolv.conf を編集した場合は、 networking を再起動します。
$ sudo /etc/init.d/networking restart * Reconfiguring network interfaces... ssh stop/waiting ssh start/running, process 3287 [ OK ]
最後に nslookup で反映されているか確認します。
$ nslookup www Server: 192.168.11.100 Address: 192.168.11.100#53 Name: www.totto.local Address: 192.168.11.100
以下広告