セキュリティいろいろ

Title

オープンリゾルバ対策

キャッシュサーバとして動作している DNS サーバのうち、所属するネットワークの外から名前解決の問い合わせに応答する。DNS キャッシュポイズニング・DNS amp 攻撃の踏み台。
BIND なら、次のファイルを編集することで解決。
/etc/named.conf
 options {
     recursion no; // リゾルバとして動作しない
     allow-query-cache { none; }; // キャッシュの内容を返さない
 }
もしくは、
/etc/named.conf
 view "external" {
     ...
     recursion no; // リゾルバとして動作しない
     ...
 }
とか。

オープンリレー対策

メールの踏み台などに使われる。第三者が、内部のメールサーバを使用して外部の人へメールを送れるようにすること。
この設定は確認しておらず、 自信がないので要確認
信用しないようにしてください。ただのメモです。
/etc/postfix/main.cf
smtpd_helo_required = yes
disable_vrfy_command = yes
strict_rfc821_envelopes = yes
allow_percent_hack = yes
swap_bangpath = yes
allow_untrusted_routing = no


# smtpd_client_restrictions = permit_mynetworks, check_client_access hash:/etc/postfix/restrict_clients, reject_unknown_client, permit これをするとメール送信できなくなった
smtpd_client_restrictions = permit_mynetworks, reject_unknown_client, permit
smtpd_helo_restrictions = permit_mynetworks, reject_invalid_hostname, reject_unknown_client, permit
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, permit_auth_destination, reject
smtpd_sender_restrictions = reject_unknown_sender_domain
smtpd_etrn_restrictions = permit_mynetworks, reject_invalid_hostname

NTP による DDoS 対策

下記の URL からその問題に飛べます。
https://www.jpcert.or.jp/at/2014/at140001.html
開発版の適用が難しいなら以下の一行を指定のファイルに追加。
/etc/ntp.conf
disable monitor

今後のTODO

  • log を効率的に見る手段を調べる/考える
  • そもそも基本的な Web サービスの運用がわかっていない感じ
  • サーバの状態を調べるコマンドの復習。 netstat とか
  • 気軽にスナップショットを取る、もしくは切り戻せる仕組みを作れれば面白いかも

参考

http://oxynotes.com/?p=634
オープンリレー参考 :http://www.criterion.sc/sub_notes/Postfix_Security.html)

コメント

このブログの人気の投稿

相互インクルード対策

make error "Circular"

gdb操作