010-centos port problems

1、nmap

installation

yum install nmap # y installation input

use

  nmap localhost # to view the current host open port
      nmap -p 1024-65535 localhost # View host ports (1024-65535) open ports
      nmap -PS 192.168.21.163 # detection of target host open port
      nmap -PS22,80,3306 192.168 # probe target host port .21.163 listed
      nmap -O 192.168.21.163 # detect the target host operating system type
      nmap -A 192.168.21.163 # detect the target host operating system type
      nmap --help # nmap argument more information please check help

Closed or open host ports
       nmap localhost # to view the current host open port
       ntsysv # Open System Server Manager (need to install yum install ntsysv), choose to close or open the service

Several states

open (open)
application is received by the port of TCP connections or UDP packets. This discovery is often the main goal of port scanning. A strong sense of security that people know each inlet port is open to attack. Attacker or penetration tester wants to find open ports. The administrator is trying to shut them down or use a firewall to protect them so as not to interfere with the legitimate user. Non-security scans may also be interested in the open ports, because they show those services available on the network.

closed (closed)
closed ports for Nmap is accessible (it receives Nmap probe packets and respond), but there is no application listening on it. They can (host discovery, or ping scanning) the host is running up also helpful on the part of the operating system detects the IP address of the display. Due to the closure of the gateway is accessible, perhaps you had a moment worth re-scan it, could something so open. System administrators may consider blocking such ports with a firewall. As they will be displayed as filtered state, discussed below.

filtered (filtered)
due to the packet filtering to block a probe packet arrival port, Nmap can not determine whether the port is open. Filtering firewall device may come from professional, router or software firewall rule on the host. This port allows an attacker to feel very frustrated, because they almost do not provide any information. Sometimes they respond to ICMP error message, such as Code 13 type 3 (Destination Unreachable: a communication prohibited by the administrator), but more generally simply discard the filter probe frames, makes no response. This forces Nmap several retries access in the event of network congestion due to the probe packet is discarded. This makes the scanning speed was slow.

unfiltered (unfiltered)
unfiltered state means that a port is accessible, but Nmap can not determine whether it is open or closed. Only the firewall rule set for mapping ACK scan the port will be classified to this state. Other types of scanning such as a scanning window, scan the SYN, FIN scan to scan or unfiltered ports can help determine whether the port is open.

open | filtered (open or filtered)
when the port is open or not is determined filtered, Nmap put the port into this state. Open ports do not respond is an example. No response could also mean that a packet filter dropped the probe packet or any response it triggered. So Nmap can not determine whether the port is open or filtered. UDP, IP protocol, FIN, Null, and Xmas scans the port may fall into this category.

closed | filtered (closed or filtered)
in this state can not be used to determine Nmap port is closed or filtered. It may only appear in the IPID Idle scan.

 

 

 

 

 

send to

Guess you like

Origin www.cnblogs.com/bjlhx/p/11126834.html