linux:bind_install
差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| linux:bind_install [2022/08/18 15:07] – [Zoneファイル] kimi | linux:bind_install [2022/08/23 13:34] (現在) – 外部編集 127.0.0.1 | ||
|---|---|---|---|
| 行 2: | 行 2: | ||
| 最近のトレンドは権威サーバとキャッシュサーバの分離。KVMで2台DNSサーバ立てることにするとそれぞれ単体で設定すればよいので、その方が単純かつセキュア。(まあ、単純なものほどセキュアなものだが)というのはわかっているのだけれど、もうこの歳になると覚えた時のようにやらないとどうもうまくいかない。三子の魂百までなのか雀百まで踊り忘れずなのかはよくわからんが。 | 最近のトレンドは権威サーバとキャッシュサーバの分離。KVMで2台DNSサーバ立てることにするとそれぞれ単体で設定すればよいので、その方が単純かつセキュア。(まあ、単純なものほどセキュアなものだが)というのはわかっているのだけれど、もうこの歳になると覚えた時のようにやらないとどうもうまくいかない。三子の魂百までなのか雀百まで踊り忘れずなのかはよくわからんが。 | ||
| - | 研究室の実際の設定はちょっと違うのだけれど、ここでは | + | 研究室の実際の設定はちょっと違うのだけれど、ここでは以下のような構成で設定する。 |
| - | |ローカルネットワーク| | + | ^ ローカルネットワーク |
| - | |ドメイン名| | + | | ドメイン |
| + | |DNSサーバ| ns1.local | 192.168.10.1| | ||
| ===== BINDのインストール ===== | ===== BINDのインストール ===== | ||
| インストールは'' | インストールは'' | ||
| 行 62: | 行 62: | ||
| ===== Zoneファイル ===== | ===== Zoneファイル ===== | ||
| <file txt / | <file txt / | ||
| + | $ORIGIN local. | ||
| + | $TTL 86400 | ||
| + | @ | ||
| + | 2022081801 | ||
| + | 21600 ; refresh after 6 hours | ||
| + | 3600 ; retry after 1 hour | ||
| + | 604800 | ||
| + | 86400 ) ; minimum TTL of 1 day | ||
| + | ; | ||
| + | ; | ||
| + | IN NS | ||
| + | ns1 | ||
| + | web | ||
| + | mail IN A 192.168.10.3 | ||
| + | client | ||
| </ | </ | ||
| + | |||
| + | <file txt / | ||
| + | $ORIGIN 10.168.192.in-addr.arpa. | ||
| + | $TTL 86400 | ||
| + | @ IN SOA ns1.local. | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | 86400 ) ; minimum TTL of 1 day | ||
| + | ; | ||
| + | @ IN NS | ||
| + | ; | ||
| + | 1 IN PTR ns1.local. | ||
| + | 2 IN PTR web.local. | ||
| + | 3 IN PTR mail.local. | ||
| + | 4 IN PTR client.local. | ||
| + | </ | ||
| + | |||
| + | ===== bindの起動 ===== | ||
| + | |||
| 設定ファイルのチェックをした後、bindを起動する。 | 設定ファイルのチェックをした後、bindを起動する。 | ||
| <code sh> | <code sh> | ||
| $ named-checkconf | $ named-checkconf | ||
| + | $ named-checkzone local db.local | ||
| + | zone local/IN: loaded serial 2022081801 | ||
| + | OK | ||
| + | $ named-checkzone 10.168.192.in-addr.arpa db.10.168.192.in-addr.arpa | ||
| + | zone 10.168.192.in-addr.arpa/ | ||
| + | OK | ||
| $ systemctl start named | $ systemctl start named | ||
| $ systemctl status named | $ systemctl status named | ||
| 行 72: | 行 114: | ||
| $ dig @localhost www.ee.ous.ac.jp | $ dig @localhost www.ee.ous.ac.jp | ||
| ... | ... | ||
| + | </ | ||
| + | 設定ファイルやZoneファイルを書き換えた後は、(**シリアル増やすの忘れんな!**) | ||
| + | <code sh> | ||
| + | $ systemctl restart named | ||
| </ | </ | ||
| - | ===== Setting-up BIND as Content Server ===== | + | |
| - | **Content Server**と書いて**権威サーバ**と読む。 | + | |
| ===== BIND = NSD + Unbound ===== | ===== BIND = NSD + Unbound ===== | ||
| 最近だとこんなのがいいらしい。 | 最近だとこんなのがいいらしい。 | ||
| 行 83: | 行 130: | ||
| * NSD | * NSD | ||
| * Unbound | * Unbound | ||
| - | ===== BINDのインストール ===== | ||
| - | <code sh> | ||
| - | kimi@sstw: | ||
| - | Formatting ' | ||
| - | virt-install \ | ||
| - | --name=sstx \ | ||
| - | --disk=images/ | ||
| - | --vcpus=2 --ram=2048 \ | ||
| - | --graphics vnc, | ||
| - | --cdrom iso/ | ||
| - | |||
| - | kimi@sstw: | ||
| - | WARNING | ||
| - | WARNING | ||
| - | |||
| - | Starting install... | ||
| - | Creating domain... | ||
| - | |||
| - | Domain is still running. Installation may be in progress. | ||
| - | Waiting for the installation to complete. | ||
| - | Domain has shutdown. Continuing. | ||
| - | Domain creation completed. | ||
| - | Restarting guest. | ||
| - | kimi@sstw: | ||
| - | |||
| - | kimi@sstb: | ||
| - | Hit:1 http:// | ||
| - | Hit:2 http:// | ||
| - | Hit:3 http:// | ||
| - | Hit:4 http:// | ||
| - | Reading package lists... Done | ||
| - | Building dependency tree... Done | ||
| - | Reading state information... Done | ||
| - | All packages are up to date. | ||
| - | kimi@sstb: | ||
| - | Reading package lists... Done | ||
| - | Building dependency tree... Done | ||
| - | Reading state information... Done | ||
| - | Calculating upgrade... Done | ||
| - | 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. | ||
| - | kimi@sstb: | ||
| - | kimi@sstb: | ||
| - | |||
| - | / | ||
| - | // This is the primary configuration file for the BIND DNS server named. | ||
| - | // | ||
| - | // Please read / | ||
| - | // structure of BIND configuration files in Debian, *BEFORE* you customize | ||
| - | // this configuration file. | ||
| - | // | ||
| - | // If you are just adding zones, please do that in / | ||
| - | |||
| - | include "/ | ||
| - | include "/ | ||
| - | include "/ | ||
| - | vi named.conf | ||
| - | cp: cannot create regular file ' | ||
| - | cp: cannot create regular file ' | ||
| - | cp: cannot create regular file ' | ||
| - | cp: cannot create regular file ' | ||
| - | |||
| - | |||
| - | kimi@sstb:/ | ||
| - | ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units === | ||
| - | Authentication is required to restart ' | ||
| - | Authenticating as: Kiminori Kakitani (kimi) | ||
| - | Password: | ||
| - | ==== AUTHENTICATION COMPLETE === | ||
| - | kimi@sstb:/ | ||
| - | |||
| - | |||
| - | </ | ||
linux/bind_install.1660802820.txt.gz · 最終更新: (外部編集)