To scan for open ports on a target machine, you can use Nmap. Here are some basic commands:
-
Scan the most common 1000 ports on localhost:
nmap localhost -
Scan all 65535 ports:
nmap -p- localhost -
Scan a specific range of ports (e.g., ports 1 to 1000):
nmap -p 1-1000 localhost -
Scan a specific IP address:
Replace<YOUR_IP>with the target IP address.nmap <YOUR_IP>
These commands will provide you with a list of open, closed, and filtered ports along with the services running on those ports.
