{"id":2270,"date":"2012-03-14T20:55:57","date_gmt":"2012-03-14T12:55:57","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=2270"},"modified":"2023-06-27T06:52:17","modified_gmt":"2023-06-27T06:52:17","slug":"how-to-install-nmap-on-rhel-6-linux-server","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-install-nmap-on-rhel-6-linux-server\/","title":{"rendered":"How to Install nmap on RHEL 6 Linux Server"},"content":{"rendered":"<p>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.<\/p>\n<p>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.<\/p>\n<p>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 <a href=\"https:\/\/webhostinggeeks.com\/best\/web-server\/\">top web servers<\/a> page.<\/p>\n<h2>Installing Nmap on RHEL 6<\/h2>\n<p>To install Nmap on your RHEL 6 server, you simply need to run the following yum command:<\/p>\n<pre>\r\n[root@rhel6 ~]# yum install nmap -y\r\n<\/pre>\n<p>This command will initiate the installation process. The system will resolve dependencies, run a transaction check, and then proceed to install the nmap package.<\/p>\n<pre>\r\n[root@rhel6 ~]# yum install nmap -y\r\nLoaded plugins: rhnplugin\r\nThis system is not registered with RHN.\r\nRHN support will be disabled.\r\nSetting up Install Process\r\nResolving Dependencies\r\n--> Running transaction check\r\n---> Package nmap.i686 2:5.21-3.el6 set to be updated\r\n--> Finished Dependency Resolution\r\n\r\nDependencies Resolved\r\n\r\n====================================================================================================\r\n Package          Arch             Version                   Repository                        Size\r\n====================================================================================================\r\nInstalling:\r\n nmap             i686             2:5.21-3.el6              DVD-RHEL6-Repository             2.2 M\r\n\r\nTransaction Summary\r\n====================================================================================================\r\nInstall       1 Package(s)\r\nUpgrade       0 Package(s)\r\n\r\nTotal download size: 2.2 M\r\nInstalled size: 7.2 M\r\nDownloading Packages:\r\nRunning rpm_check_debug\r\nRunning Transaction Test\r\nTransaction Test Succeeded\r\nRunning Transaction\r\n  Installing     : 2:nmap-5.21-3.el6.i686                                                       1\/1\r\n\r\nInstalled:\r\n  nmap.i686 2:5.21-3.el6\r\n\r\nComplete!\r\n<\/pre>\n<p>Once the installation is complete, you can type &#8216;nmap&#8217; without any arguments in the command line to display the available options for the nmap command:<\/p>\n<pre>\r\n[root@rhel6 ~]# nmap\r\n<\/pre>\n<p>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.<\/p>\n<pre>\r\n[root@rhel6 ~]# nmap\r\nNmap 5.21 ( http:\/\/nmap.org )\r\nUsage: nmap [Scan Type(s)] [Options] {target specification}\r\nTARGET SPECIFICATION:\r\n  Can pass hostnames, IP addresses, networks, etc.\r\n  Ex: scanme.nmap.org, microsoft.com\/24, 192.168.0.1; 10.0.0-255.1-254\r\n  -iL <inputfilename>: Input from list of hosts\/networks\r\n  -iR <num hosts>: Choose random targets\r\n  --exclude <host1[,host2][,host3],...>: Exclude hosts\/networks\r\n  --excludefile <exclude_file>: Exclude list from file\r\nHOST DISCOVERY:\r\n  -sL: List Scan - simply list targets to scan\r\n  -sP: Ping Scan - go no further than determining if host is online\r\n  -PN: Treat all hosts as online -- skip host discovery\r\n  -PS\/PA\/PU\/PY[portlist]: TCP SYN\/ACK, UDP or SCTP discovery to given ports\r\n  -PE\/PP\/PM: ICMP echo, timestamp, and netmask request discovery probes\r\n  -PO[protocol list]: IP Protocol Ping\r\n  -n\/-R: Never do DNS resolution\/Always resolve [default: sometimes]\r\n  --dns-servers <serv1[,serv2],...>: Specify custom DNS servers\r\n  --system-dns: Use OS's DNS resolver\r\n  --traceroute: Trace hop path to each host\r\nSCAN TECHNIQUES:\r\n  -sS\/sT\/sA\/sW\/sM: TCP SYN\/Connect()\/ACK\/Window\/Maimon scans\r\n  -sU: UDP Scan\r\n  -sN\/sF\/sX: TCP Null, FIN, and Xmas scans\r\n  --scanflags <flags>: Customize TCP scan flags\r\n  -sI <zombie host[:probeport]>: Idle scan\r\n  -sY\/sZ: SCTP INIT\/COOKIE-ECHO scans\r\n  -sO: IP protocol scan\r\n  -b <FTP relay host>: FTP bounce scan\r\nPORT SPECIFICATION AND SCAN ORDER:\r\n  -p <port ranges>: Only scan specified ports\r\n    Ex: -p22; -p1-65535; -p U:53,111,137,T:21-25,80,139,8080\r\n  -F: Fast mode - Scan fewer ports than the default scan\r\n  -r: Scan ports consecutively - don't randomize\r\n  --top-ports <number>: Scan <number> most common ports\r\n  --port-ratio <ratio>: Scan ports more common than <ratio>\r\nSERVICE\/VERSION DETECTION:\r\n  -sV: Probe open ports to determine service\/version info\r\n  --version-intensity <level>: Set from 0 (light) to 9 (try all probes)\r\n  --version-light: Limit to most likely probes (intensity 2)\r\n  --version-all: Try every single probe (intensity 9)\r\n  --version-trace: Show detailed version scan activity (for debugging)\r\nSCRIPT SCAN:\r\n  -sC: equivalent to --script=default\r\n  --script=<Lua scripts>: <Lua scripts> is a comma separated list of\r\n           directories, script-files or script-categories\r\n  --script-args=<n1=v1,[n2=v2,...]>: provide arguments to scripts\r\n  --script-trace: Show all data sent and received\r\n  --script-updatedb: Update the script database.\r\nOS DETECTION:\r\n  -O: Enable OS detection\r\n  --osscan-limit: Limit OS detection to promising targets\r\n  --osscan-guess: Guess OS more aggressively\r\nTIMING AND PERFORMANCE:\r\n  Options which take <time> are in milliseconds, unless you append 's'\r\n  (seconds), 'm' (minutes), or 'h' (hours) to the value (e.g. 30m).\r\n  -T<0-5>: Set timing template (higher is faster)\r\n  --min-hostgroup\/max-hostgroup <size>: Parallel host scan group sizes\r\n  --min-parallelism\/max-parallelism <time>: Probe parallelization\r\n  --min-rtt-timeout\/max-rtt-timeout\/initial-rtt-timeout <time>: Specifies\r\n      probe round trip time.\r\n  --max-retries <tries>: Caps number of port scan probe retransmissions.\r\n  --host-timeout <time>: Give up on target after this long\r\n  --scan-delay\/--max-scan-delay <time>: Adjust delay between probes\r\n  --min-rate <number>: Send packets no slower than <number> per second\r\n  --max-rate <number>: Send packets no faster than <number> per second\r\nFIREWALL\/IDS EVASION AND SPOOFING:\r\n  -f; --mtu <val>: fragment packets (optionally w\/given MTU)\r\n  -D <decoy1,decoy2[,ME],...>: Cloak a scan with decoys\r\n  -S <IP_Address>: Spoof source address\r\n  -e <iface>: Use specified interface\r\n  -g\/--source-port <portnum>: Use given port number\r\n  --data-length <num>: Append random data to sent packets\r\n  --ip-options <options>: Send packets with specified ip options\r\n  --ttl <val>: Set IP time-to-live field\r\n  --spoof-mac <mac address\/prefix\/vendor name>: Spoof your MAC address\r\n  --badsum: Send packets with a bogus TCP\/UDP\/SCTP checksum\r\n  --adler32: Use deprecated Adler32 instead of CRC32C for SCTP checksums\r\nOUTPUT:\r\n  -oN\/-oX\/-oS\/-oG <file>: Output scan in normal, XML, s|<rIpt kIddi3,\r\n     and Grepable format, respectively, to the given filename.\r\n  -oA <basename>: Output in the three major formats at once\r\n  -v: Increase verbosity level (use twice or more for greater effect)\r\n  -d[level]: Set or increase debugging level (Up to 9 is meaningful)\r\n  --reason: Display the reason a port is in a particular state\r\n  --open: Only show open (or possibly open) ports\r\n  --packet-trace: Show all packets sent and received\r\n  --iflist: Print host interfaces and routes (for debugging)\r\n  --log-errors: Log errors\/warnings to the normal-format output file\r\n  --append-output: Append to rather than clobber specified output files\r\n  --resume <filename>: Resume an aborted scan\r\n  --stylesheet <path\/URL>: XSL stylesheet to transform XML output to HTML\r\n  --webxml: Reference stylesheet from Nmap.Org for more portable XML\r\n  --no-stylesheet: Prevent associating of XSL stylesheet w\/XML output\r\nMISC:\r\n  -6: Enable IPv6 scanning\r\n  -A: Enables OS detection and Version detection, Script scanning and Traceroute\r\n  --datadir <dirname>: Specify custom Nmap data file location\r\n  --send-eth\/--send-ip: Send using raw ethernet frames or IP packets\r\n  --privileged: Assume that the user is fully privileged\r\n  --unprivileged: Assume the user lacks raw socket privileges\r\n  -V: Print version number\r\n  -h: Print this help summary page.\r\nEXAMPLES:\r\n  nmap -v -A scanme.nmap.org\r\n  nmap -v -sP 192.168.0.0\/16 10.0.0.0\/8\r\n  nmap -v -iR 10000 -PN -p 80\r\nSEE THE MAN PAGE (http:\/\/nmap.org\/book\/man.html) FOR MORE OPTIONS AND EXAMPLES\r\n<\/pre>\n<h2>Understanding Nmap Commands<\/h2>\n<p>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:<\/p>\n<ul>\n<li><span class=\"fw-bold\">-sS\/sT\/sA\/sW\/sM<\/span> \u2013 These options allow you to perform TCP SYN\/Connect()\/ACK\/Window\/Maimon scans.<\/li>\n<li><span class=\"fw-bold\">-sU<\/span> \u2013 This option allows you to perform a UDP Scan.<\/li>\n<li><span class=\"fw-bold\">-sN\/sF\/sX<\/span> \u2013 These options allow you to perform TCP Null, FIN, and Xmas scans.<\/li>\n<li><span class=\"fw-bold\">-sV<\/span> \u2013 This option allows you to probe open ports to determine service\/version info.<\/li>\n<li><span class=\"fw-bold\">-O<\/span> \u2013 This option enables OS detection.<\/li>\n<\/ul>\n<p>For a more comprehensive list of commands and their functions, you can refer to the Nmap man page.<\/p>\n<h2>Conclusion<\/h2>\n<p>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.<\/p>\n<p>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.<\/p>\n<p>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.<\/p>\n<h2>FAQ Section<\/h2>\n<ol itemscope itemtype=\"https:\/\/schema.org\/FAQPage\">\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">What is Nmap and what is it used for?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">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.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">How do I install Nmap on a RHEL 6 server?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">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.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">What are some key commands I can use with Nmap?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">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.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">Can Nmap be used on all operating systems?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">Yes, Nmap is compatible with all major computer operating systems. Official binary packages are available for Linux, Windows, and Mac OS X.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">What is the purpose of the &#8216;yum install nmap -y&#8217; command?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">The &#8216;yum install nmap -y&#8217; command is used to install Nmap on a Red Hat Enterprise Linux (RHEL) server. The &#8216;yum&#8217; part of the command is the package manager for the server, &#8216;install&#8217; is the command to install a package, &#8216;nmap&#8217; is the package to be installed, and &#8216;-y&#8217; is an option that automatically answers yes to any prompts that may come up during the installation process.<\/span>\n            <\/p>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>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&#8230;<\/p>\n","protected":false},"author":6,"featured_media":1499,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[2058],"tags":[2111,1536,1546,2091,1713,1715,1744],"class_list":["post-2270","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-rhel","tag-audit","tag-linux","tag-linux-utilities","tag-nmap","tag-rhel","tag-rhel-6","tag-security"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/2270","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=2270"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/2270\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/1499"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=2270"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=2270"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=2270"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}