remote 의 특정 포트가 listen 하고 있는지 알 수 있는 방법?

조회 3,307 · 댓글 5
빅토르최빅토르최작성자2014년 3월 5일
초보적일 수도 있는 질문 하나 드립니다.

특정 장비(source)에서 remote 장비(destination)의 특정 포트가 listen 하고 있는지 (해당 포트를 물고 올라오는 프로세스가 있고, 정상적으로 listen 하고 있는지) 알 수 있는 방법을 알고 싶은데요.

문제는 이 특정 장비(source) 에 telnet 프로그램이 없습니다. 저는 보통 telnet 으로 포트 테스트를 하거든요.

이럴 경우 어떻게 해야 할까요?
맑2014년 3월 18일
nmap이나 netcat을 사용하면 된다고 하네요.

nmap -A 192.168.0.5/32 -p 23
nc -z host.example.com 20-30

참고사이트 : http://stackoverflow.com/questions/1168317/check-status-of-one-port-on-remote-host
http://blog.naver.com/koddos4?Redirect=Log&logNo=202676554
강철지그강철지그2014년 3월 18일
주신 stackoverflow 링크를 보니 "Windows, Linux, and Mac OS X" 가 지원된다고 되어 있는데 일단 제 Linux 머신과 OS X 머신에는 기본적으로 깔려있지는 않은 것 같습니다.
강철지그강철지그2014년 3월 19일
nmap 은 잘 설치되었습니다.

Installed:

nmap.x86_64 2:5.51-3.el6

Dependency Installed:
libpcap.x86_64 14:1.4.0-1.20130826git2dbcaa1.el6


그런데 netcat 은 repository 에서 찾지를 못합니다. 어떻게 설치해야 할까요?

# yum install netcat

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.daum.net
* extras: ftp.daum.net
* updates: centos.tt.co.kr
Setting up Install Process
No package netcat available.
Error: Nothing to do
강철지그강철지그2014년 5월 14일
jmap 확인하였습니다.

Host is up (0.00059s latency).

PORT STATE SERVICE
22/tcp open ssh
6379/tcp open unknown
6380/tcp closed unknown
26379/tcp open unknown


처럼 open, closed 여부가 나오네요.
베쯔니2014년 5월 15일
netcat 말고 nc 로 설치하면 됩니다.

# yum install nc -y
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: ftp.daum.net
* extras: ftp.daum.net
* updates: ftp.daum.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package nc.x86_64 0:1.84-22.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================
Package Arch Version Repository Size
========================================================================================================================
Installing:
nc x86_64 1.84-22.el6 base 57 k

Transaction Summary
========================================================================================================================
Install 1 Package(s)

Total download size: 57 k
Installed size: 109 k
Downloading Packages:
nc-1.84-22.el6.x86_64.rpm | 57 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : nc-1.84-22.el6.x86_64 1/1
Verifying : nc-1.84-22.el6.x86_64 1/1

Installed:
nc.x86_64 0:1.84-22.el6

Complete!

로그인 후 답글을 남길 수 있습니다.