{"id":13670,"date":"2022-01-07T09:29:18","date_gmt":"2022-01-07T09:29:18","guid":{"rendered":"https:\/\/linuxways.net\/?p=13670"},"modified":"2022-01-07T09:29:18","modified_gmt":"2022-01-07T09:29:18","slug":"how-to-install-nmap-on-fedora-34-35","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/red-hat\/how-to-install-nmap-on-fedora-34-35\/","title":{"rendered":"How to Install Nmap on Fedora 34 \/ 35"},"content":{"rendered":"<p><a href=\"https:\/\/nmap.org\/\">Nmap<\/a>, short for Network Mapper, is an open-source and cross-platform tool used for network discovery and vulnerability scanning. It is mostly used by network administrators and security professionals to discover live hosts in a network and perform a security audit. It scans all the live hosts in a network and displays a wide range of information including device name, IP address, list of open ports, services, OS type and so much more.<\/p>\n<p>In this tutorial, we explore how to install Nmap on Fedora 34\/35.<\/p>\n<h2><strong>Install Nmap on Fedora using DNF package manager<\/strong><\/h2>\n<p>Nmap is available in the default Fedora Project repositories and can be installed using the dnf package manager as follows:<\/p>\n<pre><strong>$ sudo dnf install nmap<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"758\" height=\"457\" class=\"wp-image-13671\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-115.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-115.png 758w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-115-300x181.png 300w\" sizes=\"auto, (max-width: 758px) 100vw, 758px\" \/><\/strong><\/p>\n<h2><strong>Install Nmap on Fedora using snap packages<\/strong><\/h2>\n<p>Alternatively, you can install Nmap from snap. But first, you must ensure that Snapd daemon is enabled. To do so, enable snapd as shown.<\/p>\n<pre><strong>$ sudo dnf install snapd<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"824\" height=\"483\" class=\"wp-image-13672\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-116.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-116.png 824w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-116-300x176.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-116-768x450.png 768w\" sizes=\"auto, (max-width: 824px) 100vw, 824px\" \/><\/strong><\/p>\n<p>Next, enable snap classic support<\/p>\n<pre><strong>$ sudo ln -s \/var\/lib\/snapd\/snap \/snap<\/strong><\/pre>\n<p><strong><img loading=\"lazy\" decoding=\"async\" width=\"824\" height=\"136\" class=\"wp-image-13673\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-117.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-117.png 824w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-117-300x50.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-117-768x127.png 768w\" sizes=\"auto, (max-width: 824px) 100vw, 824px\" \/><\/strong><\/p>\n<p>With snap installed and enabled, install Nmap as shown.<\/p>\n<pre><strong>$ sudo snap install nmap<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"828\" height=\"162\" class=\"wp-image-13674\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-118.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-118.png 828w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-118-300x59.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-118-768x150.png 768w\" sizes=\"auto, (max-width: 828px) 100vw, 828px\" \/><\/p>\n<h2><strong>Using Nmap with command-line examples<\/strong><\/h2>\n<p>With Nmap installed, let us now explore how you can use Nmap to scan your hosts. Nmap uses a basic syntax as follows.<\/p>\n<pre><strong>$ nmap [ ip-address ] or [ domain-name ]<\/strong><\/pre>\n<p>For example, to scan your system, run the command:<\/p>\n<pre><strong>$ nmap localhost<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"827\" height=\"336\" class=\"wp-image-13675\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-119.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-119.png 827w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-119-300x122.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-119-768x312.png 768w\" sizes=\"auto, (max-width: 827px) 100vw, 827px\" \/><\/p>\n<p>To scan a remote host, you can specify an IP address or domain name. For example, you can scan a remote host by providing its IPv4 address as shown.<\/p>\n<pre><strong>$ nmap 192.168.2.101<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"823\" height=\"392\" class=\"wp-image-13676\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-120.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-120.png 823w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-120-300x143.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-120-768x366.png 768w\" sizes=\"auto, (max-width: 823px) 100vw, 823px\" \/><\/p>\n<p>Alternatively, you can also provide its domain name. Here, <strong>cjs.co.ke <\/strong>is the domain name.<\/p>\n<pre><strong>$ nmap cjs.co.ke<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"824\" height=\"336\" class=\"wp-image-13677\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-121.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-121.png 824w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-121-300x122.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-121-768x313.png 768w\" sizes=\"auto, (max-width: 824px) 100vw, 824px\" \/><\/p>\n<p>In addition, you can scan an entire subnet, using the CIDR notation as shown. For instance, here, we are scanning all the hosts in the <strong>192.168.2.0<\/strong> subnet.<\/p>\n<pre><strong>$ nmap 192.168.2.0\/24<\/strong><\/pre>\n<p>From the output, you can see that three active hosts have been discovered in the network and their details such as open ports have been displayed.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"828\" height=\"538\" class=\"wp-image-13678\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-122.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-122.png 828w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-122-300x195.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-122-768x499.png 768w\" sizes=\"auto, (max-width: 828px) 100vw, 828px\" \/><\/p>\n<p>To narrow down to scanning specific ports, use the <strong>-p<\/strong> option. Here, we are scanning the host for port 80 only.<\/p>\n<pre><strong>$ nmap -p 80 192.168.2.104<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"827\" height=\"284\" class=\"wp-image-13679\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-123.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-123.png 827w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-123-300x103.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-123-768x264.png 768w\" sizes=\"auto, (max-width: 827px) 100vw, 827px\" \/><\/p>\n<p>You can scan multiple ports as shown.<\/p>\n<pre><strong>$ nmap -p 80,22 192.168.2.104<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"827\" height=\"286\" class=\"wp-image-13680\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-124.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-124.png 827w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-124-300x104.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-124-768x266.png 768w\" sizes=\"auto, (max-width: 827px) 100vw, 827px\" \/><\/p>\n<p>The <strong>-sV <\/strong>option displays the version of running services. This comes in handy when enumerating hosts to check which services are outdated and need to be updated.<\/p>\n<pre><strong>$ nmap -sV 192.168.2.104<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"830\" height=\"304\" class=\"wp-image-13681\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-125.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-125.png 830w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-125-300x110.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-125-768x281.png 768w\" sizes=\"auto, (max-width: 830px) 100vw, 830px\" \/><\/p>\n<p>To probe for the OS ( Operating System ) information use the <strong>-O <\/strong>option. Be advised that the scan provides the type of OS but doesn\u2019t give an accurate or exact OS version and kernel.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"825\" height=\"483\" class=\"wp-image-13682\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-126.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-126.png 825w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-126-300x176.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2022\/01\/word-image-126-768x450.png 768w\" sizes=\"auto, (max-width: 825px) 100vw, 825px\" \/><\/p>\n<p>For help on Nmap command options, run the command below.<\/p>\n<pre><strong>$ nmap --help<\/strong><\/pre>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>Nmap is an essential enumeration tool used in penetration testing and Ethical hacking to scan for vulnerabilities associated with outdated services which are easily exploitable. In this guide, we have covered the Nmap scanning tool and went ahead to demonstrate how you can use the tool to enumerate remote hosts and view open ports.<\/p>","protected":false},"excerpt":{"rendered":"<p>Nmap, short for Network Mapper, is an open-source and cross-platform tool used for network discovery and vulnerability scanning. It is mostly used by network administrators and security professionals&hellip;<\/p>","protected":false},"author":1,"featured_media":13728,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[165],"tags":[826,201],"class_list":["post-13670","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-red-hat","tag-fedora-34","tag-nmap"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/13670","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=13670"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/13670\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/13728"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=13670"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=13670"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=13670"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}