
Ubuntu日本語フォーラム
ログインしていません。
IPv4 onlyにしたいことと、chroot環境で動かしたいことから/etc/default/bind9にOPTIONSの記述を入れました。
しかし、-4 -t 共に有効になりません。
無理やりに/etc/init.d/bind9に記述してみましたが、それも有効になりませんでした。
どのファイルをどのように記述すれば動作するようになるのでしょうか。
とりあえず下記のように手動で動かした場合は -4 オプションで動作しています。
/usr/sbin/named -f -u bind -4
/etc/default/bind9 の記述
OPTIONS="-4 -u bind -t /var/chroot/bind"
syslog での起動時のログ
starting BIND 9.10.3-P4-Ubuntu <id:ebd72b3> -f -u bind built with '--prefix=/usr' '--mandir=/usr/share/man' '--libdir=/usr/lib/x86_64-linux-gnu' '--infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--localstatedir=/' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-geoip=/usr' '--with-atf=no' '--enable-ipv6' '--enable-rrl' '--enable-filter-aaaa' '--enable-native-pkcs11' '--with-pkcs11=/usr/lib/x86_64-linux-gnu/softhsm/libsofthsm2.so' 'CFLAGS=-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -fno-strict-aliasing -fno-delete-null-pointer-checks -DNO_VERSION_DATE' 'LDFLAGS=-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2 -DDIG_SIGCHASE' ---------------------------------------------------- BIND 9 is maintained by Internet Systems Consortium, Inc. (ISC), a non-profit 501(c)(3) public-benefit corporation. Support and training for BIND 9 are available at https://www.isc.org/support ---------------------------------------------------- ・・・略・・・
syslog での手動起動時のログ
starting BIND 9.10.3-P4-Ubuntu <id:ebd72b3> -f -u bind -4 built with '--prefix=/usr' '--mandir=/usr/share/man' '--libdir=/usr/lib/x86_64-linux-gnu' '--infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--localstatedir=/' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-geoip=/usr' '--with-atf=no' '--enable-ipv6' '--enable-rrl' '--enable-filter-aaaa' '--enable-native-pkcs11' '--with-pkcs11=/usr/lib/x86_64-linux-gnu/softhsm/libsofthsm2.so' 'CFLAGS=-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -fno-strict-aliasing -fno-delete-null-pointer-checks -DNO_VERSION_DATE' 'LDFLAGS=-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2 -DDIG_SIGCHASE' ---------------------------------------------------- BIND 9 is maintained by Internet Systems Consortium, Inc. (ISC), a non-profit 501(c)(3) public-benefit corporation. Support and training for BIND 9 are available at https://www.isc.org/support ---------------------------------------------------- ・・・略・・・
環境
Ubuntu 16.04 LTS
BIND 9.10.3-P4-Ubuntu(パッケージでインストールしました)
以前から気になっていたので、多分Ubuntu 15.10(BIND 9.9.5-11ubuntu1.3-Ubuntu)でも同じだったと思います。
オフライン
systemd を override しちゃうのはどうでしょう
$ sudo systemctl edit bind9
:
[Service]
ExecStart=
ExecStart=/usr/sbin/named -4 -f -u bind
:
$ sudo systemctl daemon-reload
$ sudo systemctl restart bind9
みたいな?
オフライン
ご回答有り難うございます。
ご指摘のように systemd を override しちゃうことにしました。
きちんと-4で起動してきました。ありがとうございました。
やっぱり /etc/default/bind9 は skip されてしまうんですかね。
もう少し綺麗な構造になれば(正当な方法で対処できれば)良いのですが。
オフライン