Created
August 30, 2016 02:46
-
-
Save randallb/451887ebf40ca7a9f43f7936d8b89997 to your computer and use it in GitHub Desktop.
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
# to get rid of tunnelss issue | |
# searchAndDestroy 443 | |
searchAndDestroy() { | |
sudo lsof -n -i4TCP:$1 | grep LISTEN | awk '{print $2}' | xargs sudo kill -9 | |
echo "Port" $1 "found and killed." | |
} | |
alias killTunnels="searchAndDestroy 443" | |
alias destroyAll="searchAndDestroy 443; searchAndDestroy 6379; searchAndDestroy 5000; searchAndDestroy 5100; searchAndDestroy 5200; searchAndDestroy 5300; searchAndDestroy 5400; " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment