{"id":184,"date":"2015-07-06T14:14:49","date_gmt":"2015-07-06T14:14:49","guid":{"rendered":"https:\/\/www.nonamehosts.com\/blog\/?p=184"},"modified":"2015-07-06T14:14:49","modified_gmt":"2015-07-06T14:14:49","slug":"basic-nmap-commands","status":"publish","type":"post","link":"https:\/\/www.nonamehosts.com\/blog\/tutorials\/basic-nmap-commands\/","title":{"rendered":"Basic NMAP commands"},"content":{"rendered":"<p>NMAP(Network Mapping) is one of the important network monitoring tool. Which checks for what ports are opened on a machine.<\/p>\n<p><!--more--><\/p>\n<p>Let us start with some examples to better understand nmap command:<br \/>\nExample1 : Scanning for a single port on a machine<br \/>\n<em>nmap \u2013p portnumber hostname<\/em><\/p>\n<pre class=\"lang:sh decode:true \">nmap -p 22 192.168.0.1<\/pre>\n<p>Example2 : Scan entire machine for checking open ports.<br \/>\n<em>nmap hostname<\/em><\/p>\n<pre class=\"lang:sh decode:true \">nmap 192.168.0.1<\/pre>\n<p>Example3 : Scan remote machine for open ports<br \/>\n<em>nmap remote-ip\/host<\/em><\/p>\n<pre class=\"lang:sh decode:true\">nmap 192.168.0.2<\/pre>\n<p>Example4: Scan entire network for IP address and open ports.<br \/>\n<em>nmap network ID\/subnet-mask<\/em><\/p>\n<pre class=\"lang:sh decode:true \">nmap 192.168.1.0\/24<\/pre>\n<p>Example5: Scan just ports, dont scan for IP address, hardware address, hostname, operating system name, version, and uptime etc. It\u2019s very much fast as it said in man pages etc.<br \/>\n<em>nmap \u2013F hostname<\/em><\/p>\n<pre class=\"lang:sh decode:true\">nmap -F 192.168.1.1<\/pre>\n<p>Example6: Scan the machine and give as much details as possible.<br \/>\n<em>nmap -v hostname<\/em><\/p>\n<pre class=\"lang:sh decode:true \">nmap -v 192.168.1.1<\/pre>\n<p>Example7 : Scan a machine for TCP open ports<br \/>\n<em>nmap \u2013sT hostname<\/em><\/p>\n<pre class=\"lang:sh decode:true\">nmap -sT 192.168.1.1<\/pre>\n<p>Example8 : Scan a machine for UDP open ports.<br \/>\n<em>nmap \u2013sU hostname<\/em><\/p>\n<pre class=\"lang:sh decode:true \">nmap -sU 192.168.1.1<\/pre>\n<p>Exmaple9 : Scanning for ports and to get what is the version of different services running on that machine<br \/>\n<em>nmap \u2013sV hostname<\/em><\/p>\n<pre class=\"lang:sh decode:true\">nmap -sV 192.168.1.1<\/pre>\n<p>Example10 : To check which protocol(not port) such as TCP, UDP, ICMP etc is supported by the remote machine. This -sO will give you the protocol supported and its open status.<br \/>\n<em>nmap \u2013sO hostname<\/em><\/p>\n<pre class=\"lang:sh decode:true\">nmap -sO localhost<\/pre>\n<p>Example11 : To scan a system for operating system and uptime details<br \/>\n<em>nmap -O hostname<\/em><\/p>\n<pre class=\"lang:sh decode:true \">nmap -O 192.168.1.1<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NMAP(Network Mapping) is one of the important network monitoring tool. Which checks for what ports are opened on a machine.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[68,87],"class_list":["post-184","post","type-post","status-publish","format-standard","hentry","category-tutorials","tag-linux","tag-nmap"],"_links":{"self":[{"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/posts\/184","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/comments?post=184"}],"version-history":[{"count":0,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/posts\/184\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/media?parent=184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/categories?post=184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/tags?post=184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}