Skip to content

Instantly share code, notes, and snippets.

@vjo
Last active December 14, 2015 15:38
Show Gist options
  • Save vjo/5109135 to your computer and use it in GitHub Desktop.
Save vjo/5109135 to your computer and use it in GitHub Desktop.
Networking - Shell Tricks
'lsof -i' monitors network connections in real time
'sudo lsof -i -P | grep -i "listen"' Check open port
'iftop' shows bandwith usage per *connection*
'nethogs' shows the bandwith usage per *process*
'python -m SimpleHTTPServer 8080' shares all the files in the current folder over HTTP, port 8080
'socat TCP4-LISTEN:1234,fork TCP4:192.168.1.1:22' forwards your port 1234 to another machine's port 22. Very useful for quick NAT redirection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment