Skip to content

Instantly share code, notes, and snippets.

@jmigueldelgado
Created February 21, 2019 10:04
Show Gist options
  • Save jmigueldelgado/a4cf5bd611d3c75c1de2dca4cb4df84e to your computer and use it in GitHub Desktop.
Save jmigueldelgado/a4cf5bd611d3c75c1de2dca4cb4df84e to your computer and use it in GitHub Desktop.
log incoming IP addresses
# for port 80 (standard port for http)
netstat -tn 2>/dev/null | grep :80 | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr | head
# for all ports
netstat -vatn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment