Mengetahui port yang open atau listen di linux

April 26th, 2009. Published under Tips Linux.

Tips kali ini, kita ingin mengetahui port yang open atau listen di linux. Cara pertama, bisa menggunakan netstat.

sudo netstat -nap

Yang kedua, bisa menggunakan lsof

sudo lsof -i -n -P

Contoh output perintah di atas:

root@vmac:~# lsof -i -n -P
COMMAND     PID  USER   FD   TYPE DEVICE SIZE NODE NAME
dhclient3  2923  dhcp    4u  IPv4   7488       UDP *:68
dhclient3  3852  dhcp    4u  IPv4   7504       UDP *:68
sshd       4326  root    3u  IPv6  11462       TCP *:22 (LISTEN)
sshd       4590  root    3u  IPv6  11962       TCP 192.168.56.101:22->192.168.56.1:57292 (ESTABLISHED)
sshd       4592 cecep    3u  IPv6  11962       TCP 192.168.56.101:22->192.168.56.1:57292 (ESTABLISHED)
sshd      11639  root    3r  IPv6  29815       TCP 192.168.56.101:22->192.168.56.1:57509 (ESTABLISHED)
sshd      11961 cecep    3u  IPv6  29815       TCP 192.168.56.101:22->192.168.56.1:57509 (ESTABLISHED)

Silahkan ketik perintah man netstat atau man lsof untuk mengetahui lebih detail dari opsi-opsi yang digunakan di atas.

Tags: > > >

Related Posts

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

4 Comments

dias  on May 1st, 2009

Using Mozilla Firefox Mozilla Firefox 3.5b4 on Windows Windows XP

coba dulu ya…

mantab infona….

Ria  on May 4th, 2009

Using Mozilla Firefox Mozilla Firefox 3.0.9 on Ubuntu Linux Ubuntu Linux

Postingan ini buat aku ya a' ? hehehehehe
*GR nya lagi kambuh nih*

ngadimin  on May 4th, 2009

Using Mozilla Firefox Mozilla Firefox 3.0.10 on Mac OS Mac OS X

gr kenapa? :P

kulodnkl  on June 13th, 2009

Using Mozilla Firefox Mozilla Firefox 3.0.5 on Linux Linux

ini ubuntu ya?
untuk centos gmana?

Leave a Comment

:) :( :d :"> :(( \:d/ :x 8-| /:) :o :-? :-" :-w ;) [-( :)>- more »