security-scripts/tcpdump-schedule/tcpdump_getdata.sh

8 lines
236 B
Bash
Raw Permalink Normal View History

2025-02-25 12:04:07 +01:00
INTERFACE=0.0
PATH=/shared/tmp/pba
FILENAME=tcpdump-%Y-%m-%d_%H%M%S.pcap
2025-02-25 11:26:05 +01:00
2025-02-25 11:50:09 +01:00
# Execute tcpdump command
# -W 5 = Limit 5 files
# -G 60 = Rotate every 60 seconds
2025-02-25 12:04:07 +01:00
/usr/sbin/tcpdump -K -W 5 -G 60 -nni $INTERFACE -s0 -w "$PATH/$FILENAME"