14
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

VPCフローログの中身を見てみよう

Posted at

そもそもVPCフローログとは?

VPC、ネットワークインターフェイスやサブネットとの間で行き来するトラフィックに関する情報をキャプチャできるようにする機能で
CloudWatch Logs か s3で発行できます。

VPCフローログの詳細は こちら をごらんください

VPCフローログの中身を見てみよう

VPCフローログはcloudwatchのロググループで確認することが出来ます。

2021-05-181CloudWatch Management Console - Google Chrome 2021.png

中身は以下のようなものが出ています。

タイムスタンプ                       メッセージ
2021-05-17T22:48:43.000+09:00    2 XXXXXXXXX eni-aaaaaaa xx.xx.xx.xx 10.0.0.1 123 40658 17 1 76 xxxxxxxxxx xxxxxxxxxx ACCEPT OK

↑の中身の形式としては以下になります。
これはVPCフローログを設定する際にAWS のデフォルト形式として設定されているものです。

${version} ${account-id} ${interface-id} ${srcaddr} ${dstaddr} ${srcport} ${dstport} ${protocol} ${packets} ${bytes} ${start} ${end} ${action} ${log-status}
  • ${version} : VPCフローログのバージョン
  • ${account-id} : AWSアカウントのID
  • ${interface-id} : ネットワークインターフェイスのID
  • ${srcaddr} : 送信元IPアドレス
  • ${dstaddr} : 送信先IPアドレス
  • ${srcport} : 送信元ポート
  • ${dstport} : 送信先ポート
  • ${protocol} : プロトコルの番号
  • ${packets} : パケットの数
  • ${bytes} : バイト数
  • ${start} : 開始時刻(unixtime)
  • ${end} : 終了時刻(unixtime)
  • ${action} : アクション(ACCEPT or REJECT)
  • ${log-status} : ログ(OK or NODATA or SKIPDATA)

上記を踏まえて再度メッセージを確認します

2                           XXXXXXXXX             eni-aaaaaaa             xx.xx.xx.xx     10.0.0.1      123         40658          17              1         76      xxxxxxxxxx   xxxxxxxxxx    ACCEPT     OK
VPCフローログのバージョン   AWSアカウントのID   ネットワークインターフェイスのID     送信元IP      送信先IP   送信元ポート  送信先ポート  プロトコルの番号 パケットの数  バイト数     開始時刻      終了時刻     アクション  ログ

勉強後イメージ

わかるけど...そのまま見るのは難しい。。。

参考

14
5
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
14
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?