Skip to content

Instantly share code, notes, and snippets.

@bonkydog
Created November 7, 2018 00:04
Show Gist options
  • Save bonkydog/0b1c7849ed4f7e2feef48353e786f0a8 to your computer and use it in GitHub Desktop.
Save bonkydog/0b1c7849ed4f7e2feef48353e786f0a8 to your computer and use it in GitHub Desktop.
service tricks
# what services are being offered by this machine?
netstat -lantp | grep LISTEN
# who is connecting to this machine?
netstat -alntp | awk '{ print $5 }' | grep -v ^127.0.0.1 | cut -d ':' -f 1 | sort -n | uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment