Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use nmap command port scan under Linux

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to use nmap command port scanning under Linux. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

The nmap command, also known as Network Mapper, is the network scanning and sniffing toolkit under Linux. Its basic function is to scan the host port, sniff the network services provided, and detect whether a group of hosts are online.

Using the nmap command to check open port nmap (Network exploration tool and security / port scanner) is a powerful network scanning tool that scans individual hosts and large networks. It is mainly used for security audit and penetration testing. Is the preferred tool for port scanning.

For example, you can use the following command to scan the port: sudo nmap-sT-p-192.168.8.51. The-sT option tells nmap to scan TCP ports,-p-scan all ports (65535)

Sl@Li:~/Works/brochain/corsac$ sudo nmap-sT-p-192.168.8.51Starting Nmap 7.60 (https://nmap.org) at 2020-10-20 17:11 CSTNmap scan report for 192.168.8.51Host is up (0.00048s latency) .Not shown: 65528 closed portsPORT STATE SERVICE22/tcp open ssh4000/tcp open remoteanything4369/tcp open epmd4444/tcp open krb5245672/tcp open amqp25672/tcp open unknown40000/tcp open safetynetpNmap done: 1 IP address (1 host up) scanned in 3.39 seconds12345678910111213141516 results show Several tcp ports are open to the outside. Can be accessed.

For other detailed usage, you can view the command help documentation directly.

Using the netcat command to check open port netcat (or nc) is a command-line tool that uses the TCP or UDP protocol to read and write data across network connections. Use netcat to scan a single port or port range.

For example, to scan IP addresses 192.168.8.51 for TCP ports open on remote computers in range, 4000-4004 can use the following command:

The nc-z-v 192.168.8.51 4000-4004murz option instructs nc to scan only open ports without sending any data, and-v is used for more details. The running results are as follows:

Sl@Li:~/Works/brochain/corsac$ nc-z-v 192.168.8.51 4000-4004Connection to 192.168.51 4000 port [tcp/*] succeeededprincipnc: connect to 192.168.51 port 4001 (tcp) failed: Connection refusednc: connect to 192.168.51 port 4002 (tcp) failed: Connection refusednc: connect to 192.168.51 port 4003 (tcp) failed: Connection refusednc: connect to 192.168.51 port 4004 (tcp) failed Connection refused: This is the end of the article on "how to use nmap command port scanning under Linux". Hope that the above content can be helpful to you, so that you can learn more knowledge, if you think the article is good, please share it for more people to see.

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report