Skip to content

Instantly share code, notes, and snippets.

@thebouv
Last active January 4, 2016 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thebouv/8671731 to your computer and use it in GitHub Desktop.
Save thebouv/8671731 to your computer and use it in GitHub Desktop.
conncount: linux command listing current IPs connected and how many connections
# Very handy one-liner from DDoS Deflate project. Useful just by itself.
netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
# As an alias:
# alias conncount='netstat -ntu | awk '\''{print $5}'\'' | cut -d: -f1 | sort | uniq -c | sort -nr'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment