How To Install Nmap on AlmaLinux 9

In this guide, we want to teach you How To Install and Use Nmap on AlmaLinux 9.

Nmap is defined as a tool that can detect or diagnose services that are running on an Internet-connected system by a network administrator in their networked system used to identify potential security flaws. It is used to automate redundant tasks, such as monitoring the service.

Nmap provides the network details and also helps to determine the security flaws present in the system. Nmap is platform-independent and runs on popular operating systems such as Linux, Windows, and Mac.

Steps To Install and Use Nmap on AlmaLinux 9

To complete this guide, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide on Initial Server Setup with AlmaLinux 9.

Install Nmap on AlmaLinux 9

By default, Nmap packages are available in the default AlmaLinux repository.

First, update your local package index by using the command below:

sudo dnf update -y

Then, use the command below to install Nmap on your server:

sudo dnf install nmap -y

Verify your Nmap installation by checking its version:

nmap --version

In your output you will see:

Output
Nmap version 7.91 ( https://nmap.org )
Platform: x86_64-redhat-linux-gnu
Compiled with: nmap-liblua-5.3.5 openssl-3.0.1 libz-1.2.11 libpcre-8.44 libpcap-1.10.0 nmap-libdnet-1.12 ipv6
Compiled without: libssh2
Available nsock engines: epoll poll select

How To Use Nmap Scanner

When you have completed the Nmap installation process on AlmaLinux 9, let’s see some basic usage of it.

Nmap provides a list of scanned targets along with supplemental information, based on the options and arguments used.

Note: Remember that port scanning to find open ports without permissions can be interpreted as malicious by third-party organizations.

Nmap Port States Definitions

First, you should know the Nmap port states definitions:

  • closed – the target port is reachable, but no application is listening or accepting.
  • open – the target port is accepting either TCP, UDP, or SCTP.
  • filtered – the target port cannot be successfully determined by nmap to be open or closed due to packet filtering.
  • unfiltered – the port is reachable, but cannot be determined if open or closed by nmap.
  • closed|filtered – nmap reaches the target and nmap cannot determine if the port is open or closed.
  • open|filtered – nmap cannot determine if a port is open or filtered.

Scan IP range or subnet

You can get general information about a remote system with the following command:

sudo nmap target_IP or domain.com

Also, you can use Nmap to scan a whole IP range by defining it in your command line instead of scanning individual IPs on AlmaLinux 9:

sudo nmap 192.168.1.5-200

You can scan the entire specified subnet with the following command:

sudo nmap 192.168.1.0/24

By default, Nmap scans the thousand most common ports for each protocol. It also offers options for specifying which ports are to be scanned.

The -p option allows you to specify port ranges:

sudo nmap –p 80,443 192.168.1.200

This command scans ports 80 and 443 for the defined host.

Nmap options

Nmap has the option to define the speed and thoroughness of the scan that you can use on your AlmaLinux 9 server.

Scan speeds start at T0 and span to T5.

The –v option increases verbosity and forces Nmap to print more information about the scan in progress.

The -A option enables a comprehensive set of scan options:

  1. OS detection, you can use the -O option for this instead.
  2. version scanning, also available in the -sV option.
  3. script scanning, also available with the -sC option.
  4. traceroute, also available with the –traceroute option.

You can combine the options listed to detect the OS and version, script scanning, and traceroute. You can also use –A and –T4 for faster execution. Additionally, the –Pn option to tell the Nmap tool not to initiate a ping scan:

sudo nmap –A –T4 –v –Pn orcacore.com

For more details and more options about Nmap on AlmaLinux 9, you can use the following command:

man nmap

Or you can access the NMAP page to get more information.

Conclusion

At his point, you have learned to Install and Use Nmap on AlmaLinux 9.

Hope you enjoy it.

You may be like these articles:

How To Install Zenmap on Ubuntu 20.04

How To Set up Zenmap on Ubuntu 22.04

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!