In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to use the nmap command in the linux system, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Nmap, the network mapper, is an open source and very general tool for Linux system / network administrators. Nmap is used to detect networks on remote machines, perform security scans, network audits, and search for open ports. It scans the remote online host, the host's operating system, packet filters and open ports.
How to install
Install in Ubuntu/Debian:
$sudo apt-y install nmap
Install in Centos/RHEL:
# yum-y install nmap
Install in Arch Linux:
# pacman-S nmap instance 1: scan a single CVM
The nmap command plus ip address / domain name can be used to scan a single host without passing any parameters. The syntax is as follows:
[root@localhost ~] # nmap 192.168.0.12
The following is the specified domain name to scan:
[root@localhost ~] # nmap scanme.nmap.org instance 2, scan multiple hosts
You can specify multiple IP addresses or domain names on one line, separated by spaces:
[root@localhost] # nmap 192.168.43.137 192.168.43.166 192.168.43.177
Instead of entering the full IP address, you can separate the end with a comma, as follows:
[root@localhost] # nmap 192.168.43.137166177
In addition, you can scan a specified range of ip addresses. For example, the following command changes the host from 192.168.43.100 to 192.168.43.200:
[root@localhost ~] # nmap 192.168.43.100-200Instanc 3, scan a subnet
You can use wildcards to scan the entire subnet, as follows:
[root@localhost ~] # nmap 192.168.43.* or [root@localhost ~] # nmap 192.168.43.0
If you need to optimize the scanning speed and only find the active hosts in the subnet, instead of scanning the port information, use the-sn option, as follows:
[root@localhost ~] # nmap-sn 192.168.43.* instance 4, scan the details using the-v option
Use the-v option to print out the details of the scan, such as the nature of the scan and the open port found.
[root@localhost ~] # nmap-v 192.168.43.180 instance 5, scan the hosts contained in the file
You can put the ip address or domain name in a text file, and then pass the file as a parameter using the-iL option:
[root@localhost ~] # nmap-iL list.txt
The following is the ip address information in the file:
Example 6: enable OS scanning
Nmap can also scan the operating system version of the target host. Use the-O option for OS detection. The following operation will scan what the two hosts are, 192.168.43.166 and 180.
[root@localhost] # nmap-O 192.168.43.166180
Example 7, port scan
One of the basic tasks of the nmap tool is to scan ports on the host. Use the-p option followed by the port number to specify the port to scan, as follows:
[root@localhost] # nmap-p 80 192.168.43.166
You can use commas to separate multiple ports to scan multiple ports, as follows:
[root@localhost] # nmap-p 2510 80110 192.168.0.12
You can also scan a specified range of ports and ip addresses in the following ways:
[root@localhost ~] # nmap-p 80-443 192.168.43.* instance 8, specify scan TCP or UDP port
To scan the TCP port, use the-sT option:
[root@localhost] # nmap-sT 192.168.43.180
To scan the DUP port, use the-sU option:
[root@localhost] # nmap-sU 192.168.43.180
Example 9, scan the software version information of the open port [root@localhost ~] # nmap-sV 192.168.43.166
Example 10: perform concealment scanning
Nmap scans usually leave footprints, and footprints can be marked by a powerful intrusion detection system that can eventually be traced back to you. To remain anonymous, you can use the-sS option to perform a stealth scan:
[root@localhost] # nmap-sS 192.168.43.180
Example 11: scan the protocol for the host to open to the outside world
Use the-sO option to see what protocols are open to the target system.
[root@localhost] # nmap-sO 114.114.114.114
Example 12, perform active scanning
When using the-An option, nmap gives very detailed scan results, including the open port and the version of the service running, detecting the operating system, and even performing a trace route for the target host.
[root@localhost ~] # nmap-A-T4 192.168.43.180 instance 13, use nmap to view interface and routing information [root@localhost ~] # nmap-- iflist thank you for reading this article carefully. I hope the article "how to use nmap commands in the linux system" shared by the editor will be helpful to you. At the same time, I also hope you will support us, pay attention to the industry information channel, and more related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.