1.telnet
# yum install telnet -y 检测到端口 # telnet 192.168.1.189 22 Trying 192.168.1.189... Connected to 192.168.1.189. Escape character is '^]'. SSH-2.0-OpenSSH_7.4 未检测到端口 # telnet 192.168.1.189 389 Trying 192.168.1.189... telnet: connect to address 192.168.1.189: Connection refused
2.nc
# yum install nc -y 检测到端口 # nc -vz 192.168.1.189 22 Ncat: Version 7.50 ( https://nmap.org/ncat ) Ncat: Connected to 192.168.1.189:22. Ncat: 0 bytes sent, 0 bytes received in 0.01 seconds. 未检测到端口 # nc -vz 192.168.1.189 389 Ncat: Version 7.50 ( https://nmap.org/ncat ) Ncat: Connection refused.
3.nmap
# yum install nmap -y 检测到两个开发端口 # nmap www.baidu.com Starting Nmap 6.40 ( http://nmap.org ) at 2022-08-17 00:08 CST Nmap scan report for www.baidu.com (180.101.49.12) Host is up (0.013s latency). Other addresses for www.baidu.com (not scanned): 180.101.49.11 Not shown: 998 filtered ports PORT STATE SERVICE 80/tcp open http 443/tcp open https Nmap done: 1 IP address (1 host up) scanned in 4.16 seconds
4.利用/dev/tcp
检测到开放端口 # echo > /dev/tcp/192.168.1.189/22 && echo "port is opened" port is opened 未检测到开放端口 # echo > /dev/tcp/192.168.1.189/389 && echo "port is opened" -bash: connect: Connection refused -bash: /dev/tcp/192.168.1.189/389: Connection refused
标签:1.189,centos,nmap,端口,扫描,192.168,tcp,Ncat From: https://www.cnblogs.com/1016391912pm/p/16592075.html