Commit 837af21d authored by Olav Kvittem's avatar Olav Kvittem
Browse files

start-icmp for tcpdump of icmp traffic

parent bbfc8ec6
# add to /etc/sudoers.d/dragonlab
up ALL=(ALL) NOPASSWD: /usr/sbin/tcpdump
#! /bin/sh
# dump igmp traffic to catch unreachables
. $HOME/dragonlab/etc/start.cfg
# pick interface with default route
IF=`ip route get | perl -ne 'print $1 if / dev (\w+) /'`
if test "$IF" != ""; then
tomidnight=$((`date --date 'tomorrow 00:00' +%s`-`date +%s` - 1))
/usr/sbin/tcpdump -i $IF -G $tomidnight -W 1 -w ${logpath}/icmp-%F-%T.pcap icmp 2> ${logpath}/icmp.log
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment