In Linux, use the nmap command-general Linux technology-Linux technology and application information. The following is a detailed description. Prerequisites:
Generally, netstat is recommended when you view the port on the local machine because it is secure and reliable. If you cannot find the port or do not know what the port is, the nmap command can be used, especially for the service corresponding to the port not mentioned in/etc/services. this command is a tool used by the system administrator to Manage System Security. It can be used to understand the role of host ports.
Syntax:
Nmap <Scan type> <Scan parameters>
Scan type: mainly includes the following types.
-ST: the TCP packet is scanned to establish the connection connect ()
-SS: Scan TCP packets with SYN data mark
-SP: scanning by ping
-SU: Scan in UDP packet format
-SO: Host scanning using IP protocol
Scan parameters: mainly include the following types.
-PT: Use the TCP ping method for scanning to obtain the number of computers currently started.
-PI: Use the actual ping (with ICMP packets) for scanning
-P: the port range, for example, 1024 ~, 80 ~ ~ 60000
IP addresses and ranges:
192.168.0.100: Write the IP address directly and check only one host.
192.168.0.0/24: CIDR Block of the C Class
192. 168. *. *: uses the B Class network segment to scan a wider range.
192.168.0.0 ~ 50, 60 ~ 100,103,200: deformed Host Range
Example:
Nmap localhost: Scan Local Machine
Nmap-p 1024-65535 localhost: Scan part of the local port
Nmap-PT 192.168.1.171-177: several hosts are scanned by ping.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.