다른 서버나 컴퓨터의 포트가 열렸는지 확인하는 방법

다른 서버의 특정 포트가 열려 있는지 알아야 할 때가 있습니다. 윈도우와 리눅스에서 확인하는 방법을 정리합니다.

윈도우

telnet 명령어 이용하는 방법

  • 텔넷 클라이언트 기능을 추가합니다.
  • 명령 프롬프트(CMD) 또는 PowerShell에서 다음과 같이 명령합니다. google.com의 443 포트가 열렸는지 확인하는 것입니다.
C:\Users\JB>telnet google.com 443
  • 포트가 열려 있다면 아무 내용 없는 창이 나옵니다.
  • 만약 닫혀 있다면 아래와 같이 연결하지 못한다는 메시지가 나옵니다.
C:\Users\JB>telnet google.com 444
연결 대상 google.com...호스트에 연결할 수 없습니다. 포트 444: 연결하지 못했습니다.

tnc 명령어 이용하는 방법

  • PowerShell에서 다음과 같이 명령합니다. google.com의 443 포트가 열렸는지 확인하는 것입니다.
  • 열려 있다면 True...
PS C:\Users\JB> tnc google.com -port 443

ComputerName     : google.com
RemoteAddress    : 142.250.76.142
RemotePort       : 443
InterfaceAlias   : Ethernet
SourceAddress    : 192.168.0.201
TcpTestSucceeded : True
  • 그렇지 않다면 False를 반환합니다.
PS C:\Users\JB> tnc google.com -port 444
경고: TCP connect to (142.250.76.142 : 444) failed

ComputerName           : google.com
RemoteAddress          : 142.250.76.142
RemotePort             : 444
InterfaceAlias         : Ethernet
SourceAddress          : 192.168.0.201
PingSucceeded          : True
PingReplyDetails (RTT) : 34 ms
TcpTestSucceeded       : False

Test-NetConnection 명령어 이용하는 방법

  • PowerShell에서 다음과 같이 명령합니다. google.com의 443 포트가 열렸는지 확인하는 것입니다.
PS C:\Users\jb> Test-NetConnection -ComputerName google.com -Port 443                                                                                                                                                                                                                                                                                                   ComputerName     : google.com
RemoteAddress    : 142.250.207.110
RemotePort       : 443
InterfaceAlias   : Ethernet
SourceAddress    : 192.168.0.200
TcpTestSucceeded : True

리눅스

  • nc 명령어로 확인할 수 있습니다.
# nc -zv google.com 443
Ncat: Version 7.70 ( https://nmap.org/ncat )
Ncat: Connected to 142.250.206.206:443.
Ncat: 0 bytes sent, 0 bytes received in 0.05 seconds.

 

같은 카테고리의 다른 글
윈도우 / CMD(명령 프롬프트)와 PowerShell 비교

윈도우 / CMD(명령 프롬프트)와 PowerShell 비교

CMD(명령 프롬프트)와 PowerShell은 모두 Windows 운영 체제에서 사용되는 명령 줄 인터페이스(CLI) 도구이다. 두 도구는 다양한 작업을 수행할 수 있지만, 기능과 설계 철학 측면에서 많은 차이점이 있다. 아래는 CMD와 PowerShell의 주요 비교 사항이다. CMD(명령 프롬프트) 역사 및 배경 초기 도구 : CMD는 MS-DOS 시절부터 사용된 명령 줄 인터페이스의 연장선이다. 전통적인 사용 : 기본적인 파일 및 ...

윈도우 10 / 윈도우 11로 업그레이드 가능한지 확인하는 방법

윈도우 10 / 윈도우 11로 업그레이드 가능한지 확인하는 방법

윈도우 11로 업그레이드가 가능한지 확인하는 가장 간단한 방법은 마이크로스프트가 제공하는 PC 상태 검사 앱을 이용하는 것입니다.

Ubuntu Server / Let’s Encrypt 무료 SSL 인증서 발급 받기

Ubuntu Server에서 Apache Web Server를 사용하는 경우 Let’s Encrypt 인증서 발급 받는 방법입니다. Apache용 Certbot 설치 Ubuntu Server 20.04, Ubuntu Server 22.04 # snap install core # snap refresh core # snap install --classic certbot # ln -s /snap/bin/certbot /usr/bin/certbot Ubuntu Server 18.04 # apt install software-properties-common # add-apt-repository universe # add-apt-repository ppa:certbot/certbot # apt update # apt upgrade # apt install certbot ...

리눅스 / 명령어

명령어 개요 adduser 사용자 추가하는 명령어. alias 명령어 별칭을 만든다. cal calendar. 달력을 출력하는 명령어. cat concatenate. 파일 내용 출력하는 명령어. cd change directory. 다른 디렉토리로 이동하는 명령어. chmod 파일 또는 디렉토리의 읽기, 쓰기, 실행 권한 설정하는 명령어 chown 파일 또는 디렉토리의 소유자(그룹) 설정하는 명령어 clear 터미널 화면의 내용을 다 지운다. cp copy. 파일 또는 디렉토리 복사. du disk usage. 디스크 사용량 출력. file 파일의 종류를 출력하는 명령어 find 파일 또는 디렉토리를 검색하는 명령어 free 메모리 사용량 ...

윈도우 10 / Sticky Notes / 포스트잇 프로그램

윈도우 10 / Sticky Notes / 포스트잇 프로그램

Sticky Notes 간단한 메모를 할 때 포스트잇을 많이 사용합니다. 포스트잇에 메모를 하고 눈에 잘 띄는 모니터 같은 곳에 붙여놓죠. 그러한 메모를 컴퓨터에서 할 수 있는 프로그램들이 있습니다. 그 중 하나가 Sticky Notes입니다. Sticky Notes의 가장 큰 특징은 마이크로소프트가 만들었고 윈도우 10에 포함되어 있다는 것입니다. 한마디로 접근성이 좋다는 것이죠. 윈도우 10 사용자라면 따로 무언가를 ...

윈도우 11 / 로컬 사용자 계정 / 암호 변경하는 세 가지 방법

윈도우 11 / 로컬 사용자 계정 / 암호 변경하는 세 가지 방법

여럿이 같이 사용하는 PC라면, 중요하거나 개인적이 데이터가 많은 PC라면, 비밀번호를 주기적으로 변경하는 것이 좋습니다. 윈도우 11에서 비밀번호는 변경하는 방법은 여러 가지가 있는데, 그 중 세 가지를 소개해드립니다.

윈도우 10 / 작업 표시줄에서 피플 아이콘 제거하는 방법

윈도우 10 / 작업 표시줄에서 피플 아이콘 제거하는 방법

피플 앱 피플 앱은 주소록 같은 앱입니다. 구글과 스카이프에 있는 연락처를 가져와서 한 번에 관리할 수 있습니다. 사람을 선택한후 바로 메일을 보내거나 스카이프로 통화하는 것이 가능합니다. 피플 앱 작업 표시줄에서 제거 피플은 편리한 기능을 가진 앱이지만, 적극적으로 사용하는 사람을 주위에서 본 적은 없습니다. 메일은 구글의 지메일보다 네이버 메일을 더 많이 사용하고, 메시지나 통화는 스카이프보다 ...

리눅스 / 명령어 / which, whereis, locate / 명령어 위치 찾기

명령어의 위치를 찾을 때 사용할 수 있는 명령어에는 which, whereis, locate가 있다. 명령어의 위치만 찾을 때는 which를 사용하고, 관련된 파일들의 위치까지 찾을 때는 whereis나 locate를 사용한다. which 명령어로 find 명령어를 찾는다. # which find /usr/bin/find whereis 명령어로 find 명령어를 찾는다. # whereis find find: /usr/bin/find /usr/share/man/man1/find.1.gz locate 명령어로 find 명령어를 찾는다. # locate find /usr/bin/find /usr/bin/find2perl /usr/bin/findmnt /usr/bin/nl-link-ifindex2name /usr/bin/nl-link-name2ifindex /usr/bin/oldfind /usr/lib64/python2.7/modulefinder.py /usr/lib64/python2.7/modulefinder.pyc /usr/lib64/python2.7/modulefinder.pyo /usr/sbin/btrfs-find-root /usr/sbin/findfs /usr/share/bash-completion/completions/findmnt /usr/share/doc/findutils-4.5.11 /usr/share/doc/findutils-4.5.11/AUTHORS /usr/share/doc/findutils-4.5.11/COPYING /usr/share/doc/findutils-4.5.11/ChangeLog /usr/share/doc/findutils-4.5.11/NEWS /usr/share/doc/findutils-4.5.11/README /usr/share/doc/findutils-4.5.11/THANKS /usr/share/doc/findutils-4.5.11/TODO /usr/share/doc/wpa_supplicant-2.6/examples/p2p/p2p_find.py /usr/share/doc/wpa_supplicant-2.6/examples/p2p/p2p_stop_find.py /usr/share/info/find-maint.info.gz /usr/share/info/find.info.gz /usr/share/locale/be/LC_MESSAGES/findutils.mo /usr/share/locale/bg/LC_MESSAGES/findutils.mo /usr/share/locale/ca/LC_MESSAGES/findutils.mo /usr/share/locale/cs/LC_MESSAGES/findutils.mo /usr/share/locale/da/LC_MESSAGES/findutils.mo /usr/share/locale/de/LC_MESSAGES/findutils.mo /usr/share/locale/el/LC_MESSAGES/findutils.mo /usr/share/locale/eo/LC_MESSAGES/findutils.mo /usr/share/locale/es/LC_MESSAGES/findutils.mo /usr/share/locale/et/LC_MESSAGES/findutils.mo /usr/share/locale/fi/LC_MESSAGES/findutils.mo /usr/share/locale/fr/LC_MESSAGES/findutils.mo /usr/share/locale/ga/LC_MESSAGES/findutils.mo /usr/share/locale/gl/LC_MESSAGES/findutils.mo /usr/share/locale/hr/LC_MESSAGES/findutils.mo /usr/share/locale/hu/LC_MESSAGES/findutils.mo /usr/share/locale/id/LC_MESSAGES/findutils.mo /usr/share/locale/it/LC_MESSAGES/findutils.mo /usr/share/locale/ja/LC_MESSAGES/findutils.mo /usr/share/locale/ko/LC_MESSAGES/findutils.mo /usr/share/locale/lg/LC_MESSAGES/findutils.mo /usr/share/locale/lt/LC_MESSAGES/findutils.mo /usr/share/locale/ms/LC_MESSAGES/findutils.mo /usr/share/locale/nl/LC_MESSAGES/findutils.mo /usr/share/locale/pl/LC_MESSAGES/findutils.mo /usr/share/locale/pt/LC_MESSAGES/findutils.mo /usr/share/locale/pt_BR/LC_MESSAGES/findutils.mo /usr/share/locale/ro/LC_MESSAGES/findutils.mo /usr/share/locale/ru/LC_MESSAGES/findutils.mo /usr/share/locale/rw/LC_MESSAGES/findutils.mo /usr/share/locale/sk/LC_MESSAGES/findutils.mo /usr/share/locale/sl/LC_MESSAGES/findutils.mo /usr/share/locale/sr/LC_MESSAGES/findutils.mo /usr/share/locale/sv/LC_MESSAGES/findutils.mo /usr/share/locale/tr/LC_MESSAGES/findutils.mo /usr/share/locale/uk/LC_MESSAGES/findutils.mo /usr/share/locale/vi/LC_MESSAGES/findutils.mo /usr/share/locale/zh_CN/LC_MESSAGES/findutils.mo /usr/share/locale/zh_TW/LC_MESSAGES/findutils.mo /usr/share/man/man1/find.1.gz /usr/share/man/man1/find2perl.1.gz /usr/share/man/man1/oldfind.1.gz /usr/share/man/man8/btrfs-find-root.8.gz /usr/share/man/man8/findfs.8.gz /usr/share/man/man8/findmnt.8.gz locate 명령어는 -n 옵션으로 출력 ...

윈도우 10 / IExpress / 자동 압축 풀기 실행 파일 만드는 방법

윈도우 10 / IExpress / 자동 압축 풀기 실행 파일 만드는 방법

IExpress는 윈도우 10에 포함된 자동 압축 풀기 또는 자동 설치 패키지를 만드는 프로그램입니다. 다음은 IExpress로 자동으로 압축이 풀리는 실행 파일을 만드는 방법입니다. 실행 창을 엽니다. 단축키는 WIN+R입니다. iexpress를 입력하고 엔터키를 누르거나 을 클릭합니다. 을 클릭합니다. 압축만 풀 것이므로 Extract files only를 선택하고 을 클릭합니다. 적절히 이름을 정하고 을 클릭합니다. 확인을 받거나 라이선스를 보여주는 기능도 있는데, 자동 ...

윈도우 / Hyper-V / 고급 세션 모드 켜는 방법, 끄는 방법

윈도우 / Hyper-V / 고급 세션 모드 켜는 방법, 끄는 방법

고급 세션 모드(Enhanced Session Mode)는 Hyper-V 가상 머신과 호스트 간의 더 풍부한 인터페이스와 장치 통합을 가능하게 해주는 기능입니다. 윈도우 11 프로 등의 Hyper-V는 기본적으로 활성화되어 있고, 윈도우 서버 2025 등에서는 기본적으로 비활성화되어 있습니다.