nmap을 이용한 리눅스에서 열린포트와 사용 중인 포트 확인방법
먼저 nmap를 설치 해준다.
[root@ora10 ~]# yum -y install nmap
Loaded plugins: rhnplugin, security
There was an error communicating with RHN.
RHN support will be disabled.
Error communicating with server. The message was:
Error Message:
Please run rhn_register as root on this client
Error Class Code: 9
Error Class Info: Invalid System Credentials.
Explanation:
An error has occurred while processing your request. If this problem
persists please enter a bug report at bugzilla.redhat.com.
If you choose to submit the bug report, please be sure to include
details of what you were trying to do when this error occurred and
details on how to reproduce this problem.
Setting up Install Process
Parsing package install arguments
Package 2:nmap-4.11-1.1.i386 installed and not available
Nothing to do
[root@ora10 ~]#
열린 포트 확인
[root@ora10 ~]# nmap localhost
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2013-05-28 20:03 KST
Interesting ports on ora10 (127.0.0.1):
Not shown: 1676 closed ports
PORT STATE SERVICE
23/tcp open telnet
1521/tcp open oracle
2002/tcp open globe
3306/tcp open mysql
현재 사용 중인 포트 확인
Nmap finished: 1 IP address (1 host up) scanned in 0.085 seconds
[root@ora10 ~]# netstat -na | grep LISTEN
tcp 0 0 0.0.0.0:8034 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:1521 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:23 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN
tcp 0 0 :::2002 :::* LISTEN
tcp 0 0 ::1:6010 :::* LISTEN
unix 2 [ ACC ] STREAM LISTENING 5156 /tmp/.font-unix/fs7100
unix 2 [ ACC ] STREAM LISTENING 5432 /tmp/.gdm_socket
unix 2 [ ACC ] STREAM LISTENING 5461 /tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 5681 /var/tmp/.oracle/s#2489.2
unix 2 [ ACC ] STREAM LISTENING 5059 /var/lib/mysql/mysql.sock
unix 2 [ ACC ] STREAM LISTENING 4852 /var/run/audispd_events
unix 2 [ ACC ] STREAM LISTENING 5679 /var/tmp/.oracle/s#2489.1
unix 2 [ ACC ] STREAM LISTENING 4928 /var/run/acpid.socket
[root@ora10 ~]#
이 포스트를 추천해 주시면 더욱 많은 분들에게 보여집니다~!