Skip to content

Instantly share code, notes, and snippets.

@erdii
Created March 31, 2016 08:54
Show Gist options
  • Save erdii/4c91229d17fbf4f41de4ebefed3c6ae1 to your computer and use it in GitHub Desktop.
Save erdii/4c91229d17fbf4f41de4ebefed3c6ae1 to your computer and use it in GitHub Desktop.
Debug linux networking...
# List all open connections
netstat -atp tcp | grep -i "listen"
# Proto Recv-Q Send-Q Local Address Foreign Address (state)
# tcp4 0 0 localhost.25035 *.* LISTEN
###
# List all open ports
sudo lsof -i -P | grep -i "listen"
# COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
# GitHub 850 grgarside 6u IPv4 0x23c345381d089301 0t0 TCP localhost:25035 (LISTEN)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment