Monday, October 14, 2013

Install nmap Network Port Scanner Security Tool

Nmap (Network Mapper) is an open source tool for network exploration and security auditing. It was designed to rapidly scan large networks, although it works fine against single hosts.


Nmap Install IN CentOS / RHEL


Installation


To install nmap on RHEL based Linux distributions, type the following yum command:


# yum install nmap

 


How do I use nmap command?


To find out nmap version, run:
# nmap --version

Sample outputs:


Nmap version 5.51 ( http://nmap.org )

To scan an IP address or a host name (FQDN), run:
# nmap 1.2.3.4

# nmap localhost

# nmap 192.168.1.1


Getting more information out of the remote system


The -v option forces verbose output and the -A optipn enables OS detection and Version detection, Script scanning and traceroute in a single command:


# nmap -v -A scanme.nmap.org
# nmap -v -A 192.168.1.1

 


To scan a range of IP addresses


# nmap 192.168.1.1-50


To scan an entire subnet


# nmap 192.168.1.0/24


Ping only scan


# nmap -sP 192.168.1.1


TCP SYN scan


# nmap -sS 192.168.1.1


UDP scan


# nmap -sU 192.168.1.1


IP protocol scan


# nmap -sO 192.168.1.1


Scan port 80, 25, 443, and 110


# nmap -p 80,25,443,110 192.168.1.1


Scan port ranges 1024-2048


# nmap -p 1024-2048 192.168.1.1


Operating system detection


# nmap -O --osscan-guess 192.168.1.1



Nmap Install Debian or Ubuntu Linux 


Installation


To install nmap for Debian and Ubuntu Linux based server systems type the following apt-get command:
$ sudo apt-get install nmap


Examples


To find the nmap version, enter:
# nmap -V

OR
# nmap --version

Sample outputs:


Nmap version 5.21 ( http://nmap.org )

WARNING! nmap scan could get you into legal trouble if you don’t have permission to scan the target systems.

To scan an IP address, enter:
# nmap 192.168.1.2


 


To scan a range of IP addresses, enter:
# nmap 192.168.1.2-10

To scan an entire subnet:
# nmap 192.168.1.0/24

More examples:


 
## Ping only scan ##
nmap -sP 192.168.1.2

## Scan and do traceroute ##
nmap --traceroute IP-ADDRESS
nmap --traceroute DOMAIN-NAME-HERE

## TCP SYN Scan ##
nmap -sS 192.168.1.2

## UDP Scan ##
nmap -sU 192.168.1.2

## IP protocol scan ##
nmap -sO 192.168.1.2

## Scan port 80, 25, 443 ##
nmap -p 80 192.168.1.2
nmap -p http 192.168.1.2
nmap -p 25 192.168.1.2
nmap -p smtp 192.168.1.2
nmap -p 443 192.168.1.2
nmap -p 80,24,443 192.168.1.2

## Scan port ranges ##
nmap -p 512-1024 192.168.1.2

## Scan for OS i.e. Operating System Detection ##
nmap -O 192.168.1.2
nmap -O --osscan-guess 192.168.1.2

## Scan for application server version ##
nmap -sV 192.168.1.2

 Nmap Install in OpenBSD 


Installation


 



Use pkg_add command to install software package called nmap under OpenBSD operating system. First, you must set the PKG_PATH environment variable as follows:


 


export PKG_PATH=http://mirror.esc7.net/pub/OpenBSD/`uname -r`/packages/`machine -a`/


Type the following pkg_add command to install nmap tool. The -v flag was used to give a more verbose output. This option is not needed but it is helpful for debugging and was used here to give a little more insight into what pkg_add is actually doing under OpenBSD:
# pkg_add -v nmap

Sample outputs:


nmap-6.01: ok

Examples


To find out nmap version, enter:
# nmap --version

Sample outputs:


Nmap version 6.01 ( http://nmap.org )
Platform: i386-unknown-openbsd5.2
Compiled with: liblua-5.1.5 openssl-1.0.0f libpcre-8.30 libpcap-(OpenBSD libpcap) nmap-libdnet-1.12 ipv6
Compiled without:

To scan a host or an IP address, enter:
# nmap -A -v 192.168.1.1

OR
# nmap -A -v server1.tutorialworld.net

OR
# nmap server1.tutorialworld.net


 


 


 



Install nmap Network Port Scanner Security Tool

No comments:

Post a Comment