■ 환경
- linux 환경
- telnet , nc, curl 등 프로그램 설치된환경
■ 목적
- 출발지에서 목적지까지의 네트워크 통신가능여부 확인용
■ 방법
● 목적지 IP : 192.168.0.194
● 목적지 PORT : 9100
구분 | 통신이 정상적인 상태인 경우 | 통신이 불가능한 상태인 경우 |
telnet | [root@linux ~]# telnet 192.168.0.194 9100 Trying 192.168.0.194... Connected to 192.168.0.194. Escape character is '^]'. |
[root@linux ~]# telnet 192.168.0.194 9100 Trying 192.168.0.194... 응답없음 |
nc | [root@linux ~]# nc -zv 192.168.0.194 9100 Ncat: Version 7.50 ( https://nmap.org/ncat ) Ncat: Connected to 192.168.0.194:9100. Ncat: 0 bytes sent, 0 bytes received in 0.02 seconds. [root@linux ~]# |
[root@linux ~]# nc -zv 192.168.0.194 9100 Ncat: Version 7.50 ( https://nmap.org/ncat ) 응답없음 |
curl | [root@linux ~]# curl -v telnet://192.168.0.194:9100/ * About to connect() to 192.168.0.194 port 9100 (#0) * Trying 192.168.0.194... * Connected to 192.168.0.194 (192.168.0.194) port 9100 (#0) |
[root@linux ~]# curl -v telnet://192.168.0.194:9100/ * About to connect() to 192.168.0.194 port 9100 (#0) * Trying 192.168.0.194... 응답없음 |
/dev/tcp | [root@linux ~]# echo > /dev/tcp/192.168.0.194/9100 [root@linux ~]# echo $? 0 [root@linux ~]# |
[root@linux ~]# echo > /dev/tcp/192.168.0.194/9100 응답없음 |
'OS > Linux' 카테고리의 다른 글
linux version / 리눅스 버전 확인 / os-release / hostnamectl / uname (0) | 2023.09.23 |
---|---|
linux welcome message / motd / issue / sshd_config / Banner (0) | 2023.09.22 |
crontab / delete / send mail (0) | 2023.09.06 |
SSO / SSL / jdk.tls.disabledAlgorithms (0) | 2022.02.15 |
linux / find / 특정기간 / 검색기간 (0) | 2022.02.14 |