Table of Contents

About

Nmap (“Network Mapper”) is a free and open source (license) utility for network exploration or security auditing that permits to query open port

Management

Installation

  • Linux
apt-get install nmap
  • Windows. Download the msi package

scan a computer to see the open port ?

Nmap Open Port Computer

nmap -v -A scanme.nmap.org

scan a network ?

From ZenMap, choose the scan that you want to perform and change the value of <target> by for instance for a 255.255.255.0 subnetmask 192.168.1.1/24 and click on the scan button.

Nmap Quickscan Plus

define the port

You define the port with the p verbose.

For example, the argument -p U:53,111,137,T:21-25,80,139,8080 would scan:

  • UDP ports 53, 111,and 137,
  • the TCP ports 21 to 25 and the listed one 80, 139, 8080

Example with the port:

  • http 80,
  • https 443,
  • oracle listener 1521
  • and Obiee Presentation Service 9704
nmap -Pn -p T:80,443,1521,9704 sz0057.app.gen.local
# for ipv6, you need to add the 6 property and the target (as name or ip)
nmap -6 2a09:8280:1::42:92ef

where:

  • Pn threat the machine as up (in case of no ping is possible)
  • p defines the port

Output:

Starting Nmap 5.51 ( http://nmap.org ) at 2011-12-16 10:36 W. Europe Standard Time
Nmap scan report for obiee.gerardnico.local
Host is up (0.074s latency).
PORT     STATE    SERVICE
80/tcp   closed   http
443/tcp  filtered https
1521/tcp closed   oracle
9704/tcp open     unknown
MAC Address: 00:FF:93:3A:10:89 (Unknown)

Nmap done: 1 IP address (1 host up) scanned in 15.07 seconds

Documentation / Reference