LoginSignup
0
0

More than 1 year has passed since last update.

インターネットからの接続を受け付けるサーバーは IP だけではなく Port 番号も記録しておくことが推奨される — あるいは RFC 6302 : Logging Recommendations for Internet-Facing Servers の紹介

Posted at

IP だけ記録して『これで何があっても最悪警察に通報すればなんとかなる』というとそうでは無い話。

結論:ポート番号も記録するのだ。nginx なら $remote_port に値が入っている。

RFC 6302 : Logging Recommendations for Internet-Facing Servers

インターネット Facing なサーバーでどのようなログを取ることが推奨されるのかちゃんと書いてある資料

It is RECOMMENDED as best current practice that Internet-facing
 servers logging incoming IP addresses from inbound IP traffic also
 log:
 o The source port number.
 o A timestamp, RECOMMENDED in UTC, accurate to the second, from a
   traceable time source (e.g., NTP [RFC5905]).
 o The transport protocol (usually TCP or UDP) and destination port
   number, when the server application is defined to use multiple
   transports or multiple ports.

現在のベストプラクティスとして、インターネットに面したサーバーは、受信IPトラフィックから受信IPアドレスをログする際に、以下のログも取ることが推奨されます。

  • source port number.
  • timestamp.
  • transport protocol (TCP / UDP 両方で受け付ける場合)

総務省の資料

https://www.soumu.go.jp/main_content/000360558.pdf
image.png
image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0