Created
January 5, 2018 15:39
-
-
Save charego/efb7ebe272308bdd2b838b344c07d082 to your computer and use it in GitHub Desktop.
Run tcpdump on the specified host
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
HOSTNAME=${1:?Specify the hostname to run tcpdump on} | |
LOGFILE="/tmp/$HOSTNAME.tcpdump" | |
sudo tcpdump -i any host $HOSTNAME -w "$LOGFILE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment