본문 바로가기

Etc

[Tip] windows에서 telnet보다 확실하게 서비스 포트 확인하는 방법

반응형

안녕하세요 서후아빠입니다. ^_^

telnet으로 평소 서비스 포트를 사용하다가 이런 것도 있구나 하면서 발견한 방법입니다. 개인적으로는 이것이 더 좋아 보입니다. 왜냐하면 telnet은 Client를 설치해야 하는데, 인터넷이 안되는 PC에서는 설치가 불편하기 때문입니다.


Windows PowerShell 이용

 

# 확인하고자 하는 도메인, Port : test.com, 3389

# 비정상일 경우
PS C:\Windows\System32\WindowsPowerShell\v1.0> Test-NetConnection -ComputerName test.com -Port 3389

ComputerName           : test.com
RemoteAddress          : 3.36.73.87
RemotePort             : 3389
InterfaceAlias         : Wi-Fi
SourceAddress          : 10.10.0.161
PingSucceeded          : False
PingReplyDetails (RTT) : 0 ms
TcpTestSucceeded       : False

# 정상일 경우
PS C:\Windows\System32\WindowsPowerShell\v1.0> Test-NetConnection -ComputerName test.com -Port 3389


ComputerName     : test.com
RemoteAddress    : 3.36.73.87
RemotePort       : 3389
InterfaceAlias   : Wi-Fi
SourceAddress    : 10.10.0.161
TcpTestSucceeded : True​
반응형