From 3e2599483701b08424d114fd0f5143b28c6d8c02 Mon Sep 17 00:00:00 2001 From: test2 Date: Wed, 16 Oct 2019 23:28:25 +0300 Subject: [PATCH] nmap --- ex-1_iptables.adoc | 58 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/ex-1_iptables.adoc b/ex-1_iptables.adoc index 4d79127..8fbceda 100644 --- a/ex-1_iptables.adoc +++ b/ex-1_iptables.adoc @@ -101,15 +101,69 @@ See https://en.wikipedia.org/wiki/Nmap -== Find open Ports +== Scan Ports .Step 3 (find open ports) +=== Scan a Single Port, All Ports, or Series + +[source,bash] +---- +Nmap commands can be used to scan a single port or a series of ports: +---- + +=== Scan port 80 on the target system: + +[source,bash] +---- +nmap –p 80 172.21.0.3 +---- + +=== Scan ports 1 through 200 on the target system: + +[source,bash] +---- +nmap –p 1-200 172.21.0.3 +---- + +=== Scan (Fast) the most common ports: + +[source,bash] +---- +nmap –F 172.21.0.3 +---- + +=== To scan all ports (1 – 65535): + +[source,bash] +---- +nmap –p– 172.21.0.3 +---- + + + +=== Scan All TCP UDP Ports + +Scan all UDP and TCP ports in a single command. We will use -sU for UDP and sT for TCP protocol. [source,bash] ---- -nmap -sP 83.212.114.* +nmap -sU -sT -p0-65535 IP ---- +.What Are Ports? +[NOTE] +==== + +On modern operating systems, ports are numbered addresses for network traffic. Different kinds of services use different ports by default. + +For example, normal web traffic uses Port 80, while POP3 email uses Port 110. One of the ways that a firewall works is by allowing or restricting traffic over a particular port. + +Because the ports into your computer can cause a security risk, it’s critical to know which ports are open and which are blocked. + +==== + + +