3
4

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 5 years have passed since last update.

Windows上のWireSharkでリモートのLinuxのtcpdumpをリアルタイムで表示する

Last updated at Posted at 2020-05-02

概要

  • Windows上でWireSharkを起動し、リモートのLinuxのtcpdumpの結果をリアルタイムで表示する
    • SSHトンネルでリモートのtcpdumpの結果をWireSharkの入力にリダイレクト(?)する

remote-captya.png

方法

前提

確認環境

  • Windows 10 64bit
    • WireShark 3.2.3
  • Amazon Linux release 2 (Karoo)
    • tcpdump version 4.9.2

条件

  • Windowsからコマンドプロンプトで対象のLinuxにsshできる
  • 対象のWindowsにWireSharkがインストールされている
    • コマンドプロンプトで wireshark が実行できる
  • 対象のLinuxにtcpdumpがインストールされている

コマンド

  • コマンドプロンプトで以下のワンライナーでOK。
  • tcpdump のパス等は適宜読み替えのこと。
  • 一点注意点は普通にSSHでログインする時と通っているパスが異なるようなので、 ssh [RemoteHost] -i [SSH Key] echo $PATH 等で通っているパスを確認しておくとハマりポイントを一つ回避できるかも。
c:\>ssh [RemoteHost] -i [SSH Key] "sudo /usr/sbin/tcpdump -U -w - -i eth0" | wireshark -k -i -

参考

Wireshark Tcpdump Remote Capturing - YouTube https://www.youtube.com/watch?v=C7nhdAL9oPg

CaptureSetup/Pipes - The Wireshark Wiki https://wiki.wireshark.org/CaptureSetup/Pipes#Remote_Capture

3
4
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
3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?