<?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>[LINICKX].com &#187; how to</title>
	<atom:link href="http://www.linickx.com/tag/how-to/feed" rel="self" type="application/rss+xml" />
	<link>http://www.linickx.com</link>
	<description>Moments of Genius followed by Trash.</description>
	<lastBuildDate>Tue, 07 Feb 2012 15:06:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Building a free Dynamic DNS client with rackspace Cloud</title>
		<link>http://www.linickx.com/3442/building-a-free-dynamic-dns-client-with-rackspace-cloud</link>
		<comments>http://www.linickx.com/3442/building-a-free-dynamic-dns-client-with-rackspace-cloud#comments</comments>
		<pubDate>Sun, 30 Oct 2011 21:46:36 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[rsdns]]></category>

		<guid isPermaLink="false">http://www.linickx.com/?p=3442</guid>
		<description><![CDATA[As a cloud server customer you get access to rackspace&#8217;s free DNS service. When I fist saw this product I had an instance light-bulb moment, I could stop paying for a dynamic DNS service and build my own private one. &#8230; <a href="http://www.linickx.com/3442/building-a-free-dynamic-dns-client-with-rackspace-cloud">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rackspace.com/cloud/cloud_hosting_products/dns/"><img src="http://www.linickx.com/files/2011/10/rsdns.png" alt="" title="rsdns" width="200" height="173" class="alignright size-full wp-image-3447" /></a><br />
As a <a href="http://www.rackspace.co.uk/cloud-hosting/cloud-products/cloud-servers/">cloud server</a> customer you get access to <a href="http://www.rackspace.com/cloud/cloud_hosting_products/dns/">rackspace&#8217;s free DNS service</a>.</p>
<p>When I fist saw this product I had an instance light-bulb moment, I could stop paying for a dynamic DNS service and build my own private one. As a broadband (DHCP) user I have a very basic requirement of needing to regularly update an A record so that I can find my pc <img src='http://www.linickx.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>To bring my idea into fruition I began researching; I need a cli tool which I could run from cron on my linux box (<em>to send the DNS update requests to rackspace</em>). In my research I found <a href="https://github.com/jsquared">rscurl</a>, a cli tool to control cloud servers, as rackspace have a standard API for all their products I have been able to use rscurl to develop <a href="https://github.com/linickx/rsdns">rsdns.</a></p>
<p>rsdns is a series of cli tools to adding/deleting/changing rackspace DNS records, as part of the tool development I have created a script called <code>rsdns-dc.sh</code> to run on my machine, below is a short how to:</p>
<p><strong>How to get free dynamic dns from rackspace.</strong></p>
<p><span id="more-3442"></span></p>
<p><u>Pre-requisit</u>: This is for linux/mac, if you want to do this on windows you&#8217;ll need bash, curl, awk, sed &amp; dig installed &#8211; google is your friend.</p>
<p>The instructions below assume that you (a) have a domain and (b) have already changed your NS records to point to dns1.stabletransit.com &#038; dns2.stabletransit.com. </p>
<p><a href="https://github.com/linickx/rsdns/tarball/master">Download the latest rsdns from gitgub</a> and unpack somewhere, I like <code>~/bin/rsdns</code>.</p>
<p>Go to your rackspace management portal and grap your username &amp; API key (<em>It&#8217;s under &#8220;Your Account&#8221; -&gt; &#8220;API Access&#8221;</em>)</p>
<p>Create a config file for rsdns (<code>~/.rsdns_config</code>) with your settings.</p>
<pre class="brush: bash; title: ; notranslate">
RSUSER=linickx
RSAPIKEY=123456
RSPATH=~/bin/rsdns/
</pre>
<p>You need your domain <em>created</em> on rackspace, you can either use rackspaces GUI to do this (<em>It&#8217;s under &#8220;Hosting&#8221; -&gt; &#8220;Cloud Servers&#8221; -&gt; &#8220;serverabc&#8221; -&gt; &#8220;DNS&#8221; </em>) or you can use rsdns, like so.</p>
<pre class="brush: bash; title: ; notranslate">
[LINICKX@SERVER rsdns]$./rsdns-domain.sh -d www.linickx.com -e spam@linickx.com
</pre>
<p>Once you have a domain setup you need an A record, this step was a deliberate design to avoid any rouge cron jobs from creating a million records, the dynamic client will only update an existing record &#8211; not create a new one. </p>
<p>To create the a record you going to need an IP address, it can be something random like the below, or you can use <a href="http://icanhazip.com">http://icanhazip.com</a> to get your actual current IP. Again to create a record, you can use the rackspace GUI (<em>It&#8217;s under &#8220;Hosting&#8221; -&gt; &#8220;Cloud Servers&#8221; -&gt; &#8220;serverabc&#8221; -&gt; &#8220;DNS&#8221; -&gt; &#8220;yourdomain&#8221; &gt; &#8220;Add&#8221;</em>) or you can use rsdns&#8230;.</p>
<pre class="brush: bash; title: ; notranslate">
[LINICKX@SERVER rsdns]$./rsdns-a.sh -n dynamichost.linickx.com -i 123.123.123.123 -t 3600
</pre>
<p>In the above the TTL is set to 1hr, this is so that DNS caches do not keep the record too long. That&#8217;s all the pre-work done, now lets get your dynamic host setup!</p>
<p>The script to update your a record is <code>rsdns-dc.sh</code>, and you run it like this&#8230;</p>
<pre class="brush: bash; title: ; notranslate">
[LINICKX@SERVER rsdns]$./rsdns-dc.sh -n dynamichost.linickx.com
</pre>
<p>Easy huh? The script uses icanhazip to get your current IP, it then update the A record with it.</p>
<p>I never switch off my router so I have create a created a cronjob to run that script every 2 hours, plus the 1hr TTL <em>should</em> mean that the record is roughly in sync with my IP without making unnecessary requests &#8211; You can run the script more often if you like, just stay under the limits &#8211;&gt; according to <a href="http://docs.rackspace.com/cdns/api/v1.0/cdns-devguide/content/Rate_Limits-d1e1222.html">the API guidelines</a> you can make upto 25 changes per min / 2 per second.</p>
<p>I use redhat based linux systems, so I can simply drop the following file called rsdns-dc into <code>/etc/cron.d/</code> with this&#8230;</p>
<pre class="brush: plain; title: ; notranslate">
* */2  * * *     linickx /home/linickx/bin/rsdns/rsdns-dc.sh -n dynamichost.linickx.com &amp;&gt;/dev/null
</pre>
<p>Now we are actually done! Free private Dynamic DNS on your own zone, what more could you want?</p>
<img src="http://www.linickx.com/wp/wp-content/themes/linickx_v2/images/nick_sig_bggrey.png" alt="Nick" /> <hr/>Copyright &copy; 2012 <strong><a href="http://www.linickx.com">[LINICKX].com</a></strong>. This Feed is for personal non-commercial use only. Please check my <a href="http://www.linickx.com/?page_id=63">Site Terms and Conditions</a> for full details on copyrights. If you have any concerns with the content of this feed you may <a href="http://www.linickx.com/contact">contact me here</a>.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">WP Copyright Plugin</a></span>]]></content:encoded>
			<wfw:commentRss>http://www.linickx.com/3442/building-a-free-dynamic-dns-client-with-rackspace-cloud/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Cisco VPN 3k Config for iPhone</title>
		<link>http://www.linickx.com/352/cisco-vpn-3k-config-for-iphone</link>
		<comments>http://www.linickx.com/352/cisco-vpn-3k-config-for-iphone#comments</comments>
		<pubDate>Thu, 20 Dec 2007 13:22:50 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://www.linickx.com/archives/352/cisco-vpn-3k-config-for-iphone</guid>
		<description><![CDATA[Recently I was asked if I could help setup a VPN connection between an Apple iPhone and a Cisco VPN Concentrator 3000, my 1st round of googling didn&#8217;t look good, there&#8217;s a discussion here complaining about how crap vpn support &#8230; <a href="http://www.linickx.com/352/cisco-vpn-3k-config-for-iphone">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently I was asked if I could help setup a VPN connection between an Apple iPhone and a Cisco VPN Concentrator 3000, my 1st round of googling didn&#8217;t look good, there&#8217;s <a href="http://discussions.apple.com/thread.jspa?messageID=5935351">a discussion here</a> complaining about how crap vpn support on the iphone is; further searching lead me to a <a href="http://www.cisco.com/en/US/docs/security/asa/asa80/configuration/guide/l2tp_ips.html#wp1046219">Cisco document</a> which specifically targets mac clients, this document is for ASA configuration, but if you look carefully* everything you need is in there.</p>
<p>*No, I didn&#8217;t get this working 1st time, it took me a good couple of hours of googling, but looking back I can see that all the info is there.</p>
<p>The key to getting this working is that the iphone side is not as configurable as it should be, so if you&#8217;re trying to get this to work you need to be talking to the IT administrator to get the concentrator side changed. The 1st word of warning is that the iphone client doesn&#8217;t support group authentication, so you&#8217;re going to be changing the base group, now by default most &#8220;production&#8221; groups will inherit settings from the base group, so you will need to make sure that if you change anything in the base group that it doesn&#8217;t effect your other L2L or Remote Access tunnels. (<em>You have been warned.</em>)</p>
<p>To get started, for whatever reason the iphone only supports cisco&#8217;s NAT-T implementation of IPSEC, so if you have a firewall or access-list in front of your concentrator you&#8217;re going to need to open up UDP 4500, then enable NAT Transparency. Another word of warning about NAT-T, we found that existing VPNS to Cisco Routers started to fail after enabling this, which was a bit odd as NAT-T wasn&#8217;t enabled under any of the L2L profiles, anyway, to fix the issue we enabled NAT-T on the routers (again make sure UDP 4500 is allowed though any ACLs) and under &#8220;conf t&#8221; issue:</p>
<p><code>crypto ipsec nat-transparency udp-encapsulation</code></p>
<p>So, back to the cVPN3k config&#8230;&#8230;</p>
<p><code><br />
Configuration -> Tunnel &#038; Security -> NAT Transparency<br />
IPSEC over NAT-T  - <strong>TICK</strong><br />
</code></p>
<p>So a quick explanation of the above so you get the idea; from the tree on the left, click &#8220;Configuration&#8221; then &#8220;Tunnel &#038; Security&#8221; then &#8220;NAT Transparency&#8221; and tick the box next to NAT-T.</p>
<p>Now you need to setup your PHASE 1 Proposal&#8230;</p>
<p><code>Config -> Tunnel &#038; Sec -> IPSEC -> IKE Proposal</code></p>
<p>I called mine iphone, and you need to configure the following settings.</p>
<ul>
<li>Authentication: Preshared Key (<em>NOT the one with Xauth</em>)</li>
<li>Hash: SHA-1</li>
<li>Encryption: 3DES</li>
<li>DiffeHelmen: Group 2</li>
</ul>
<p>After phase one, comes PHASE 2:</p>
<p><code>Config -> Policy Manage -> Traffic Mgnt -> SA</code></p>
<p>Again, add the following settings and I called mine: iphone</p>
<ul>
<li>Authentication: ESP / SHA</li>
<li>Encryption: 3DES</li>
<li>Enacapsulation: Transport</li>
<li>IKE Proposal = iphone (<em>or whatever your phase 1 was called</em>)</li>
</ul>
<p>Then finally we start working with the groups, so as mentioned above you need to work with the base group:</p>
<p><code>Config -> User Management -> Base Group</code></p>
<p>And you need to enable the following,  the other settings will be optional:</p>
<p>On the Base Group Tab,</p>
<ul>
<li>Tunnel Protocol: Tick &#8220;L2TP over IPSec&#8221;</li>
</ul>
<p>On the IPSEC Tab,</p>
<ul>
<li>Authentication: Internal or NT depending on what you&#8217;ve already configured for other Remote Access Profiles. </li>
<li>IPSEC SA is set to: iphone</li>
<li>Default Preshared Key: Set this to something really really long (<em>this will be your secret on the iphone</em>)</li>
</ul>
<p>On the PPTP/L2TP Tab,</p>
<ul>
<li>L2TP Authentication Protocols: Tick MSCHAPv1 / MSCHAPv2</li>
<li>L2TP Encryption: Tick 40 &#038; 128 B</li>
</ul>
<p>DONE! Now with a little bit of luck your iphone should connect.</p>
<p>A Quick note about comments: <strong>All support requested will be deleted</strong>, I don&#8217;t have access to a concentrator to offer any meaningful advise, you use the above config at your own risk.</p>
<img src="http://www.linickx.com/wp/wp-content/themes/linickx_v2/images/nick_sig_bggrey.png" alt="Nick" /> <hr/>Copyright &copy; 2012 <strong><a href="http://www.linickx.com">[LINICKX].com</a></strong>. This Feed is for personal non-commercial use only. Please check my <a href="http://www.linickx.com/?page_id=63">Site Terms and Conditions</a> for full details on copyrights. If you have any concerns with the content of this feed you may <a href="http://www.linickx.com/contact">contact me here</a>.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">WP Copyright Plugin</a></span>]]></content:encoded>
			<wfw:commentRss>http://www.linickx.com/352/cisco-vpn-3k-config-for-iphone/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How to Import Vendor Specific Attributes into Cisco Secure ACS SE Applience</title>
		<link>http://www.linickx.com/317/how-to-import-vendor-specific-attributes-into-cisco-secure-acs-se-applience</link>
		<comments>http://www.linickx.com/317/how-to-import-vendor-specific-attributes-into-cisco-secure-acs-se-applience#comments</comments>
		<pubDate>Mon, 05 Nov 2007 16:35:34 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[acs]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[radius]]></category>

		<guid isPermaLink="false">http://www.linickx.com/archives/317/how-to-import-vendor-specific-attributes-into-cisco-secure-acs-se-applience</guid>
		<description><![CDATA[I wanted to write a document on how to import RADIUS VSA&#8217;s (vendor specific attributes) into cisco&#8217;s ACS SE (Solution Engine) appliance, the reason being that I couldn&#8217;t find any good examples on the net and cisco&#8217;s documentation just wasn&#8217;t &#8230; <a href="http://www.linickx.com/317/how-to-import-vendor-specific-attributes-into-cisco-secure-acs-se-applience">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I wanted to write a document on how to import RADIUS VSA&#8217;s (<em>vendor specific attributes</em>) into cisco&#8217;s ACS SE (<em>Solution Engine</em>) appliance, the reason being that I couldn&#8217;t find any good examples on the net and cisco&#8217;s documentation just wasn&#8217;t clear enough.</p>
<p>My purpose was to use RADIUS authentication between a Nokia IPSO appliance such that users who access voyager or ssh get authenticated centrally; for RADIUS authentication to work your authentication server (<span style="font-style: italic">in this case ACS</span>) needs to supply the AAA client (<span style="font-style: italic">in this can the ipso box</span>) with a &#8220;return list attribute&#8221;. By default ACS doesn&#8217;t have the nokia attributes; to import attributes you need to get your hands on a dictionary file, for nokia ipso it&#8217;s /etc/nokia.dictionary &#8211; I&#8217;ve a copy <a href="http://www.linickx.com/files/cisco/nokia-dictionary.txt">here</a>.</p>
<p>In you dictionary file you need to pick out some key elements, firstly the IANA-assigned enterprise code for the vendor and secondly a list of attributes to add. Using my nokia example the vendor code is the top line:</p>
<p><code>VENDOR        Nokia        94</code></p>
<p>Thus the code is 94 , and everything below that are attributes.</p>
<p>So&#8230; Getting started with ACS, firstly if you have AAA clients  which you want to use the new attributes you are going to need to delete them, and to be save reboot ACS. Now the import is done via the <a href="http://www.cisco.com/en/US/products/sw/secursw/ps5338/products_tech_note09186a00801ddba8.shtml">RDBMS sync process</a>, since you do not have OS level access to ACS you need to upload a file called &#8220;accountActions.csv&#8221; (<span style="font-style: italic">case sensitive</span>), uploading this file tells the internal database to perform some commands or actions, examples would be to bulk import some users or bulk group changes, in our case we&#8217;re going to insert a new &#8220;Vendor&#8221; into the RADIUS database, and then insert some attributes.</p>
<p>I  have created a file called <a href="http://www.linickx.com/files/cisco/createVendor_accountActions.csv">createVendor_accountActions.csv</a> if you renamed it to accountActions.csv and uploaded it to your ACS box via the RDBMS Sync tool (<em>under system configuration</em>) it&#8217;d perform the following actions:</p>
<ul>
<li>
<ul>
<li>Command  -1</li>
<li>Priority &#8211; 8</li>
<li>Action &#8211; 350 (<em>Create new Vendor</em>)</li>
<li>Vendor Name &#8211; Nokia</li>
<li>ACS Vendor Number &#8211; Auto Assigned</li>
<li>Vendor ID &#8211; 94</li>
<li>Date of DB Transaction &#8211; 25/09/2007 13:00</li>
</ul>
</li>
<li>
<ul>
<li>Command &#8211; 2</li>
<li>Priotity &#8211; 0</li>
<li>Action  &#8211; 355 (<em>Restart ACS Services</em>)</li>
<li>Date of DB Transaction &#8211; 25/09/2007 13:00</li>
</ul>
</li>
</ul>
<p>The command numbers are just like primary key fields in a database or row numbers in a spreadsheet, they need to be unique and incremental for each csv file, and the priority specify and order to apply the commands, you I guess you could set the priorities all to 0 and rely on the command number to process the file in order, but I set a priority just in case. After you apply the file ACS will be temporarily unavailable as the services restart.</p>
<p>Now, we look at one line of <a href="http://www.linickx.com/files/cisco/importAttributes_accountActions.csv">importAttributes_accountActions.csv</a>, again it would need to be renamed to  accountActions.csv, before uploaded, and lets take a look at one line.</p>
<ul>
<li>Command  -1</li>
<li>Priority &#8211; 7</li>
<li>Action &#8211; 352 (<em>Add VSA</em>)</li>
<li>Attribute Name &#8211; Nokia-IMSI</li>
<li>The vendor to assign the attribute to &#8211; 94 (<em>Nokia</em>)</li>
<li>Attribute ID &#8211; 224</li>
<li>Attribue type &#8211; integer (<em> can only be integer, string or ipaddr</em>)</li>
<li>Date of DB Transaction &#8211; 25/09/2007 13:00</li>
</ul>
<p>Hopefully this all starts to make sense when looking at your dictionary file, again the final line of the file restarts the services. An important thing to not here is that if you create a new vendor you need to re-start the services before you can apply an attribute to it, and you need to restart the services again to use the attributes&#8230; at this point here it&#8217;s probably worth mentioning that the version of ACS SE I&#8217;m using now (<em>4.1</em>) is a windows appliance, so if at any point your box hasn&#8217;t done what you think a reboot won&#8217;t hurt <img src='http://www.linickx.com/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Now you can add your AAA client and in my example you could set the vendor to RADIUS (Nokia)  , if you then go into interface configuration RADIUS (Nokia) will appear, go in there and tick all the boxes for &#8220;group&#8221;, finally if you go into your group setup at the very bottom will be a list of attributes you&#8217;ve imported and can use ! <img src='http://www.linickx.com/wp/wp-includes/images/smilies/icon_cool.gif' alt=':cool:' class='wp-smiley' /> </p>
<p>Just in can you need them here are my references:</p>
<p><a href="http://www.cisco.com/en/US/docs/net_mgmt/cisco_secure_access_control_server_for_windows/4.1/user/A_RDBMS.html">RDBMS Sync Import Definitions</a></p>
<p><a href="http://www.cisco.com/en/US/products/sw/secursw/ps5338/products_tech_note09186a00801ddba8.shtml">Importing an accountActions.csv file into ACS SE</a></p>
<p><a href="http://www.cisco.com/univercd/cc/td/doc/product/access/acs_soft/csacsapp/user/ag.htm">Universe CD version of RDBM SSync import Defs</a></p>
<img src="http://www.linickx.com/wp/wp-content/themes/linickx_v2/images/nick_sig_bggrey.png" alt="Nick" /> <hr/>Copyright &copy; 2012 <strong><a href="http://www.linickx.com">[LINICKX].com</a></strong>. This Feed is for personal non-commercial use only. Please check my <a href="http://www.linickx.com/?page_id=63">Site Terms and Conditions</a> for full details on copyrights. If you have any concerns with the content of this feed you may <a href="http://www.linickx.com/contact">contact me here</a>.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">WP Copyright Plugin</a></span>]]></content:encoded>
			<wfw:commentRss>http://www.linickx.com/317/how-to-import-vendor-specific-attributes-into-cisco-secure-acs-se-applience/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>n800 Getting started (n00b) Guide&#8230; Part Two.</title>
		<link>http://www.linickx.com/293/n800-getting-started-n00b-guide-part-two</link>
		<comments>http://www.linickx.com/293/n800-getting-started-n00b-guide-part-two#comments</comments>
		<pubDate>Mon, 15 Oct 2007 11:45:11 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[n800]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[maemo]]></category>
		<category><![CDATA[Nokia]]></category>

		<guid isPermaLink="false">http://www.linickx.com/archives/293/n800-getting-started-n00b-guide%ef%bf%bd-part-two</guid>
		<description><![CDATA[It&#8217;s taken me much longer to get this together than initially intended, so my apologies for that. Depending on your reasons for buying your n800 will make a difference to how much this document is relevant. What I wanted to &#8230; <a href="http://www.linickx.com/293/n800-getting-started-n00b-guide-part-two">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s taken me much longer to get this together than initially intended, so my apologies for that. Depending on your reasons for buying your n800 will make a difference to how much this document is relevant. What I wanted to do was concentrate on getting your n800 up and running, i.e. you&#8217;ve covered <a href="http://www.linickx.com/archives/292/n800-getting-started-n00b-guide-part-one">the basics</a>, now lets install some applications to make this brick useful.</p>
<p>Before <a href="http://maemo.org/community/wiki/howto_flashlatestnokiaimagewithlinux/">re-flashing</a> my device, I always take a list of what is installed, here&#8217;s what&#8217;s on there at the moment&#8230;<br />
<code><br />
becomeroot<br />
camera,<br />
canola<br />
dates<br />
devicescape<br />
fmradio<br />
hildon-theme-cacher<br />
hildon-theme-plankton<br />
maemo-serivice-handler<br />
maemo-wordpy<br />
maemokrypt<br />
media center<br />
microb-browser<br />
openvpn<br />
webmail notify<br />
mplayer<br />
navicore<br />
openssh<br />
oss-statusbar-cpu<br />
pidgin<br />
python2.5-runtime<br />
simplelauncher<br />
skype<br />
videocenter<br />
</code><br />
I won&#8217;t cover them all here, as we&#8217;d all fall asleep, so I&#8217;ll pick out some favourites&#8230;let&#8217;s get installing!</p>
<p><strong>Multi-Media</strong>, <em>Music &#8216;n&#8217; Video to you and me</em>.</p>
<p>In my opinion every n800 should have <a href="http://openbossa.indt.org/canola/">Canola</a> installed, it&#8217;s a great multimedia app. Canola has had some dependency issues in the past, so I&#8217;d recommend you install it before anything else. To get this working disable all your repo&#8217;s except the &#8220;Nokia Catalogue&#8221; and &#8220;Nokia Catalogue 3rd Party&#8221;, then hit this <a href="http://openbossa.indt.org.br/canola/repository-beta2/canola.install">canola one click install</a>.</p>
<p>UK Media Player (<em><a href="http://maemo.org/downloads/product/ukmp">UKMP</a></em>) is another great application to install for multi media, it has a couple of dependencies. You&#8217;ll need to switch on the extras repo, install <a href="http://maemo.org/downloads/product/mplayer/">mplayer</a> (<em>even if you don&#8217;t want ukmp, I&#8217;d recommend installing mplayer as it&#8217;s brilliant at playing back virtually any video file</em>) and <a href="http://maemo.org/downloads/product/python/">python</a> either by using the application manager or the one click install files.</p>
<p><strong>Utilities</strong>, <em>those little extras you might need</em>.</p>
<p>Here are some extras that&#8217;ll enhance your n800 experience, you should already have the <a href="http://maemo.org/downloads/product/osso-xterm-advanced">xterm</a> install right? But some other things that might take your fancy would be the <a href="http://maemo-hackers.org/wiki/OssoStatusbarCpu">oss-statusbar-cpu</a>it adds a nice little applet to the systray that show how &#8220;busy&#8221; your n800 is, and you can add some commands to it too! </p>
<p>Camera &#038; FM radio, are two Nokia apps that enhance what you can do with the n800 hardware that aren&#8217;t loaded by default, I&#8217;m not sure why&#8230; but to make it easier for you I&#8217;ve published a copy of my sources list, if your application manager has all these catalogues installed you should see the Camera and radio as options you can install.</p>
<p>Since writing my first document, <a href="http://maemo.org/downloads/product/openssh">OpenSSH</a> has made its way into a repo, whether you use that or dropbear is up to you, I prefer openssh as it supports the keys that I use on the rest of my linux kit.</p>
<p><a href="http://tigert.1g.fi/blog-files/n800-theme/">Plankton theme</a> is probably one of the most popular themes added to an n800, to get it working you&#8217;ll need both files plankton + hildon theme cacher&#8230; also as quick tip, always change your theme to a default Nokia one before running a backup and re-flashing your device&#8230; basically it&#8217;ll stop the restore trying to use plankton before you&#8217;ve installed it.</p>
<p><strong>Web</strong>, <em>well it is a Nokia touch, I mean internet tablet after all</em>.</p>
<p>I&#8217;d recommend you install the <a href="http://browser.garage.maemo.org/">firefox derived web browser for maemo</a>, it&#8217;ll allow you to run &#8220;non opera supported&#8221; sites like google docs. You can switch between the opera and firefox rendering engine; to do that you need to enable the hidden menu by editing /home/user/.browser and set <code>hidden=true</code> (<em><a href="http://www.internettablettalk.com/forums/showthread.php?p=60692#post60692">Reference</a></em>).</p>
<p>If you have a gmail or google apps account you&#8217;ll also want the Nokia mnotify, it&#8217;ll add a little applet to you systray &#8230; <a href="https://bugs.maemo.org/show_bug.cgi?id=2066">personally I&#8217;d prefer it to completely disappear if you haven&#8217;t got any new mail</a>.</p>
<p>If you&#8217;re into instant messaging, then you&#8217;ll need a copy of <a href="http://pidgin.garage.maemo.org/">pideon</a>. It&#8217;s installed in components so if you&#8217;re an msn or googletalk user make sure you install the correct protocol support, if all else fails install them all <img src='http://www.linickx.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>For mobile blogging you may want <a href="http://maemo-wordpy.garage.maemo.org/">maemo-wordpy</a>, it&#8217;s not yet something I&#8217;ve taken massive advantage of as I don&#8217;t have a keyboard and you need a reasonable amount of patience or practice to write a post with the stylus, but this is something I intend to tackle!</p>
<p><strong>Pim</strong>, <em>you know contacts and calendar stuff</em>.</p>
<p>There&#8217;s no right answer to this, infact I&#8217;ve still yet to find something that suites me. As a user, I prefer <a href="http://pimlico-project.org/dates.html">Dates</a>, <a href="http://pimlico-project.org/contacts.html">Contacts</a> and <a href="http://pimlico-project.org/tasks.html">tasks</a> by pimlico, they&#8217;re built on the existing nokia &#8220;contacts&#8221; back end (evolution data server), but I&#8217;ve yet to find a way of sync&#8217;ing them with anything which makes bulk importing and general day to day usage an issue.</p>
<p>The alternative is the GPE suite (<a href="http://maemo.org/downloads/product/gpe-calendar/">calendar</a>, <a href="http://maemo.org/downloads/product/gpe-contacts/">contacts</a> and <a href="http://maemo.org/downloads/product/gpe-todo/">todo</a>). Lots of people recommend GPE, originally I had dependency conflicts on my when I was running the 2nd version of ITOS, I&#8217;m yet to install it, but I plan to as there&#8217;s been lots of complementary projects like <a href="http://maemo.org/downloads/product/erminig/">erming</a> for google calendar syncing and <a href="http://maemo.org/downloads/product/gpesummary/">GPE summary</a> &#8211; a desktop applet summary of your tasks and calendar</p>
<p><strong>Ok, I think we&#8217;ll finish there&#8230;.</strong><br />
I think this post long enough, I&#8217;d like to also do a part 3 and look at the security apps you can install on your n800, this won&#8217;t be so much of a n00b guide cause it won&#8217;t appeal to most people but it&#8217;s one of the reasons the n800 caught my eye originally.</p>
<img src="http://www.linickx.com/wp/wp-content/themes/linickx_v2/images/nick_sig_bggrey.png" alt="Nick" /> <hr/>Copyright &copy; 2012 <strong><a href="http://www.linickx.com">[LINICKX].com</a></strong>. This Feed is for personal non-commercial use only. Please check my <a href="http://www.linickx.com/?page_id=63">Site Terms and Conditions</a> for full details on copyrights. If you have any concerns with the content of this feed you may <a href="http://www.linickx.com/contact">contact me here</a>.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">WP Copyright Plugin</a></span>]]></content:encoded>
			<wfw:commentRss>http://www.linickx.com/293/n800-getting-started-n00b-guide-part-two/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSS Styling Apache Directory Listings.</title>
		<link>http://www.linickx.com/343/css-styling-apache-directory-listings</link>
		<comments>http://www.linickx.com/343/css-styling-apache-directory-listings#comments</comments>
		<pubDate>Thu, 11 Oct 2007 08:44:54 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.linickx.com/archives/343/css-styling-apache-directory-listings</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div style="float:right">
<table <tr>
<td><a href='http://www.linickx.com/files/2008/05/apachedirlisting_before.png' rel="lightbox[343]"><img src="http://www.linickx.com/files/2008/05/apachedirlisting_before-150x150.png" alt="Before I change Apache" title="Default Apache Directory Listing " width="150" height="150" class="alignnone size-thumbnail wp-image-409" /></a></td>
<tr>
<td style="text-align:center"><strong>Before.</strong></td>
</tr>
</table>
</div>
<p>As part of <a href="http://www.linickx.com/archives/336/website-changes">my website overhaul</a>, I&#8217;ve finally gotten round to styling my <a href="http://www.linickx.com/files/">/files/</a> directory. I was surprised at how easy it was actually, and the benefits far out way the time taken to set it up, not only does this part of the site now &#8220;fit in&#8221;, but I can apply analytics tracking and adsense <img src='http://www.linickx.com/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  I&#8217;m sure there probably is a wordpress plugin that can achieve the same thing&#8230; probably better, but I find my list of plugins ever growing and since I don&#8217;t <em>need</em> on for this I figure if Apache can do it, let Apache do it!</p>
<p>The work can be done in one of two ways either by pasting Apache directives into a .htaccess file (<em>in the directory you want to apply conf to</em>), or in your httpd.conf you can wrap it all up in a
<pre class="brush: plain; title: ; notranslate">&lt;Directory&gt; </pre>
<p> tag&#8230; something like
<pre class="brush: plain; title: ; notranslate">&lt;Directory &quot;/var/www/html/files/&quot;&gt; foobar&gt; &lt;/Directory&gt;</pre>
<p> below is an example of a .htaccess file as that will apply to most people:</p>
<pre class="brush: plain; title: ; notranslate">
        RewriteEngine Off
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
        Options Indexes Includes
        IndexOptions FancyIndexing SuppressHTMLPreamble XHTML IconsAreLinks FoldersFirst SuppressDescription
        HeaderName /files/HEADER.shtml
        ReadmeName /files/README.shtml
</pre>
<p>Since my site uses wordpress with &#8220;pretty permalinks&#8221; enabled, the 1st thing I needed to do is disable mod re-write for the directory where I wanted listing enabled. Now if you check my <a href="http://www.linickx.com/files/">/files/</a> page you&#8217;ll notice that the page title and tag line under &#8220;[LINICKX].com&#8221; change depending on what directory you are viewing, this is done with &#8220;Server Side Includes&#8221; (<em>SSI</em>), so the next two options in the above config set that up.</p>
<p>Now to take a look at the actual directory listing setup, it might be worth you taking a look at the <a href="http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html">Apache documentation</a> for a full description, but the important ones to note are
<pre class="brush: plain; title: ; notranslate">Options Indexes Includes</pre>
<p> to enable directory listing and switch on SSI, then you need
<pre class="brush: plain; title: ; notranslate">IndexOptions SuppressHTMLPreamble XHTML</pre>
<p> to disable the default headers so that we can setup our style sheet and favour xHTML over HTML. Apache 2.2 users also have <a href="http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html#indexstylesheet">IndexStyleSheet</a> available, but since I&#8217;m using CentOS4 we&#8217;ll do it this way. Finally you need the <b>HeaderName</b>, <b>ReadmeName</b> directives to tell Apache which file to look for (<em>by default Apache looks for README.html, but that won&#8217;t support SSI</em>)&#8230; note how my .shtml files are relative to my web root, these are not absolute paths on the file system, i.e. /files actually maps to /var/www/html/files. </p>
<p>You&#8217;re now good to go, HEADER.shtml should contain all the xHTML you want to appear before the directory listing, and README.html is everything after&#8230; make sure you include all the correct &lt;html&gt;, &lt;body&gt; and DOCTYPE tags.</p>
<p>Now you&#8217;ll want to get working is some dynamic content, for a simple &#8220;print current directory&#8221; you can use
<pre class="brush: plain; title: ; notranslate">&lt;!--#echo var=&quot;REQUEST_URI&quot;--&gt;</pre>
<p> in your html, further documentation on getting more magic is available <a href="http://webmaster.iu.edu/tool_guide_info/ssitutorial.shtml">here</a> &#038; <a href="http://www.georgedillon.com/web/ssivar.shtml">here</a>, I was able to knock up a simple line of code to print the current year at the bottom of the page&#8230;.</p>
<pre class="brush: plain; title: ; notranslate">
&lt;!--#config timefmt=&quot;%Y&quot;--&gt;
&lt;small&gt;Nick Bettison 2005 - &lt;!--#echo var=&quot;DATE_LOCAL&quot;--&gt; &amp;amp;copy; &lt;/small&gt;;
</pre>
<p>Cool eh! The trick to watch out for is spaces in the above code, there should be no white space between
<pre class="brush: plain; title: ; notranslate">&lt;--#echo</pre>
<p> or the trailing
<pre class="brush: plain; title: ; notranslate">--&gt;</pre>
<div style="float:right">
<table <tr>
<td><a href='http://www.linickx.com/files/2008/05/apachedirlisting_after.png' rel="lightbox[343]"><img src="http://www.linickx.com/files/2008/05/apachedirlisting_after-150x150.png" alt="Looking much better" title="Linickx.com V2 Styled Listing!" width="150" height="150" class="alignnone size-thumbnail wp-image-410" /></a></td>
<tr>
<td style="text-align:center"><strong>After.</strong></td>
</tr>
</table>
</div>
<p>The final thing you&#8217;ll want to look at is those horible default icons! You have a couple of options: You can either simply replace/over-write the default ones (<em>on my flavour of linux they are in /var/www/icons</em>), or you can add
<pre class="brush: plain; title: ; notranslate">AddIcon /icons/tar.png .tar</pre>
<p> to your htaccess file telling apache to look at tar.png rather than the default tar.gif, I found some <a href="https://gna.org/projects/apache-icons/">deb archives</a> which I extracted with file-roller (<em>rather than trying to install anything</em>) and simply changed the ones I was going to use&#8230;. I&#8217;m very please with the final result, I think it makes a big difference.</p>
<p>Happy Styling One &amp; All!</p>
<img src="http://www.linickx.com/wp/wp-content/themes/linickx_v2/images/nick_sig_bggrey.png" alt="Nick" /> <hr/>Copyright &copy; 2012 <strong><a href="http://www.linickx.com">[LINICKX].com</a></strong>. This Feed is for personal non-commercial use only. Please check my <a href="http://www.linickx.com/?page_id=63">Site Terms and Conditions</a> for full details on copyrights. If you have any concerns with the content of this feed you may <a href="http://www.linickx.com/contact">contact me here</a>.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">WP Copyright Plugin</a></span>]]></content:encoded>
			<wfw:commentRss>http://www.linickx.com/343/css-styling-apache-directory-listings/feed</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>USB Networking with Fedora 7 &amp; n800</title>
		<link>http://www.linickx.com/315/usb-networking-with-fedora-7-n800</link>
		<comments>http://www.linickx.com/315/usb-networking-with-fedora-7-n800#comments</comments>
		<pubDate>Fri, 14 Sep 2007 18:14:56 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[n800]]></category>
		<category><![CDATA[770]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[maemo]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[Nokia]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://www.linickx.com/blog/archives/315/usb-networking-with-fedora-7-n800/</guid>
		<description><![CDATA[There are times where you cannot use WiFi, for example my workplace&#8217;s WLAN uses LEAP, which maemo doesn&#8217;t support. I found that setting up USB networking on my n800 was a bit of a pain since there isn&#8217;t a single &#8230; <a href="http://www.linickx.com/315/usb-networking-with-fedora-7-n800">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There are times where you cannot use WiFi, for example my workplace&#8217;s WLAN uses LEAP, which maemo doesn&#8217;t support. I found that setting up USB networking on my n800 was a bit of a pain since there isn&#8217;t a single document&#8230; if you check <a href="http://del.icio.us/linickx">my del.icio.us feed</a> you&#8217;ll see I bookmarked all I could find with a <a href="http://del.icio.us/linickx/usbnet">usbnet</a> tag.</p>
<p>These are the steps I ran through to enable usb networking between my nokia n800 and my fedora 7 laptop.</p>
<p>First we&#8217;ll start with the basic setup&#8230; I&#8217;ll assume you&#8217;ve read a getting started article similar to <a href="http://www.linickx.com/blog/archives/292/n800-getting-started-n00b-guide-part-one/">mine</a> and already have root &amp; xterm. By default n800 has a usb interface configured, you just need to enable it, so on your n800 type:<br />
<code><br />
sudo gainroot<br />
insmod /mnt/initfs/lib/modules/2.6.18-omap1/g_ether.ko<br />
ifup usb0<br />
</code><br />
The default settings add an interface with a static ip of 192.168.2.15/24 with a default gateway of 192.168.2.14.</p>
<p>Now lets set up something similar on Fedora, you need to create a file in <code>/etc/sysconfig/network-scripts</code> called <code>ifcfg-usb0</code> with the following&#8230;<br />
<code><br />
DEVICE=usb0<br />
BOOTPROTO=static<br />
IPADDR=192.168.2.14<br />
BROADCAST=192.168.2.255<br />
NETMASK=255.255.255.0<br />
NETWORK=192.168.2.0<br />
ONBOOT=no<br />
MII_NOT_SUPPORTED=no<br />
</code><br />
Now plug the usb cable into both devices, and on your fedora box (<em>as root</em>) type<br />
<code><br />
ifup usb0<br />
</code><br />
You now have connectivity, of course if you have a default fedora install pinging 192.168.2.15 will fail because of the firewall, it is probably best to temporarily disable the firewall (<code>/etc/init.d/iptables stop</code>) to see if it works, if so move onto configuring your firewall correctly (<code>/etc/init.d/iptables start</code> <em>starts it again</em>) <img src='http://www.linickx.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  You may also get usb conflicts, you can try <code></code></p>
<p><code>rmmod uhci_hcd</code></p>
<p>but it will disable any USB devices, you have been warned.</p>
<p>With this basic connectivity setup you&#8217;ll have two issues; you only have connectivity between fedora &amp; n800 nothing else works, and opening any application on n800 causes it to try and connect to your wifi, so lets look at those&#8230;.</p>
<p>I&#8217;m going to assume you used system-config-securitylevel to configure your firewall, its worth noting that any changes you make now will be overwritten by any future use of system-config-securitylevel  so it&#8217;s probably best to take a backup of <code>/etc/sysconfig/ipatbles</code> now and later when you&#8217;re finished.</p>
<p>So as root type:<br />
<code><br />
iptables -I RH-Firewall-1-INPUT 2 -i usb -j ACCEPT<br />
iptables -I FORWARD 1 -m state --state RELATED,ESTABLISHED -j ACCEPT<br />
iptables -I FORWARD 1 -s 192.168.2.0/24 -j ACCEPT<br />
iptables --table nat --append POSTROUTING --out-interface eth0 -s 192.168.2.0/24 -j MASQUERADE<br />
/etc/init.d/iptables save<br />
</code><br />
This will allow all connectivity in from the usb interface allowing the n800 to send packets into the fedora box whilst the firewall is running, it will also NAT any traffic from the usb network hiding the n800 behind fedora so that you get onward connectivity. To get the NAT to work you need to enable ip forwarding, this allows fedora to pass pakets between interfaces, to do that type <code></code></p>
<p><code>echo 1 &gt; /proc/sys/net/ipv4/ip_forward</code></p>
<p>and to get it to survive a reboot update <code>/etc/sysctl.conf</code> with <code></code></p>
<p><code>net.ipv4.ip_forward = 1</code></p>
<p>The final part is to enable name resolution (DNS), on n800, I updated <code>/etc/resolv.conf</code> with the <a href="http://www.opendns.com/">opendns</a> servers&#8230;<br />
<code><br />
nameserver 208.67.222.222<br />
nameserver 208.67.220.220<br />
</code><br />
All things being equal you should now be able to ping www.google.com from your n800 <img src='http://www.linickx.com/wp/wp-includes/images/smilies/icon_cool.gif' alt=':cool:' class='wp-smiley' /> </p>
<p>To get applications to connect, I found on the latest version of ITOS that the <a href="http://maemo.org/community/wiki/dummyiap/">DUMMY IAP</a> didn&#8217;t work, so I stumbled across <a href="http://www.internettablettalk.com/forums/showpost.php?p=52174&amp;postcount=5">this solution</a>.</p>
<p>Create an &#8220;ad hoc&#8221; wifi connection with static IPs&#8230; anything it doesn&#8217;t matter, and when that&#8217;s connected in xterm (<em>as root</em>) type <code>ifconfig wlan0 down</code> , you should now be able to connect to the web with your browser / skype etc over your usb network&#8230; sweet!</p>
<img src="http://www.linickx.com/wp/wp-content/themes/linickx_v2/images/nick_sig_bggrey.png" alt="Nick" /> <hr/>Copyright &copy; 2012 <strong><a href="http://www.linickx.com">[LINICKX].com</a></strong>. This Feed is for personal non-commercial use only. Please check my <a href="http://www.linickx.com/?page_id=63">Site Terms and Conditions</a> for full details on copyrights. If you have any concerns with the content of this feed you may <a href="http://www.linickx.com/contact">contact me here</a>.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">WP Copyright Plugin</a></span>]]></content:encoded>
			<wfw:commentRss>http://www.linickx.com/315/usb-networking-with-fedora-7-n800/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>n800 Getting started (n00b) Guide&#8230; Part One.</title>
		<link>http://www.linickx.com/292/n800-getting-started-n00b-guide-part-one</link>
		<comments>http://www.linickx.com/292/n800-getting-started-n00b-guide-part-one#comments</comments>
		<pubDate>Sun, 27 May 2007 10:46:00 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[n800]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[maemo]]></category>
		<category><![CDATA[Nokia]]></category>

		<guid isPermaLink="false">http://www.linickx.com/blog/archives/292/n800-getting-started-n00b-guide-part-one/</guid>
		<description><![CDATA[I&#8217;ve had my n800 a little over two weeks, and the length of this post will propably explain why I haven&#8217;t posted about it before. I love the box, it looks sooo good, and the linux inside means that the &#8230; <a href="http://www.linickx.com/292/n800-getting-started-n00b-guide-part-one">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had my n800 a little over two weeks, and the length of this post will propably explain why I haven&#8217;t posted about it before. I love the box, it looks sooo good, and the linux inside means that the scope of potential is just unimaginable&#8230; but&#8230; the experience isn&#8217;t perfect. I guess the experiece is very much like the windows / linux thing as a whole, what works is great, but <em>sometimes</em> getting linux &#8220;just so&#8221; can be more of an effort than in windows.</p>
<p>I&#8217;ve decided to write up all my notes, and bookmarks to make things easier for any other n800 n00bies <img src='http://www.linickx.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Before we get started the compulsary screen shot !</p>
<div> <a href='http://www.linickx.com/files/2008/05/n800-desktop.png' rel="lightbox[292]"><img src="http://www.linickx.com/files/2008/05/n800-desktop-150x150.png" alt="Screenshot of my n800 Desktop" title="n800 desktop" width="150" height="150" class="alignnone size-thumbnail wp-image-417" /></a></div>
<p><strong>Adding Software.</strong><br />
You&#8217;ll notice that there&#8217;s not a great deal installed, and what&#8217;s there very much resembles a phone ( <em>*shock*</em> ) and very quickly you&#8217;re going to want something extra. Now you&#8217;re in a bit of a chicken and an egg senarior, some software requires root access (<em>more on that later</em>) and some have a neat &#8220;single click install&#8221;.</p>
<p>First place to look for &#8220;single click installs&#8221; is <a href="http://maemo.org/downloads/">maemo.org/downloads</a> but you&#8217;ll notice, that some of the icons are greyed out, so I&#8217;d recomend going though the pain (<em>lots of typing / hand writing with a stylus is</em>) of setting up all the <a href="http://maemo.org/community/wiki/applicationrepositories/">application repositries</a>. To do so,  open  up the application manager, click (<em>menu</em>) Tools -&gt; Application Catalogue -&gt; New and simply fill in the fields for each repo one at a time. After completeing this you&#8217;ll be asked to refresh the catalogue, if you get errors you&#8221;l have to go through each one singley disabling it, doing a refresh until it works, and then check that you&#8217;ve made no mistakes; on the other hand if it works you&#8217;ll notice l<strong>oads of new cool things you can install.</strong></p>
<p><strong>Got root?</strong><br />
If you&#8217;re new to linux, and don&#8217;t know about root, it&#8217;s basically the same as the &#8220;Administrator&#8221; account on windows&#8230; but with on exception root has NO RESTRICTIONS.. windows can (<em>and does sometimes</em>) stop the administrator from doing things (<em>like deleting locked files</em>) Unix / Linux will let the root account do anything, including wipe the file system, so use the root account with care.</p>
<p>You&#8217;re going to need root to do certain things, to use root you need to install &#8220;xterm&#8221; and &#8220;becomeroot&#8221; from you&#8217;re list of newly setup applications. Running xterm will give you a shell (<em>like a windows dos prompt</em>) where by you can directly type commands into the underlying linux, buy typing <code>sudo gainroot</code> you&#8217;ll notice the prompt will change from $ to # you now have god like access to your box&#8230; at this point I recomend you change the root password from &#8220;rootme&#8221; to something more secure, type <code>passwd</code> and follow the instructions. <img src='http://www.linickx.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>(<em>If that doesn&#8217;t work, read below, install ssh and <a href="http://maemo.org/community/wiki/howdoibecomeroot2/">see this</a></em>)</p>
<p><strong>Remote Access.</strong><br />
You can get remote access onto your n800 via a couple of ways. If you like a GUI try <a href="http://mike.saunby.googlepages.com/x11vncfornokia7702">x11vnc from here</a> you can get a <a href="http://www.realvnc.com/download.html">vncviewer</a> (<em>for windows or linux</em>)  download the .deb file and open it with the application manager. I had no problems getting this working, but I did find using the mouse and keyboard on my pc a little slow and un-responsive so ymmv <img src='http://www.linickx.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The otherway, and what I use is an SSH sesion, much quicker very usable, and like running the xterm from your pc. From the list of installable applications choose &#8220;dropbear server&#8221; and using a client (try putty for windows).</p>
<blockquote><p>To connect to your Internet Tablet you will need to know its IP address. To find this open the Connection manager and select Internet connection &gt; IP address from the menu. Tip &#8211; you may find it easier to use a fixed IP address.</p></blockquote>
<p>you can ssh root@ipaddress (<em>using the password you set before, see why I said to change it</em>) of course to be safe you can ssh user@ipaddress, but you&#8217;ll have to change the password for user like you did before but in a $ shell.</p>
<p>You&#8217;ll also want to <a href="http://www.internettablettalk.com/forums/showthread.php?t=5191">disable ssh from starting automatically</a>, you don&#8217;t want some script-kiddy trying to hack your box whilst you&#8217;re connected to a wifi network, as root type <code> update-rc.d -f dropbear remove </code> , then when you need it you can do <code>/etc/init.d/dropbear start</code> <img src='http://www.linickx.com/wp/wp-includes/images/smilies/icon_cool.gif' alt=':cool:' class='wp-smiley' /> </p>
<p><strong>Battery Life. </strong><br />
The 1st thing <a href="http://www.internettablettalk.com/forums/showthread.php?t=6395">I noticed</a> when I got my new toy was that I hammered the battery and only got about 1 -&gt; 2 hours wireless useage. I can confirm that using adhoc wireless connections eat the battery, out in the world with proper AP&#8217;s battery life seems fine (<em>3hrs+ online perhaps</em>), but at home it really doesn&#8217;t last that long.</p>
<p>There are lots of things you can do, to improve battery life. 1st up enable &#8220;soft power off&#8221; , this will allow you to hold down the power button to but n800 into standby mode, really usefull for hitting before you put it back in your pocket. <a href="http://www.internettablettalk.com/forums/showthread.php?t=4625&amp;page=2">See this post here for a full set of instructions. </a>Next up, tweak your wireless settings.. what you set here will depend on what you brought the n800 for, I would have thought most people would disable the &#8220;search for wifi&#8221; functionality as you probably don&#8217;t need it to automagically connect to a network whilst your driving or walking, so under the control panel -&gt; connectivity set the search interval to &#8220;Never&#8221;. I&#8217;ve also screwed my Idle times right down so that it disconnets if I&#8217;m not doing anything &#8230;I haven&#8217;t yet been disconnected when I was doing something, but I do usually have to hit &#8220;connect to network&#8221; before opening a brower etc.</p>
<p>I&#8217;d also suggest using offline mode when you&#8217;re watching a video or something, that ways &#8220;stuff&#8221; isn&#8217;t happening in the background when you&#8217;re not using it.</p>
<p><strong>End of Part One </strong><br />
I think that&#8217;s long enough, those few tips should be enough to make most users 1st experience better, in part two I&#8217;m going to talk about Apps, what I&#8217;ve installed and what didn&#8217;t get uninstalled <img src='http://www.linickx.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img src="http://www.linickx.com/wp/wp-content/themes/linickx_v2/images/nick_sig_bggrey.png" alt="Nick" /> <hr/>Copyright &copy; 2012 <strong><a href="http://www.linickx.com">[LINICKX].com</a></strong>. This Feed is for personal non-commercial use only. Please check my <a href="http://www.linickx.com/?page_id=63">Site Terms and Conditions</a> for full details on copyrights. If you have any concerns with the content of this feed you may <a href="http://www.linickx.com/contact">contact me here</a>.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">WP Copyright Plugin</a></span>]]></content:encoded>
			<wfw:commentRss>http://www.linickx.com/292/n800-getting-started-n00b-guide-part-one/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>A Linux / Command line: how to upload to wordpress  wp-plugins.org via subversion ( SVN )</title>
		<link>http://www.linickx.com/276/a-linux-command-line-how-to-upload-to-wordpress-wp-pluginsorg-via-subversion-svn</link>
		<comments>http://www.linickx.com/276/a-linux-command-line-how-to-upload-to-wordpress-wp-pluginsorg-via-subversion-svn#comments</comments>
		<pubDate>Sun, 06 May 2007 16:47:11 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[redhat]]></category>

		<guid isPermaLink="false">http://www.linickx.com/blog/archives/276/a-linux-command-line-how-to-upload-to-wordpress-wp-pluginsorg-via-subversion-svn/</guid>
		<description><![CDATA[Could that title get any longer ! Hopefully you get the point, sometimes you need different tools for different jobs, if you want a full development platform with SVN support I suggest you take a look at eclipse (with subclipse &#8230; <a href="http://www.linickx.com/276/a-linux-command-line-how-to-upload-to-wordpress-wp-pluginsorg-via-subversion-svn">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Could that title get any longer !</p>
<p>Hopefully you get the point, sometimes you need different tools for different jobs, if you want a full development platform with SVN support I suggest you take a look at <a href="http://www.eclipse.org/">eclipse</a> (<em>with <a href="http://subclipse.tigris.org/">subclipse</a></em> ) but what if you already have done the development and you just want to do a quick upload.</p>
<p>My <a href="http://www.linickx.com/index.php?content=php#phpbb_recent_topics.txt">phpbb_recent_topics plugin</a> is hosted here, and when the nice guys at wordpress gave me an svn account, I just wanted a quick way to upload what I&#8217;ve done. Now I must stress this may not be the &#8220;proper&#8221; way to use svn (<em>there&#8217;s <a href="http://svnbook.red-bean.com/">a book</a> for that</em>) but it is enough to achieve what we want, a straight forward upload.</p>
<p>I&#8217;m using redhat, so the 1st step was to install <a href="http://dag.wieers.com/rpm/packages/subversion/">dag&#8217;s subversion rpm</a> , I also needed to setup an &#8220;editor&#8221; variable for commenting.</p>
<pre>SVN_EDITOR=vi
export SVN_EDITOR</pre>
<p>Then, I went into a directory onto my server, and downloaded a copy of the existing subversion directory structure.</p>
<pre>[nick@SERVER wp_plugins]$ svn checkout https://svn.wp-plugins.org/phpbb-recent-topics/
A    phpbb-recent-topics/trunk
A    phpbb-recent-topics/branches
A    phpbb-recent-topics/tags
Checked out revision 9232.
[nick@SERVER wp_plugins]$</pre>
<p>My plugin (<em>at the time</em>) was on version 1, so my 1st steps were to create a version 1 tag, add it to svn, get the stable copy of my plugin, add that to svn.</p>
<pre>[nick@SERVER wp_plugins]$ cd phpbb-recent-topics/
[nick@SERVER phpbb-recent-topics]$ ls
branches  tags  trunk
[nick@SERVER phpbb-recent-topics]$ cd tags/
[nick@SERVER tags]$ mkdir 0.1
[nick@SERVER tags]$ cd ..
[nick@SERVER wp_plugins]$ svn add phpbb-recent-topics/tags/*
A         phpbb-recent-topics/tags/0.1
[nick@SERVER wp_plugins]$ cd phpbb-recent-topics/tags/0.1/
[nick@SERVER 0.1]$ wget http://www.linickx.com/files/php/phpbb_recent_topics.txt
[nick@SERVER 0.1]$ mv phpbb_recent_topics.txt phpbb_recent_topics.php
[nick@SERVER 0.1]$ svn add phpbb_recent_topics.php
A         phpbb_recent_topics.php
[nick@SERVER 0.1]$</pre>
<p>Finally I updated everything, and uploaded (committed) my files.</p>
<pre>[nick@SERVER 0.1]$ cd ../../../
[nick@SERVER wp_plugins]$ svn update phpbb-recent-topics/
At revision 9232.
[nick@SERVER wp_plugins]$ svn --username linickx commit phpbb-recent-topics/
Adding         phpbb-recent-topics/tags/0.1
Adding         phpbb-recent-topics/tags/0.1/phpbb_recent_topics.php
Transmitting file data .......
Committed revision 9233.
[nick@SERVER wp_plugins]$</pre>
<p>Remember this doesn&#8217;t publish your plugin on <a href="http://wordpress.org/extend/plugins/">wordpress.org</a>, to do that you need <a href="http://wordpress.org/extend/plugins/about/readme.txt">a valid readme.txt</a> in the trunk directory, but as you can see once you&#8217;ve created all the files on your local box, it&#8217;s just a few commands to get your work uploaded.</p>
<p><small> Did you notice that the wordpress svn supports SSL ? </small></p>
<img src="http://www.linickx.com/wp/wp-content/themes/linickx_v2/images/nick_sig_bggrey.png" alt="Nick" /> <hr/>Copyright &copy; 2012 <strong><a href="http://www.linickx.com">[LINICKX].com</a></strong>. This Feed is for personal non-commercial use only. Please check my <a href="http://www.linickx.com/?page_id=63">Site Terms and Conditions</a> for full details on copyrights. If you have any concerns with the content of this feed you may <a href="http://www.linickx.com/contact">contact me here</a>.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">WP Copyright Plugin</a></span>]]></content:encoded>
			<wfw:commentRss>http://www.linickx.com/276/a-linux-command-line-how-to-upload-to-wordpress-wp-pluginsorg-via-subversion-svn/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Migrate from White Box Linux 4 to CentOS 4.4</title>
		<link>http://www.linickx.com/269/how-to-migrate-from-white-box-linux-4-to-centos-44</link>
		<comments>http://www.linickx.com/269/how-to-migrate-from-white-box-linux-4-to-centos-44#comments</comments>
		<pubDate>Tue, 24 Apr 2007 14:16:47 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Enterprise Linux]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[migrate]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[wbel]]></category>

		<guid isPermaLink="false">http://www.linickx.com/blog/archives/269/how-to-migrate-from-white-box-linux-4-to-centos-44/</guid>
		<description><![CDATA[There are somethings that you just never get round to, my nagios box was still running whitebox linux, and I&#8217;ve finally gotten round &#8220;upgrading&#8221; it to CentOS&#8230; yeah ok, upgrade is arguable, but you get my point. First off a &#8230; <a href="http://www.linickx.com/269/how-to-migrate-from-white-box-linux-4-to-centos-44">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There are somethings that you just never get round to, my nagios box was still running whitebox linux, and I&#8217;ve finally gotten round &#8220;upgrading&#8221; it to CentOS&#8230; yeah ok, upgrade is arguable, but you get my point.</p>
<p>First off a <strong>warning: Don&#8217;t do this !</strong> All the documentation, for CentOS, RHEL, Fedora, any redhat linux all say, clean installs are the best way, and upgrades are not advised&#8230;. therefore I offer no support or warranty that this will work, in fact, I you advise you to read this post, but step away from your consoles !</p>
<p>But, if you think it might be a laugh, the <a href="http://www.centos.org/modules/smartfaq/faq.php?faqid=19">centos documentation </a>is a bit old, and not 100% correct, so here is what I did. First up (<em>as root &#8211; obviously</em>), clear out your yum cache,and install the CentOS gpg key.</p>
<pre>
yum clean all
rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4</pre>
<p>Next, install some base centos packages, take not that some need to be forced on</p>
<pre>
rpm -Uvh --nodeps http://mirror.centos.org/centos/4.4/os/i386/CentOS/RPMS/centos-release-4-4.2.i386.rpm
rpm -ivh http://mirror.centos.org/centos/4.4/os/i386/CentOS/RPMS/python-elementtree-1.2.6-4.2.1.i386.rpm
rpm -ivh http://mirror.centos.org/centos/4.4/os/i386/CentOS/RPMS/python-sqlite-1.1.7-1.2.i386.rpm
rpm -ivh http://mirror.centos.org/centos/4.4/os/i386/CentOS/RPMS/sqlite-3.3.3-1.2.i386.rpm
rpm -Uvh --force http://mirror.centos.org/centos/4.4/os/i386/CentOS/RPMS/python-urlgrabber-2.9.8-2.noarch.rpm
rpm -Uvh --nodeps http://mirror.centos.org/centos/4.4/os/i386/CentOS/RPMS/yum-2.4.3-1.c4.noarch.rpm</pre>
<p>finally remove the whitebox rpm db.</p>
<pre>
rpm -ev rpmdb-whitebox</pre>
<p>Move any &#8220;whitebox&#8221; mirrors still in <em>/etc/yum.repos.d</em> and</p>
<pre>
yum install rpmdb-CentOS</pre>
<p>Once you have that sorted, you can complete the upgrade with</p>
<pre>
yum update
reboot</pre>
<p>&amp; cross your fingers <img src='http://www.linickx.com/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
If you come across the following warnings while using yum: Warning, could not load sqlite, falling back to pickle , I found&#8230;</p>
<pre>
yum install python-sqlite</pre>
<p>Fixed the problem. And there we have it, all my boxes are now running CentOS &#8211; yay &#8211; just in time to look at the CentOS 5 upgrade <img src='http://www.linickx.com/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><strong>Dependency Problems ?</strong><br />
If a whitebox rpm is newer than the CentOS one, it won&#8217;t get upgraded, this might cause problems when installing new packages via yum. To solve the problem download the rpm manually from http://www.centos.org/modules/tinycontent/index.php?id=13 and force an upgrade</p>
<pre>
rpm --force -Uvh Something-CentOS.rpm</pre>
<p><strong>UPDATE:</strong> If you&#8217;re using something like <a href="http://www.rootkit.nl/projects/rootkit_hunter.html">Root Kit Hunter</a>, you will notice a load of md5 hashes fail, these are whitebox rpm&#8217;s that didn&#8217;t need upgrading, to correct the problem you need to replace these with CentOS versions.. example rkhunter output:</p>
<pre>
/sbin/init  [ BAD ]
</pre>
<p>Find which rpm, init belongs to</p>
<pre>
# rpm -q --whatprovides /sbin/init
SysVinit-2.85-34.3
</pre>
<p>and upgrade it</p>
<pre>
wget http://www.mirrorservice.org/sites/mirror.centos.org/4.4/os/i386/CentOS/RPMS/SysVinit-2.85-34.3.i386.rpm
rpm --force -Uvh SysVinit-2.85-34.3.i386.rpm
</pre>
<img src="http://www.linickx.com/wp/wp-content/themes/linickx_v2/images/nick_sig_bggrey.png" alt="Nick" /> <hr/>Copyright &copy; 2012 <strong><a href="http://www.linickx.com">[LINICKX].com</a></strong>. This Feed is for personal non-commercial use only. Please check my <a href="http://www.linickx.com/?page_id=63">Site Terms and Conditions</a> for full details on copyrights. If you have any concerns with the content of this feed you may <a href="http://www.linickx.com/contact">contact me here</a>.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">WP Copyright Plugin</a></span>]]></content:encoded>
			<wfw:commentRss>http://www.linickx.com/269/how-to-migrate-from-white-box-linux-4-to-centos-44/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Monitor wordpress with Nagios</title>
		<link>http://www.linickx.com/271/how-to-monitor-wordpress-with-nagios</link>
		<comments>http://www.linickx.com/271/how-to-monitor-wordpress-with-nagios#comments</comments>
		<pubDate>Mon, 19 Mar 2007 12:07:45 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[nagios]]></category>

		<guid isPermaLink="false">http://www.linickx.com/blog/archives/271/how-to-monitor-wordpress-with-nagios/</guid>
		<description><![CDATA[WordPress like many web applications relies on apache (or something else) to serve the HTTP pages and mysql to store the data. Your wordpress website is important to you, so you need an external monitoring system to let you know &#8230; <a href="http://www.linickx.com/271/how-to-monitor-wordpress-with-nagios">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://wordpress.org">WordPress</a> like many web applications relies on apache (<em>or something else</em>) to serve the HTTP pages and mysql to store the data. Your wordpress website is important to you, so you need an external monitoring system to let you know what&#8217;s going on.</p>
<p><a href="http://www.nagios.org">Nagios</a> is a great, enterprise class, open-source monitoring application; and what you need do is configure it to exactly represent how wordpress works; if you can get that right you can immediately get notified if any piece of the puzzle fails.</p>
<p>I&#8217;m going to write up a simple example of how to monitor wordpress and it&#8217;s associated jigsaw pieces, so we&#8217;re going to setup one host with appropriate dependant services. Ultimately, you should configure nagios to suit exactly how your environment works, but hopefully this &#8220;how to&#8221; will get you started.</p>
<p><strong>Basic Config.</strong><br />
To configure nagios you need have services (<em>such as http</em>) associated with hosts; to get started, I&#8217;m going to have to assume you have followed <a href="http://www.maxsworld.org/index.php/how-tos/nagios">another &#8220;how to&#8221;</a> and have nagios up and running, and monitoring localhost, you can even use <a href="http://www.linickx.com/index.php?content=nagios">my own config generator</a> to get you started <img src='http://www.linickx.com/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Basically you should have a generic check-host-alive host.cfg entry like so:</p>
<pre class="brush: plain; title: ; notranslate">
define host{
        use                     generic-host            ; Name of host template to use
        host_name               linickx.com
        alias                   My WebSite
        address                 www.linickx.com
        check_command           check-host-alive
        max_check_attempts      10
        check_period            24x7
        notification_interval   120
        notification_period     24x7
        notification_options    d,r
        contact_groups  admins
        }
</pre>
<p>The first (<em>and easiest</em>) part of wordpress to monitor is the web-server which serves the web pages on port 80, so a <strong>/etc/nagios/serivces.cfg</strong> entry like.</p>
<pre class="brush: plain; title: ; notranslate">
define service{
	use                             generic-service         ; Name of service template to use
	host_name                       www.linickx.com
	service_description             HTTP
	is_volatile                     0
	check_period                    24x7
	max_check_attempts              10
	normal_check_interval           1
	retry_check_interval            1
	contact_groups                  admins
	notification_options            w,u,c,r
	notification_interval           960
	notification_period             24x7
	check_command                   check_http
}
</pre>
<p><strong>Getting Technical.</strong><br />
Have you noticed the deliberate mistake ? I&#8217;m using resolvable names in my config files, this is deliberate as my website is on a shared server, and check_http with an IP address is very different to check_http www.linickx.com , but in order for www.linickx.com to work, DNS needs to be working. While we are here, it makes sense to monitor that as well. In <strong>/etc/nagios/checkcommands.cfg</strong> add an entry similar to&#8230;.</p>
<pre class="brush: plain; title: ; notranslate">
# 'check_dns' command definition
define command{
        command_name    check_dns_linickx-com
        command_line    $USER1$/check_dns -H www.linickx.com -a 69.73.189.228
        }
</pre>
<p>Where the -a ip address , is the ip of your &#8220;A Record&#8221;, if you don&#8217;t know what that is you can use <a href="http://www.dnsstuff.com/tools/lookup.ch?name=www.google.com&amp;type=A">dnsstuff.com</a> to find it for you. You can now create a service that uses that command&#8230;</p>
<pre class="brush: plain; title: ; notranslate">
define service{
        use                             generic-service         ; Name of service template to use
        host_name                       linickx.com
        service_description             DNS
        is_volatile                     0
        check_period                    24x7
        max_check_attempts              10
        normal_check_interval           5
        retry_check_interval            1
        contact_groups                  admins
        notification_options            w,u,c,r
        notification_interval           960
        notification_period             24x7
        check_command                   check_dns_linickx-com
        }
</pre>
<p>We have HTTP and DNS monitored, all the wordpress data is stored in a mySQL <a href="http://www.singlehop.com/databasehosting/">database</a>, so now you need to monitor that, to do that you need to setup another checkcommand; add the following.</p>
<pre class="brush: plain; title: ; notranslate">
# mySQL command definition
define command{
	command_name    check_mysql
	command_line    $USER1$/check_mysql -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$
}
</pre>
<p>This check command will log into the database and report OK if it is working, much better than check_tcp 3306 . Now you can add the following service entry</p>
<pre class="brush: plain; title: ; notranslate">
define service{
	use                             generic-service         ; Name of service template to use
	host_name                       www.linickx.com
	service_description             mySQL
	is_volatile                     0
	check_period                    24x7
	max_check_attempts              10
	normal_check_interval           5
	retry_check_interval            1
	contact_groups                  admins
	notification_options            w,u,c,r
	notification_interval           960
	notification_period             24x7
	check_command                   check_mysql!USERNAME!PASSWORD
}
</pre>
<p>For this to work the user will need to have permissions to log into the nagios machine, so if you followed <a href="http://codex.wordpress.org/Installing_WordPress#Using_the_MySQL_Client">the wordpress codex</a> and added &#8220;TO wordpressusername@localhost&#8221; in your mysql statement, you&#8217;ll need to add that to run</p>
<pre class="brush: plain; title: ; notranslate">GRANT ALL PRIVILEGES ON databasename.* TO wordpressusername@NAGIOS-SERVER;</pre>
<p>where NAGIOS-SERVER is a resolvable name or ip address. Note: Don&#8217;t forget about firewalls ! Make sure that TCP 3306 is open between your nagios box &amp; wordpress website.</p>
<p><strong>The bit that actually monitors wordpress.</strong><br />
You are now independently checking both HTTPD &amp; MYSQL, but what if wordpress can&#8217;t actually connect (lets say wp-config.php is screwed), both these checks will pass and nagios will stay green; what you need to do is monitor a page. If that page works , everything&#8217;s fine, if the page fails (<em>and you get the default database connection error page</em>) then nagios flags and alert. We&#8217;re going to add another checkcommand</p>
<pre class="brush: plain; title: ; notranslate">
# 'check linickx.com wordpress' command definition
define command{
        command_name    check_wp_linickx
        command_line    $USER1$/check_http -H $HOSTADDRESS$ -u /blog/about-me -s &quot;About Me&quot;
        }
</pre>
<p>You can alter this in anyway you want, but what it does is it looks for http://$HOSTADDRESS$/blog/about-me (<em>so http://www.linickx.com/blog/about-me</em>) and if that page returns &#8220;About Me&#8221; then everything is OK.</p>
<p><strong>Tidying up with dependencies.</strong><br />
We&#8217;ve already established that if either mySQL, http or DNS fails, wordpress will fail, so we want to ensure we don&#8217;t get hit with double alerts about the same problem, enter dependencies. HTTP is dependant on DNS, enter the following in <strong>/etc/nagios/dependencies.cfg</strong> (<em>make sure you have cfg_file=/etc/nagios/dependencies.cfg in /etc/nagios/nagios.cfg</em> )</p>
<pre class="brush: plain; title: ; notranslate">
define servicedependency{
        host_name                       linickx.com
        service_description             DNS
        dependent_host_name             linickx.com
        dependent_service_description   HTTP
        execution_failure_criteria      n
        notification_failure_criteria   u,c
        inherits_parent         1
        }
</pre>
<p>and WordPress is dependant on HTTP &amp; mySQL , so you need&#8230;</p>
<pre class="brush: plain; title: ; notranslate">
define servicedependency{
        host_name                       linickx.com
        service_description             HTTP
        dependent_host_name             linickx.com
        dependent_service_description   WordPress
        execution_failure_criteria      n
        notification_failure_criteria   u,c
        inherits_parent         1
        }

define servicedependency{
        host_name                       linickx.com
        service_description             mySQL
        dependent_host_name             linickx.com
        dependent_service_description   WordPress
        execution_failure_criteria      n
        notification_failure_criteria   u,c
        inherits_parent         1
        }
</pre>
<p>You can check your config with <strong>nagios -v /etc/nagios/nagios.cfg</strong> , assuming you have no errors wait for checks to go green and begin testing. Tests you can run can be  anything from unplugging the cable from your nagios box to simulate a complete failure, to stopping the mysql service on your website to make sure check_mysql works.</p>
<p><strong>Making it pretty for the hell of it.</strong><br />
Nagios has a web interface, one of the things we can do is customize it to represent our config, how about a pretty icon for our website ? or a custom wordpress action ? Here&#8217;s how to setup a pretty icon and action (<em>button to click on</em>) for our wordpress service.</p>
<p>To get started, you&#8217;ll probably need a copy of the <a href="http://svn.automattic.com/wordpress/trunk/wp-admin/images/wordpress-logo.png" rel="lightbox[271]">wordpress logo from the svn</a> , I then cut the &#8220;W&#8221; out to make a square icon, but you can do what you like <img src='http://www.linickx.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Firstly something non essential: To display any icon in nagios as a &#8220;host icon&#8221; you&#8217;re going to need it in both png and gd2 image format, you&#8217;ll have to install a conversion tool. (<em>for redhat</em>)</p>
<pre class="brush: plain; title: ; notranslate">yum install gd-progs</pre>
<p>to run the conversion, use the following&#8230;</p>
<pre class="brush: plain; title: ; notranslate">pngtogd2 wordpress-logo.png wordpress-logo.gd2 0 1</pre>
<p>that&#8217;ll give you a chunk size of 0 and no compression <a href="http://www.nagios.org/faqs/viewfaq.php?faq_id=97">as recommended for nagios</a>.</p>
<p>But if you just want service icons, then you can get away with just a png. Save any custom images in <strong>/usr/share/nagios/images/logos/</strong> make sure they&#8217;re readable ( <em>e.g. chmod 644 file</em> ) and we&#8217;re good to go.</p>
<p>So the config file, 1st make sure you have <strong>cfg_file=/etc/nagios/serviceextinfo.cfg</strong> enabled in <strong>/etc/nagios/nagios.cfg</strong> . My sericeextinfo.cfg has the following&#8230;</p>
<pre class="brush: plain; title: ; notranslate">
define serviceextinfo{
	host_name               linickx.com
	service_description     WordPress
	notes                   My website  powered by wordpress !
	icon_image              wordpress-w.png
	icon_image_alt          WordPress
	action_url              http://$HOSTADDRESS$/blog/wp-admin/
}
</pre>
<p>What this does is it adds my wordpress-w icon to the nagios status pages, and give me a &#8220;red star&#8221; type icon which when I click on takes me to my wordpress admin page&#8230; cool !</p>
<p><strong>Some compulsory Screen-shots.</strong></p>
<table align="center">
<tr>
<td><a href='http://www.linickx.com/files/2008/05/nagios-linickxdotcom-host-detail.png' rel="lightbox[271]"><img src="http://www.linickx.com/files/2008/05/nagios-linickxdotcom-host-detail-150x150.png" alt="Nagios Host Detail Example" title="nagios linickx.com host detail" width="150" height="150" class="alignnone size-thumbnail wp-image-415" /></a></td>
<td><a href='http://www.linickx.com/files/2008/05/nagios-linickxdotcom-service-wordpress-detail.png' rel="lightbox[271]"><img src="http://www.linickx.com/files/2008/05/nagios-linickxdotcom-service-wordpress-detail-150x150.png" alt="Nagios Service detail for WordPress" title="nagios linickx.com service wordpress detail" width="150" height="150" class="alignnone size-thumbnail wp-image-416" /></a></td>
</tr>
</table>
<p>That should just about wrap it up, one fully monitored wordpress installation; as you can see this can be adapted to monitor any php / mysql app <img src='http://www.linickx.com/wp/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Please <a href="http://www.linickx.com/index.php?content=contact">let me know</a> if you have any further suggestions.</p>
<img src="http://www.linickx.com/wp/wp-content/themes/linickx_v2/images/nick_sig_bggrey.png" alt="Nick" /> <hr/>Copyright &copy; 2012 <strong><a href="http://www.linickx.com">[LINICKX].com</a></strong>. This Feed is for personal non-commercial use only. Please check my <a href="http://www.linickx.com/?page_id=63">Site Terms and Conditions</a> for full details on copyrights. If you have any concerns with the content of this feed you may <a href="http://www.linickx.com/contact">contact me here</a>.<br/><span style="float: right;font-size: 7pt"><a href="http://blog.taragana.com/index.php/archive/wordpress-plugins-provided-by-taraganacom/">WP Copyright Plugin</a></span>]]></content:encoded>
			<wfw:commentRss>http://www.linickx.com/271/how-to-monitor-wordpress-with-nagios/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

