Skip to content

Instantly share code, notes, and snippets.

@AysadKozanoglu
Last active February 28, 2020 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save AysadKozanoglu/86f916e16b4d374c70b576065191268b to your computer and use it in GitHub Desktop.
Save AysadKozanoglu/86f916e16b4d374c70b576065191268b to your computer and use it in GitHub Desktop.
display all connection by counting the connection per ip address
#! /bin/sh
# author: Aysad Kozanoglu
# email: aysadx@gmail.com
#
# QUICK USAGE:
# wget -O - "https://git.io/fAtyh" | bash
watch "netstat -atun | grep -v -E 'address|and|Recv-Q' | awk '{print $5}' | cut -d: -f1 | sed -e '/^$/d' |sort | uniq -c | sort -r"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment