<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>2008/10/27 on Yano&#39;s digital garage</title>
    <link>https://www.bravotouring.com/~yano/archives/2008/10/27/</link>
    <description>Recent content in 2008/10/27 on Yano&#39;s digital garage</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 27 Oct 2008 21:39:34 +0900</lastBuildDate>
    <atom:link href="https://www.bravotouring.com/~yano/archives/2008/10/27/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>unbound導入</title>
      <link>https://www.bravotouring.com/~yano/diary/it/20081027unbound.htm</link>
      <pubDate>Mon, 27 Oct 2008 21:39:34 +0900</pubDate>
      <guid>https://www.bravotouring.com/~yano/diary/it/20081027unbound.htm</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.bravotouring.com/~yano/diary/it/20081024dns.htm&#34;&gt;こないだ設定したローカルDNS&lt;/a&gt;の件だが、何気に見た&lt;a href=&#34;http://www.atmarkit.co.jp/flinux/special/unbound/unbounda.html&#34; target=&#34;SubWindow&#34;&gt;＠ITの記事&lt;/a&gt;でオープンソースの&lt;a href=&#34;http://unbound.net/&#34; target=&#34;SubWindow&#34;&gt;&lt;span class=&#34;Software&#34;&gt;Unbound&lt;/span&gt;&lt;/a&gt;というDNSリゾルバの存在を知った。&lt;/p&gt;&#xA;&lt;p&gt;今使っている&lt;span class=&#34;Software&#34;&gt;djbdns&lt;/span&gt;も決して悪くはないのだが、&#xA;&lt;ul&gt;&#xA;&lt;li&gt;IPv4、IPv6デュアルスタック&lt;/li&gt;&#xA;&lt;li&gt;DNSSEC(secure DNS)対応&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;という2点で、&lt;span class=&#34;Software&#34;&gt;djbdns&lt;/span&gt;を上回る。&lt;/p&gt;&#xA;&lt;p&gt;またローカル・ゾーンとして独自情報を定義する事もできるので&lt;a href=&#34;http://unbound.net/&#34; target=&#34;SubWindow&#34;&gt;&lt;span class=&#34;Software&#34;&gt;Unbound&lt;/span&gt;&lt;/a&gt;だけで&lt;span class=&#34;Software&#34;&gt;dnscache&lt;/span&gt;と内向け&lt;span class=&#34;Software&#34;&gt;tinydns&lt;/span&gt;を代替できる事になり、しかもこの独自情報では&lt;span class=&#34;Warning&#34;&gt;ドメイン名を付与しないホスト名&lt;/span&gt;を含めて解決できそうなのでしてやったり。&lt;/p&gt;&#xA;&lt;p&gt;というわけで、ソースをダウンロードしてビルド。取り敢えず&lt;span class=&#34;Software&#34;&gt;SSL&lt;/span&gt;だけ有効にしておいた。&#xA;&lt;blockquote class=&#34;Log&#34;&gt;&#xA;$ wget http://www.unbound.net/downloads/unbound-1.0.2.tar.gz&lt;br/&gt;&#xA;$ tar xvfz unbound-1.0.2.tar.gz&lt;br/&gt;&#xA;$ cd unbound-1.0.2/&lt;br/&gt;&#xA;$ ./configure --with-ssl=/usr/&lt;br/&gt;&#xA;$ make&lt;br/&gt;&#xA;$ sudo make install&#xA;&lt;/blockquote&gt;&#xA;次に、unboundユーザーとグループを追加。/usr/local/etc/unboundを/var/unbound/配下に移動し、/etcにもシンボリックリンク。&#xA;&lt;blockquote class=&#34;Log&#34;&gt;&#xA;$ sudo groupadd unbound&lt;br/&gt;&#xA;$ sudo useradd -d /var/unbound -m -g unbound -s /bin/false unbound&lt;br/&gt;&#xA;$ sudo mkdir /var/unbound/etc&lt;br/&gt;&#xA;$ sudo mv /usr/local/etc/unbound /var/unbound/etc/&lt;br/&gt;&#xA;$ sudo chown -R unbound:unbound /var/unbound/&lt;br/&gt;&#xA;$ sudo ln -s /var/unbound/etc/unbound /etc/&#xA;&lt;/blockquote&gt;&lt;/p&gt;&#xA;&lt;p&gt;続いて&lt;span class=&#34;Path&#34;&gt;/etc/unbound/unbound.conf&lt;/span&gt;の下記箇所を変更。local-zoneで&lt;span class=&#34;Topics&#34;&gt;static&lt;/span&gt;を指定し、local-dataでAレコードを列挙しているのが簡易DNSの設定。&#xA;&lt;blockquote class=&#34;Log&#34;&gt;&#xA;--- ~/unbound-1.0.2/doc/example.conf  2008-10-27 20:24:09.000000000 +0900&lt;br/&gt;&#xA;+++ /etc/unbound/unbound.conf   2008-10-27 22:48:18.000000000 +0900&lt;br/&gt;&#xA;@@ -33,6 +33,7 @@&lt;br/&gt;&#xA;        # interface: 192.0.2.153&lt;br/&gt;&#xA;        # interface: 192.0.2.154&lt;br/&gt;&#xA;        # interface: 2001:DB8::5&lt;br/&gt;&#xA;+interface: 192.168.199.1&lt;br/&gt;&#xA;&lt;br/&gt;&#xA;        # enable this feature to copy the source address of queries to reply.&lt;br/&gt;&#xA;        # Socket options not be supported on all platforms. experimental.&lt;br/&gt;&#xA;@@ -140,6 +141,8 @@&lt;br/&gt;&#xA;        # access-control: ::0/0 refuse&lt;br/&gt;&#xA;        # access-control: ::1 allow&lt;br/&gt;&#xA;        # access-control: ::ffff:127.0.0.1 allow&lt;br/&gt;&#xA;+access-control: 127.0.0.0/8 allow&lt;br/&gt;&#xA;+access-control: 192.168.199.0/24 allow&lt;br/&gt;&#xA;&lt;br/&gt;&#xA;        # if given, a chroot(2) is done to the given directory.&lt;br/&gt;&#xA;        # i.e. you can chroot to the working directory, for example,&lt;br/&gt;&#xA;@@ -163,6 +166,7 @@&lt;br/&gt;&#xA;        #&lt;br/&gt;&#xA;        # If you give &#34;&#34; no chroot is performed. The path must not end in a /.&lt;br/&gt;&#xA;        # chroot: &#34;/usr/local/etc/unbound&#34;&lt;br/&gt;&#xA;+chroot: &#34;/var/unbound&#34;&lt;br/&gt;&#xA;&lt;br/&gt;&#xA;        # if given, user privileges are dropped (after binding port),&lt;br/&gt;&#xA;        # and the given username is assumed. Default is user &#34;unbound&#34;.&lt;br/&gt;&#xA;@@ -173,6 +177,7 @@&lt;br/&gt;&#xA;        # relative to this directory. If you give &#34;&#34; the working directory&lt;br/&gt;&#xA;        # is not changed.&lt;br/&gt;&#xA;        # directory: &#34;/usr/local/etc/unbound&#34;&lt;br/&gt;&#xA;+directory: &#34;&#34;&lt;br/&gt;&#xA;&lt;br/&gt;&#xA;        # the log file, &#34;&#34; means log to stderr.&lt;br/&gt;&#xA;        # Use of this option sets use-syslog to &#34;no&#34;.&lt;br/&gt;&#xA;@@ -184,6 +189,7 @@&lt;br/&gt;&#xA;&lt;br/&gt;&#xA;        # the pid file.&lt;br/&gt;&#xA;        # pidfile: &#34;/usr/local/etc/unbound/unbound.pid&#34;&lt;br/&gt;&#xA;+pidfile: &#34;/var/unbound/unbound.pid&#34;&lt;br/&gt;&#xA;&lt;br/&gt;&#xA;        # file to read root hints from.&lt;br/&gt;&#xA;        # get one from ftp://FTP.INTERNIC.NET/domain/named.cache&lt;br/&gt;&#xA;@@ -330,6 +336,21 @@&lt;br/&gt;&#xA;        # (this makes example.com, www.example.com, etc, all go to 192.0.2.3)&lt;br/&gt;&#xA;        # local-zone: &#34;example.com&#34; redirect&lt;br/&gt;&#xA;        # local-data: &#34;example.com A 192.0.2.3&#34;&lt;br/&gt;&#xA;+local-zone: &#34;bravotouring.com&#34; static&lt;br/&gt;&#xA;+local-data: &#34;bravotouring.com IN A 192.168.199.1&#34;&lt;br/&gt;&#xA;+local-data: &#34;www.bravotouring.com IN A 192.168.199.1&#34;&lt;br/&gt;&#xA;+local-data: &#34;mail.bravotouring.com IN A 192.168.199.1&#34;&lt;br/&gt;&#xA;+local-data: &#34;ns1.bravotouring.com IN A 192.168.199.1&#34;&lt;br/&gt;&#xA;+local-data: &#34;ns2.bravotouring.com IN A 192.168.199.1&#34;&lt;br/&gt;&#xA;+local-data: &#34;nx9030 IN A 192.168.199.1&#34;&lt;br/&gt;&#xA;+local-data: &#34;glantank IN A 192.168.199.2&#34;&lt;br/&gt;&#xA;+local-data: &#34;pavilion IN A 192.168.199.3&#34;&lt;br/&gt;&#xA;+local-data: &#34;HPC7180 IN A 192.168.199.7&#34;&lt;br/&gt;&#xA;+local-data: &#34;andromeda IN A 192.168.199.11&#34;&lt;br/&gt;&#xA;+local-data: &#34;vista IN A 192.168.199.12&#34;&lt;br/&gt;&#xA;+local-data: &#34;MacMini IN A 192.168.199.21&#34;&lt;br/&gt;&#xA;+local-data: &#34;ThinkPadT60 IN A 192.168.199.60&#34;&lt;br/&gt;&#xA;+local-data: &#34;router IN A 192.168.199.254&#34;&lt;br/&gt;&#xA;&lt;br/&gt;&#xA;&lt;br/&gt;&#xA; # Stub zones.&lt;/blockquote&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
