
ゾーン付きファイル
私の/etc/bind/db.piduna.org
;
; BIND data file for local loopback interface
;
$TTL 604800
$ORIGIN piduna.org.
@ IN SOA ns1.piduna.org. root.piduna.org. (
2018031701 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns1.piduna.org.
@ IN NS ns2.piduna.org.
@ IN A 192.168.110.15
ns1 IN A 192.168.110.15
ns2 IN A 192.168.110.14
abc100 IN A 192.168.110.1
abc101 IN A 192.168.110.2
abc102 IN A 192.168.110.3
abc103 IN A 192.168.110.4
abc104 IN A 192.168.110.5
abc105 IN A 192.168.110.6
abc106 IN A 192.168.110.7
abc107 IN A 192.168.110.8
abc108 IN A 192.168.110.9
abc109 IN A 192.168.110.10
abc110 IN A 192.168.110.11
abc111 IN A 192.168.110.12
abc112 IN A 192.168.110.13
abc113 IN A 192.168.110.14
abc114 IN A 192.168.110.15
gitlab IN A 192.168.110.14
redmine IN A 192.168.110.14
* IN CNAME piduna.org.
192.168.110.*
もちろん、実際の IP アドレスではありません。代わりに、VPS-S の実際の IP アドレスを使用しています。
私の/etc/bind/named.conf.local
:
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "abchosting.org" {
type master;
file "/etc/bind/db.piduna.org";
};
私の/etc/bind/named.conf.options
:
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
listen-on port 53 {
127.0.0.1;
192.168.110.15;
};
forwarders {
8.8.8.8;
8.8.4.4;
};
//========================================================================
// If BIND logs error messages about the root key being expired,
// you will need to update your keys. See https://www.isc.org/bind-keys
//========================================================================
dnssec-validation auto;
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { none; };
};
それで、私はそれをテストしました。すべて正常です。動作します。しかし、私の設定に疑問があります /etc/bind/db.piduna.org
。すべて正常ですか。セキュリティに関するアドバイスはありますか? 繰り返しますが、私はこれを外部ドメイン用に作成しました。必要なもの:
- VPS 用の 15 個の A レコード。
- Gitlab や Redmine などのサービス用の 2 個の A レコード。
- 192.168.110.15 からのサブドメインへの ping
ご理解とご協力に感謝いたします。
答え1
テストしたとのことですが、具体的に何をしましたか?named-checkzone
オンラインのトラブルシューティング ツールなどはありますか?
何を疑問に思っているのですか? 質問が広すぎます。どのようなセキュリティについて話しているのですか?
しかし、さまざまな問題が見られます:
- ワイルドカードレコードを使用しています。本当に必要ですか?必要でない場合は、解決策よりもはるかに多くの問題を引き起こすため、削除することをお勧めします。
- ゾーンを定義しているので権威ネームサーバーがあるように見えますが、ローカル/内部 IP アドレスのみをリッスンします。これは、グローバルに到達可能ではない (権威ネームサーバーとしては好ましくない) ことを意味しますか、それともその前に NAT セットアップがある (これもネームサーバーとしては非常に好ましくない) ことを意味しますか?
- つまり、権威あるネームサーバーがあるようですが、クエリを外部に転送しています。同じサーバーで再帰機能と権威機能を混在させているようですが、これはセキュリティの観点から非常に悪い考えです(また、いずれにしても、Google Public DNS に転送することはセキュリティの観点から良い考えではないとも言えます。独自のローカル再帰ネームサーバーを用意する必要があります)。