How to Install nmap on RHEL 6 Linux Server

Nmap, short for Network Mapper, is a free and open-source tool that is indispensable for network exploration or security auditing. It is a powerful utility that can help you discover open ports on a network, making it an invaluable resource for system and network administrators. Nmap can assist in performing administrative tasks and can be instrumental in troubleshooting, helping to narrow down potential issues.

Nmap uses raw IP packets in innovative ways to determine the hosts available on the network, the services these hosts are offering, the operating systems they are running, the type of packet filters/firewalls in use, and many other characteristics. It was designed to rapidly scan large networks, but it works just as well against single hosts. Nmap is compatible with all major computer operating systems, with official binary packages available for Linux, Windows, and Mac OS X.

In this tutorial, we will guide you through the quick steps to install Nmap on your Red Hat Enterprise Linux 6 (RHEL 6) server. For more information on the best web servers, you can visit our top web servers page.

Installing Nmap on RHEL 6

To install Nmap on your RHEL 6 server, you simply need to run the following yum command:

[root@rhel6 ~]# yum install nmap -y

This command will initiate the installation process. The system will resolve dependencies, run a transaction check, and then proceed to install the nmap package.

[root@rhel6 ~]# yum install nmap -y
Loaded plugins: rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package nmap.i686 2:5.21-3.el6 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package          Arch             Version                   Repository                        Size
====================================================================================================
Installing:
 nmap             i686             2:5.21-3.el6              DVD-RHEL6-Repository             2.2 M

Transaction Summary
====================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 2.2 M
Installed size: 7.2 M
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : 2:nmap-5.21-3.el6.i686                                                       1/1

Installed:
  nmap.i686 2:5.21-3.el6

Complete!

Once the installation is complete, you can type ‘nmap’ without any arguments in the command line to display the available options for the nmap command:

[root@rhel6 ~]# nmap

This command will display a list of scan types, options, and target specifications that you can use with nmap. It also provides examples of how to use these options and specifications.

[root@rhel6 ~]# nmap
Nmap 5.21 ( http://nmap.org )
Usage: nmap [Scan Type(s)] [Options] {target specification}
TARGET SPECIFICATION:
  Can pass hostnames, IP addresses, networks, etc.
  Ex: scanme.nmap.org, microsoft.com/24, 192.168.0.1; 10.0.0-255.1-254
  -iL : Input from list of hosts/networks
  -iR : Choose random targets
  --exclude : Exclude hosts/networks
  --excludefile : Exclude list from file
HOST DISCOVERY:
  -sL: List Scan - simply list targets to scan
  -sP: Ping Scan - go no further than determining if host is online
  -PN: Treat all hosts as online -- skip host discovery
  -PS/PA/PU/PY[portlist]: TCP SYN/ACK, UDP or SCTP discovery to given ports
  -PE/PP/PM: ICMP echo, timestamp, and netmask request discovery probes
  -PO[protocol list]: IP Protocol Ping
  -n/-R: Never do DNS resolution/Always resolve [default: sometimes]
  --dns-servers : Specify custom DNS servers
  --system-dns: Use OS's DNS resolver
  --traceroute: Trace hop path to each host
SCAN TECHNIQUES:
  -sS/sT/sA/sW/sM: TCP SYN/Connect()/ACK/Window/Maimon scans
  -sU: UDP Scan
  -sN/sF/sX: TCP Null, FIN, and Xmas scans
  --scanflags : Customize TCP scan flags
  -sI : Idle scan
  -sY/sZ: SCTP INIT/COOKIE-ECHO scans
  -sO: IP protocol scan
  -b : FTP bounce scan
PORT SPECIFICATION AND SCAN ORDER:
  -p : Only scan specified ports
    Ex: -p22; -p1-65535; -p U:53,111,137,T:21-25,80,139,8080
  -F: Fast mode - Scan fewer ports than the default scan
  -r: Scan ports consecutively - don't randomize
  --top-ports : Scan  most common ports
  --port-ratio : Scan ports more common than 
SERVICE/VERSION DETECTION:
  -sV: Probe open ports to determine service/version info
  --version-intensity : Set from 0 (light) to 9 (try all probes)
  --version-light: Limit to most likely probes (intensity 2)
  --version-all: Try every single probe (intensity 9)
  --version-trace: Show detailed version scan activity (for debugging)
SCRIPT SCAN:
  -sC: equivalent to --script=default
  --script=:  is a comma separated list of
           directories, script-files or script-categories
  --script-args=: provide arguments to scripts
  --script-trace: Show all data sent and received
  --script-updatedb: Update the script database.
OS DETECTION:
  -O: Enable OS detection
  --osscan-limit: Limit OS detection to promising targets
  --osscan-guess: Guess OS more aggressively
TIMING AND PERFORMANCE:
  Options which take 

Understanding Nmap Commands

Nmap offers a wide range of commands and options that allow you to perform various network exploration and security auditing tasks. Here are some of the key commands you can use:

  • -sS/sT/sA/sW/sM – These options allow you to perform TCP SYN/Connect()/ACK/Window/Maimon scans.
  • -sU – This option allows you to perform a UDP Scan.
  • -sN/sF/sX – These options allow you to perform TCP Null, FIN, and Xmas scans.
  • -sV – This option allows you to probe open ports to determine service/version info.
  • -O – This option enables OS detection.

For a more comprehensive list of commands and their functions, you can refer to the Nmap man page.

Conclusion

Nmap is a powerful tool that can significantly aid in network exploration and security auditing. Its ability to discover open ports on a network, determine the hosts available on the network, the services these hosts are offering, and the operating systems they are running makes it an invaluable resource for system and network administrators.

Installing Nmap on a Red Hat Enterprise Linux 6 (RHEL 6) server is a straightforward process that can be accomplished with a single command. Once installed, Nmap offers a wide range of commands and options that allow you to perform various network exploration and security auditing tasks.

By understanding how to use Nmap and its various commands, you can enhance your network exploration and security auditing capabilities, making your system and network administration tasks more efficient and effective.

FAQ Section

  1. What is Nmap and what is it used for?

    Nmap, or Network Mapper, is a free and open-source tool used for network exploration or security auditing. It can help system and networkadministrators discover open ports on a network, determine the hosts available on the network, the services these hosts are offering, the operating systems they are running, the type of packet filters/firewalls in use, and many other characteristics.

  2. How do I install Nmap on a RHEL 6 server?

    To install Nmap on a RHEL 6 server, you need to run the following yum command: [root@rhel6 ~]# yum install nmap -y. This command will initiate the installation process, resolve dependencies, and install the nmap package.

  3. What are some key commands I can use with Nmap?

    Nmap offers a wide range of commands for various tasks. Some key commands include -sS/sT/sA/sW/sM for performing TCP SYN/Connect()/ACK/Window/Maimon scans, -sU for performing a UDP Scan, -sN/sF/sX for performing TCP Null, FIN, and Xmas scans, -sV for probing open ports to determine service/version info, and -O for enabling OS detection.

  4. Can Nmap be used on all operating systems?

    Yes, Nmap is compatible with all major computer operating systems. Official binary packages are available for Linux, Windows, and Mac OS X.

  5. What is the purpose of the ‘yum install nmap -y’ command?

    The ‘yum install nmap -y’ command is used to install Nmap on a Red Hat Enterprise Linux (RHEL) server. The ‘yum’ part of the command is the package manager for the server, ‘install’ is the command to install a package, ‘nmap’ is the package to be installed, and ‘-y’ is an option that automatically answers yes to any prompts that may come up during the installation process.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *