dnsmasqで軽量な簡易DNSサーバ設置

DNSの簡易サーバで運用してきましたが、今回Debian-linuxの変更に合わせ
メンテナンスや設定に手間のかからない、という事でdnsmasqを継続導入した。

dnsmasqで簡易DNSサーバー(修正を含め)導入します。
■dnsmasqのインストールです。
~]# apt-get install dnsmasq

■設定ファイルの編集を行った。
○オリジナルの設定ファイルのバックアップをします。
# cp /etc/dnsmasq.conf /etc/dnsmasq.conf.org
(オリジナルをバックアップした後、編集します。)

–dnsmasq.confの編集
# vi /etc/dnsmasq.conf

# Listen on this specific port instead of the standard DNS port
# (53). Setting this to zero completely disables DNS function,
# leaving only DHCP and/or TFTP.
port=53
# The following two options make you a better netizen, since they
# tell dnsmasq to filter out queries which the public DNS cannot
# answer, and which load the servers (especially the root servers)
# unnecessarily. If you have a dial-on-demand link they also stop
# these requests from bringing up the link unnecessarily.

# Never forward plain names (without a dot or domain part)
domain-needed
# Never forward addresses in the non-routed address spaces.
bogus-priv
# Change this line if you want dns to get its upstream servers from
# somewhere other that /etc/resolv.conf
resolv-file=/etc/dnsmasq.resolv.conf
# By  default,  dnsmasq  will  send queries to any of the upstream
# servers it knows about and tries to favour servers to are  known
# to  be  up.  Uncommenting this forces dnsmasq to try each query
# with  each  server  strictly  in  the  order  they   appear   in
# /etc/resolv.conf
strict-order
# Add other name servers here, with domain specs if they are for
# non-public domains.
server=/laputa.example.com/192.168.2.254
# Add routing PTR queries to nameservers
server=/2.168.192.in-addr.arpa/192.168.2.254
# Add local-only domains here, queries in these domains are answered
#local=/localnet/
local=/laputa.example.com/

# /etc/dnsmasq.resolv.conf
# 上位ISPのDNSサーバ
nameserver 8.8.8.8

# /etc/resolv.conf
domain laputa.example.com
nameserver 127.0.0.1

~]# apt-get install bind-utils  これが必要だったような?

–dnsmasq 再起動
$ sudo service dnsmasq start

不足な点は調べてね。 _0_

以下を参照です。

dnsmasqで始めるプライベートDNSサーバ
dnsmasqで簡易DNSサーバー
自宅に内部DNSサーバー構築