はじめに
FTD のトラブルシューティングにおいて FTD 上で取得したパケットキャプチャが必要になる場合がございます。本 topic では FTD 上でのパケットキャプチャの取得方法についてご案内させていただきます。
※ 本 topic は FTDv 6.1 で動作確認を行っております。
パケットキャプチャの種類
FTD では 2種類のパケットキャプチャが存在します。
- ASA(LINA) level capture
- Snort level capture
以下は FTD 上での packet flow を示す図となるのですが、ASA(LINA) level capture はパケット受信直後、Snort level capture は Snort の処理が終わった段階でのキャプチャを取得します。
ASA(LINA) level capture
1. CLISH で capture コマンドを使用して取得します。
> capture capture_test interface inside match tcp host 192.168.45.11 host 192.168.46.11 eq 23
2. show capture コマンドで capture の状況が確認できます。
> show capture
capture capture_test type raw-data trace interface inside [Capturing - 5386 bytes]
match tcp host 192.168.45.11 host 192.168.46.11 eq telnet
3. ASA(LINA) engine 経由で外部に転送する場合、copy コマンドで転送します。
> copy /noconfirm /pcap capture:capture_test ftp://192.168.45.11
※もし、CLISH で copy コマンドが Syntax errorで実行きない場合、Diagnostic CLI(Lina shell) で実施してください。
> system support diagnostic-cli
Attaching to Diagnostic CLI ... Press 'Ctrl+a then d' to detach.
Type help or '?' for a list of available commands.
FTD1> en
Password:
FTD1# copy /noconfirm /pcap capture:inside ftp://192.168.45.11
4. FTD engine 経由で外部に転送する場合、ファイルを /ngfw/var/common に移動させ、file コマンドや File Download の機能を利用し転送します。
> copy /noconfirm /pcap capture:capture_test flash:capture_test.pcap
!!
65 packets copied in 0.10 secs
> show flash: | include cap
148 5410 Jan 03 2017 04:52:59 capture_test.pcap
> expert
admin@ftd:~$ sudo su
Password:
root@ftd:/home/admin# mv /mnt/disk0/capture_test.pcap /ngfw/var/common/
root@ftd:/home/admin# ls -l /ngfw/var/common/ | grep cap
-rwxr-xr-x 1 root root 5410 Jan 3 05:02 capture_test.pcap
<file コマンドで転送する場合>
> file secure-copy 1.150.0.30 toishika . capture_test.pcap
<File Download で転送する場合>
Snort level capture
1. CLISH で capture-traffic コマンドを使用して取得します。
> capture-traffic
Please choose domain to capture traffic from:
0 - br1
1 - Router
Selection? 1
Please specify tcpdump options desired.
(or enter '?' for a list of supported options)
Options: -w test.pcap -s 1518
2. ファイルは /ngfw/var/common/ に生成されるので "3-3" と同様に file コマンドや File Download で転送できます。
> file secure-copy 1.150.0.30 toishika . test.pcap
参考情報
Firepower System and FTDトラブルシューティング
https://community.cisco.com/t5/-/-/ta-p/3161733