How to use nmap to scan Network IP under Linux
Editor to share with you how to use nmap to scan network IP under Linux, I believe most people don't know much about it, so share this article for your reference. I hope you can learn a lot after reading this article. Let's learn about it together.
Nmap is called Network Mapper. Is a very useful tool for network scanning and host detection. Nmap is not limited to just collecting information and enumerations, but can also be used as a vulnerability detector or security scanner.
Install nmap:$ sudo yum install nmap [in RedHat-based systems] $sudo dnf install nmap [in Fedora 22 +-based versions] $sudo apt-get install nmap [in Debian/Ubuntu-based systems]
After the installation is complete, the syntax used is:
$nmap [scan type...] Options {target specification}
The parameter {target specification} can be replaced by hostname, IP address, network, and so on.
So to list the IP addresses of all hosts connected to a given network, first use the ifconfig command or the ip command to identify the network and its subnet mask:
$ifconfig or $ip addr show
Find network details in Linux
Next, run the Nmap command as follows:
$nmap-sn 10.42.0.0 Universe 24
Find all active hosts on the network
In the above command:
-sn-is the type of scan. Here is the scan in ping mode. By default, Nmap uses port scanning, but such scanning disables port scanning. 10.42.0.0Comp24-is the target network and is replaced with your actual network.
For comprehensive information, check out the Nmap manual:
$man nmap
Or run Nmap directly without any parameters to view the summary of usage information:
$nmap
The above is all the contents of the article "how to use nmap to scan Network IP under Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!