Netstat: melihat port yang aktif

From OnnoWiki
Revision as of 04:39, 27 October 2018 by Onnowpurbo (talk | contribs)
Jump to navigation Jump to search

Sumber: http://linuxers.org/howto/how-find-out-active-connections-or-which-ports-are-openlistening-linux


Melihat port yang di listen

netstat -plnt         # listen semua
netstat -n -A inet    # listen semua
lsof -i               # listen semua
netstat -n -A inet -t # listen TCP
netstat -n -A inet -u # listen UDP
lsof -i4TCP           # listen IPv4 TCP

Contoh memfilter

netstat -plnt | grep ':80'         # web
netstat -A inet -n -p | grep 1413  # grep port socket
ps -e | grep firefox               # grep firefox PID


Referensi