How to scan specific ports?

To scan specific ports using Nmap, you can use the -p option followed by the port numbers you want to scan. You can specify individual ports, a range of ports, or a combination of both. Here are some examples:

  1. Scan specific individual ports:

    nmap -p 22,80,443 <target>

    This command scans ports 22 (SSH), 80 (HTTP), and 443 (HTTPS) on the specified target.

  2. Scan a range of ports:

    nmap -p 1-1000 <target>

    This command scans all ports from 1 to 1000 on the specified target.

  3. Scan a combination of individual ports and a range:

    nmap -p 22,80,1000-2000 <target>

    This command scans ports 22, 80, and all ports from 1000 to 2000 on the specified target.

Replace <target> with the IP address or hostname of the target you want to scan.

0 Comments

no data
Be the first to share your comment!