Howto install nmap on Centos 7.x and RHEL

Howto install nmap on Centos 7.x and RHEL

nmap

nmap (Network Mapper) is a free and open source utility. Here, we will use it to scan ports and security risks for servers and network devices.

Step 1: Install Nmap on Centos

[root@ITHelpblog ~]# yum install nmap
Loaded plugins: fastestmirror, langpacks
base | 3.6 kB 00:00:00
epel/x86_64/metalink | 4.1 kB 00:00:00
epel | 4.3 kB 00:00:00
epel-debuginfo/x86_64/metalink | 4.2 kB 00:00:00
epel-debuginfo | 3.0 kB 00:00:00
epel-source/x86_64/metalink | 4.1 kB 00:00:00
epel-source | 3.5 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/6): epel/x86_64/updateinfo | 503 kB 00:00:00
(2/6): epel-source/x86_64/updateinfo | 503 kB 00:00:00
(3/6): epel/x86_64/primary_db | 3.9 MB 00:00:00
(4/6): epel-debuginfo/x86_64/primary_db | 536 kB 00:00:00
(5/6): epel-source/x86_64/primary_db | 1.4 MB 00:00:00
(6/6): updates/7/x86_64/primary_db | 3.1 MB 00:00:00
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* epel: ftp.iij.ad.jp
* epel-debuginfo: ftp.iij.ad.jp
* epel-source: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
Resolving Dependencies
–> Running transaction check
—> Package nmap.x86_64 2:6.40-7.el7 will be installed
–> Processing Dependency: nmap-ncat = 2:6.40-7.el7 for package: 2:nmap-6.40-7.el7.x86_64
–> Running transaction check
—> Package nmap-ncat.x86_64 2:6.40-7.el7 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================
Package Arch Version Repository Size
=========================================================================================================================
Installing:
nmap x86_64 2:6.40-7.el7 base 4.0 M
Installing for dependencies:
nmap-ncat x86_64 2:6.40-7.el7 base 201 k

Transaction Summary
=========================================================================================================================
Install 1 Package (+1 Dependent package)

Total download size: 4.2 M
Installed size: 17 M
Is this ok [y/d/N]: y
Downloading packages:
(1/2): nmap-ncat-6.40-7.el7.x86_64.rpm | 201 kB 00:00:00
(2/2): nmap-6.40-7.el7.x86_64.rpm | 4.0 MB 00:00:00
————————————————————————————————————————-
Total 18 MB/s | 4.2 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 2:nmap-ncat-6.40-7.el7.x86_64 1/2
Installing : 2:nmap-6.40-7.el7.x86_64 2/2
Verifying : 2:nmap-ncat-6.40-7.el7.x86_64 1/2
Verifying : 2:nmap-6.40-7.el7.x86_64 2/2

Installed:
nmap.x86_64 2:6.40-7.el7

Dependency Installed:
nmap-ncat.x86_64 2:6.40-7.el7

Complete!
[root@133-130-125-224 ~]#

Step 2: Scan OS and port for one IP address

[root@ITHelpblog ~]# nmap -sS -P0 -sV -O 8.8.8.8

Starting Nmap 6.40 ( http://nmap.org ) at 2016-03-03 16:20 JST
Nmap scan report for google-public-dns-a.google.com (8.8.8.8)
Host is up (0.00098s latency).
Not shown: 999 filtered ports
PORT STATE SERVICE VERSION
53/tcp open tcpwrapped
Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port
Device type: general purpose
Running (JUST GUESSING): OpenBSD 4.X (85%)
OS CPE: cpe:/o:openbsd:openbsd:4.3
Aggressive OS guesses: OpenBSD 4.3 (85%)
No exact OS matches for host (test conditions non-ideal).

OS and Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 11.83 seconds
[root@ITHelpblog ~]#

Thanks for using IThelpblog.com

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>