nmap:tldr:411bd
The command nmap -p ${port1,port2,---,portN} ${address_or_addresses}
is used to perform a port scan using the nmap tool.
Here is a breakdown of the command:
-
nmap
: This is the actual command that invokes the nmap tool. Nmap is a powerful network scanning tool used to discover and analyze network hosts and services. -
-p ${port1,port2,---,portN}
: This option is used to specify the ports to be scanned. You can provide a single port number, a comma-separated list of ports, or a range of ports using the formatstart-end
. The${port1,port2,---,portN}
syntax represents a placeholder where you should replace it with the desired port or range of ports. -
${address_or_addresses}
: Similarly, this placeholder represents the target address or addresses to be scanned. You can specify a single IP address, a hostname, or multiple addresses separated by commas.
For example, let's say you want to scan port 80 and port 443 of a single host with the IP address 192.168.0.1. The command would be:
nmap -p 80,443 192.168.0.1
Similarly, if you want to scan port 22 and a range of ports from 1000 to 2000 on multiple hosts (e.g., 192.168.0.1, 192.168.0.2, 192.168.0.3), the command would be:
nmap -p 22,1000-2000 192.168.0.1,192.168.0.2,192.168.0.3
Note that the above examples are just for illustration purposes, and you can customize the command based on your specific requirements.
Questions that are answered by this command:
- nmap check ip ports?