The latest common network tools in CentOS: nmap for batch host service Scanning
In Linux, there are many powerful network scanning tools, including host scanning, host service scanning, and route scanning.
You have previously written common host scanning and routing scanning tools. nmap supports batch host scanning and host service scanning.
Use yum install nmap directly for nmap installation.
ICMP scan for nmap
Nmap can use the ICMP protocol to implement the Ping function. It supports batch host scanning to detect the host survival status.
Compared with the TCP protocol, ICMP does not require three-way handshakes. Therefore, it is faster, but some firewalls or operators cannot scan ICMP.
Common commands:
nmap -sP 192.168.0.1/24
nmap -sP 192.168.0.*
nmap -sP 192.168.0.1-255
Tcp syn scan for nmap
Nmap supports TCP semi-open scan by sending tcp syn packets to scan the open status of the TCP port of the host.
SYN scanning is faster than full open scanning after three handshakes, and is not easy to detect.
By default, nmap scans Ports 1-and some other common ports. To scan other ports, you can use the p option to specify them.
Common commands:
nmap -sS 192.168.2.224
nmap -sS 192.168.2.230-255
nmap -sS -p 0-30000 192.168.2.230-255
TCP Connect scan for nmap
The Connect scan of nmap is detected by three handshakes over TCP. Therefore, the speed is slower than that of SYN semi-open scan, but the result is more reliable.
The default scan port and port are the same as SYN scan.
Common commands:
nmap -sT 192.168.2.230-255
nmap -sT -p 0-30000 192.168.2.230-255
UDP scan for nmap
Nmap also supports UDP port scanning.
UDP is less likely to be intercepted by the firewall than TCP.
Common commands:
nmap -sU 192.168.2.230-255
nmap -sU -p 0-30000 192.168.2.230-255