{"id":84,"date":"2009-07-04T10:50:21","date_gmt":"2009-07-04T09:50:21","guid":{"rendered":"http:\/\/mccltd.net\/blog\/?p=84"},"modified":"2010-08-07T09:52:06","modified_gmt":"2010-08-07T08:52:06","slug":"nmap-on-freebsd-openbsd-netbsd","status":"publish","type":"post","link":"http:\/\/darenmatthews.com\/blog\/?p=84","title":{"rendered":"Nmap on FreeBSD \/ OpenBSD \/ NetBSD"},"content":{"rendered":"<p>(&#8220;Network Mapper&#8221;) is a free and open source utility for network exploration or security auditing.  Many systems and network administrators also find it useful for tasks such as network inventory, managing service upgrade schedules, and monitoring host or service uptime.<\/p>\n<p><!--more--> Nmap uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS versions) they are running, what type of packet filters\/firewalls are in use, and dozens of other characteristics.<\/p>\n<p>The BSD flavors are well supported by Nmap..<\/p>\n<p>So you can simply compile it from source as described in <a title=\"Unix Compilation and Installation from Source Code\" href=\"http:\/\/nmap.org\/book\/inst-source.html\">the section called \u201cUnix Compilation and Installation from Source Code\u201d<\/a>. This provides the normal advantages of always having the latest version and a flexible build process. If you prefer binary packages, these *BSD variants each maintain their own Nmap packages.<\/p>\n<p>Many BSD systems also have a <span><em>ports tree<\/em><\/span> which standardizes the compilation of popular applications.   Instructions for installing Nmap on the most popular *BSD variants follow.<\/p>\n<div lang=\"en\">\n<div>\n<div>\n<div>\n<h3><a name=\"inst-openbsd\"><\/a>OpenBSD Binary Packages and Source Ports Instructions<\/h3>\n<\/div>\n<\/div>\n<\/div>\n<p><a name=\"id449488\"><\/a>According to the <a href=\"http:\/\/www.openbsd.org\/faq\/\" target=\"_top\">OpenBSD FAQ<\/a>, users \u201c<span>are HIGHLY advised to use packages over building an application from ports. The OpenBSD ports team considers packages to be the goal of their porting work, not the ports themselves.<\/span>\u201d  That same FAQ contains detailed instructions for each method.  Here is a summary:<\/p>\n<div>\n<p><strong>Installation using binary packages<\/strong><\/p>\n<ol type=\"1\">\n<li>Choose a mirror from <a href=\"http:\/\/www.openbsd.org\/ftp.html\" target=\"_top\">http:\/\/www.openbsd.org\/ftp.html<\/a>, then FTP in and grab the Nmap package from <code>\/pub\/OpenBSD\/<em><code>&lt;version&gt;<\/code><\/em>\/packages\/<em><code>&lt;platform&gt;<\/code><\/em>\/nmap-<em><code>&lt;version&gt;<\/code><\/em>.tgz<\/code>. Or obtain it from the OpenBSD distribution CD-ROM.<\/li>\n<li>As root, execute: <span><strong>pkg_add -v nmap-<em><code>&lt;version&gt;<\/code><\/em>.tgz<\/strong><\/span><\/li>\n<\/ol>\n<\/div>\n<div>\n<p><strong>Installation using the source ports tree<\/strong><\/p>\n<ol type=\"1\">\n<li>If you do not already have a copy of the ports tree, obtain it via CVS using instructions at <a href=\"http:\/\/openbsd.org\/faq\/faq15.html\" target=\"_top\">http:\/\/openbsd.org\/faq\/faq15.html<\/a>.<\/li>\n<li>As root, execute the following command (replace <code>\/usr\/ports<\/code> with your local ports directory if it differs):<span><strong>cd \/usr\/ports\/net\/nmap &amp;&amp; make install clean<\/strong><\/span><\/li>\n<\/ol>\n<\/div>\n<\/div>\n<div lang=\"en\">\n<div>\n<div>\n<div>\n<h3><a name=\"inst-freebsd\"><\/a>FreeBSD Binary Package and Source Ports Instructions<\/h3>\n<\/div>\n<\/div>\n<\/div>\n<p><a name=\"id449606\"><\/a>The FreeBSD project has a whole <a href=\"http:\/\/www.freebsd.org\/doc\/en_US.ISO8859-1\/books\/handbook\/ports.html\" target=\"_top\">chapter<\/a> in their Handbook describing the package and port installation processes.  A brief summary of the process follows.<\/p>\n<div lang=\"en\">\n<div>\n<div>\n<div>\n<h4><a name=\"id449624\"><\/a>Installation of the binary package<\/h4>\n<\/div>\n<\/div>\n<\/div>\n<p>The easiest way to install the binary Nmap package is to run <span><strong>pkg_add -r nmap<\/strong><\/span>.  You can then run the same command with the <code>zenmap<\/code> argument if you want the X-Window front-end.  If you wish to obtain the package manually instead, retrieve it from <a href=\"http:\/\/freshports.org\/security\/nmap\" target=\"_top\">http:\/\/freshports.org\/security\/nmap<\/a> and <a href=\"http:\/\/freshports.org\/security\/zenmap\" target=\"_top\">http:\/\/freshports.org\/security\/zenmap<\/a> or the CDROM and run <span><strong>pkg_add <em><code>&lt;packagename.tgz&gt;<\/code><\/em><\/strong><\/span>.<\/div>\n<div lang=\"en\">\n<div>\n<div>\n<div>\n<h4><a name=\"id449662\"><\/a>Installation using the source ports tree<\/h4>\n<\/div>\n<\/div>\n<\/div>\n<div>\n<ol type=\"1\">\n<li>The ports tree is often installed with the system itself (usually in <code>\/usr\/ports<\/code>).  If you do not already have it, specific installation instructions are provided in the FreeBSD Handbook chapter referenced above.<\/li>\n<li>As root, execute the following command (replace <code>\/usr\/ports<\/code> with your local ports directory if it differs):<span><strong>cd \/usr\/ports\/security\/nmap &amp;&amp; make install clean<\/strong><\/span><\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<div lang=\"en\">\n<div>\n<div>\n<div>\n<h3><a name=\"inst-netbsd\"><\/a>NetBSD Binary Package Instructions<\/h3>\n<\/div>\n<\/div>\n<\/div>\n<p><a name=\"id449714\"><\/a>NetBSD has packaged Nmap for an enormous number of platforms, from the normal i386 to PlayStation 2, PowerPC, VAX, SPARC, MIPS, Amiga, ARM, and several platforms that I have never even heard of! Unfortunately they are not very up-to-date. A list of NetBSD Nmap packages is available from <a href=\"ftp:\/\/ftp.netbsd.org\/pub\/NetBSD\/packages\/pkgsrc\/net\/nmap\/README.html\" target=\"_top\">ftp:\/\/ftp.netbsd.org\/pub\/NetBSD\/packages\/pkgsrc\/net\/nmap\/README.html<\/a> and a description of using their package system to install applications is available at <a href=\"http:\/\/netbsd.org\/Documentation\/pkgsrc\/using.html\" target=\"_top\">http:\/\/netbsd.org\/Documentation\/pkgsrc\/using.html<\/a>.<\/p>\n<p>Recommended reading:<\/p>\n<p><a href=\"http:\/\/astore.amazon.co.uk\/mccltd-21\/detail\/0979958717\"><img src=\"http:\/\/ecx.images-amazon.com\/images\/I\/51pHBlAcnmL._SL75_.jpg\" alt=\"Nmap Network Scanning: The Official Nmap Project Guide to Network Discovery and Security Scanning\" \/><\/a><a href=\"http:\/\/astore.amazon.co.uk\/mccltd-21\/detail\/0979958717\">Nmap Network Scanning: The Offic&#8230;<\/a><br \/>\nby <span>Gordon Lyon<\/span><\/div>\n","protected":false},"excerpt":{"rendered":"<p>(&#8220;Network Mapper&#8221;) is a free and open source utility for network exploration or security auditing. Many systems and network administrators also find it useful for tasks such as network inventory, managing service upgrade schedules, and monitoring host or service uptime.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[5],"_links":{"self":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/84"}],"collection":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=84"}],"version-history":[{"count":7,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/84\/revisions"}],"predecessor-version":[{"id":998,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/84\/revisions\/998"}],"wp:attachment":[{"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=84"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=84"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/darenmatthews.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=84"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}