はじめに
Vvyatta は Debian がベースのため、Debian で管理されているパッケージソフトウェアをインストールして利用する事が可能です。以下は、オープンソースの DNS キャッシュサーバー:Unbound をインストールする際の手順例です。※Unbound の詳細についてはこちらをご参照ください。
Unbound インストール手順
リポジトリを追加します。
vyatta@vyatta:~$ configure vyatta@vyatta# set system package repository debian components main vyatta@vyatta# set system package repository debian distribution squeeze vyatta@vyatta# set system package repository debian url http://http.us.debian.org/debian vyatta@vyatta# commit Adding new entry to /etc/apt/sources.list...
vyatta@vyatta# show system package repository community { components main distribution stable url http://packages.vyatta.com/vyatta } repository debian { components main distribution squeeze url http://http.us.debian.org/debian } [edit]
Root に切り替えます。
vyatta@vyatta# sudo su -
パッケージをアップグレードします。
root@vyatta:~# sudo apt-get update
Unbound をインストールします。
root@vyatta:~# sudo apt-get install unbound
サービスを Listen するインターフェースを指定します。
/etc/unbound/unbound.conf 37行目~
# specify the interfaces to answer queries from by ip-address. # The default is to listen to localhost (127.0.0.1 and ::1). # specify 0.0.0.0 and ::0 to bind to all available interfaces. # specify every interface[@port] on a new 'interface:' labelled line. # The listen interfaces are not changed on reload, only on restart. interface: 0.0.0.0
アクセスを許可するネットワークを指定します。
/etc/unbound/unbound.conf 161行目~
# By default everything is refused, except for localhost. # Choose deny (drop message), refuse (polite error reply), # allow (recursive ok), allow_snoop (recursive and nonrecursive ok) # access-control: 0.0.0.0/0 refuse access-control: 10.0.0.0/8 allow
A レコードを設定します。
/etc/unbound/unbound.conf 429行目~
# You can redirect a domain to a fixed address with # (this makes example.com, www.example.com, etc, all go to 192.0.2.3) # local-zone: "example.com" redirect # local-data: "example.com A 192.0.2.3" local-data: "example.org A 10.10.10.10"
resolv.conf を設定します。
root@vyatta:/etc/unbound# cat /etc/resolv.conf nameserver 127.0.0.1
以上