Discovering ports over the network
In this recipe, we will use the list of active IPs we and saved in the file to perform information gathering, the purpose will be to scan them for open ports on those IPs. We will be using nmap and its features to discover open ports.
Getting ready
We will use the nmap tool to detect open ports on the IP. Let's start with the process of detecting the open ports over a specific IP.
How to do it...
For this recipe, you will to perform the steps:
- We will run nmap by typing the following command in terminal:
nmap <ip address>
The output will be as shown in the following screenshot:
- We can even check what the tool is doing by using the verbose switch, by entering the following command in Terminal:
nmap -v <IP address>
The will be as shown in the screenshot:
- By default, it scans only 1,000 well-known sets of ports. If we are interested in setting the scan preference to the top 100 ports, we can run the following command in terminal:
nmap --top...