<?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>Mike&#039;s Musings</title>
	<atom:link href="http://www.mikespicer.net/wp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikespicer.net/wp</link>
	<description>There must be something useful here...</description>
	<lastBuildDate>Mon, 05 Dec 2011 22:19:45 +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>Wakemate Revisited</title>
		<link>http://www.mikespicer.net/wp/everything/wakemate-revisited/</link>
		<comments>http://www.mikespicer.net/wp/everything/wakemate-revisited/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 22:18:00 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Everything Else]]></category>
		<category><![CDATA[sleep]]></category>
		<category><![CDATA[Sleep system]]></category>
		<category><![CDATA[WakeMate]]></category>

		<guid isPermaLink="false">http://www.mikespicer.net/wp/?p=101</guid>
		<description><![CDATA[After months of deliberation, I am finally back to write my experience with the Wakemate. Let me start by saying this incredible device has helped me track an analyze my sleep. It has also helped me feel more rested when I wake up in the mornings. Overall this system has been pretty good. Hardware &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>After months of deliberation, I am finally back to write my experience with the Wakemate.  Let me start by saying this incredible device has helped me track an analyze my sleep.  It has also helped me feel more rested when I wake up in the mornings.  Overall this system has been pretty good.  </p>
<p>Hardware &#8211; The wrist band was a little bit snug for me, but has relaxed more as I wear it.  Its a bit bulky when your not used to sleeping with something attached to your wrist.  I also have not had any issues with it connecting to my Droid X phone.  The main computer in the wristband comes out easily for washing.  It has a standard mini USB plug which worked with a USB charger I had kicking around.  </p>
<p>Software &#8211; The software is extremely easy to use. The App installed without issue on my Droid X. I quickly setup the alarm and was able to start my sleep cycle.  The only beef I have about the App is that if you go to another program or switch to the homescreen, then when you come back to the app, it is as if you opened it for the first time.  It should be able to run in the background like other alarm applications.  The included ring tones are quite pleasant.  </p>
<p>Success &#8211; This product works by measuring your body&#8217;s movement through the accelerometer and transmits via Bluetooth to your phone.  Once you wake up it uploads the entire nights data to the cloud for analysis.  I have had a number of nights where I needed to stay up late working on a project and then wake up only after a few hours. After a few times of using the Wakemate, I was able to get nearly the same quality of sleep, but with alot less time actually asleep.  </p>
<p>One night I went to sleep at around 3:30 am and had a meeting at 7:00 am.  I set the Wakemate and it woke me up at 6:45.  I didn&#8217;t feel the same groggy that I would normally feel because it woke me up from higher levels of sleep and not from within REM. The coolest part of this system is that it attaches a number to the result of your sleep.  100 being the best, 1 being the worst.  It calculates the amount of time you were in REM, and each level sleep to determine how quality of a sleep you had.  My average is 80 which isn&#8217;t too bad.  You can also add tags to your sleep to describe your sleep so that you can further analyze your sleep pattern given certain tags.  For example, I have the tag &#8220;Working Late&#8221; which I attach to any of my scores where I go to bed right after I finish work.  I can go back and see if I get as restful of sleep when I fall asleep directly from work or when I have some down time.  </p>
<p>Final Thoughts &#8211; This system is a great system if you are consistent with it.  My biggest problem is that I forget to charge the device when I leave for work and then am unable to use it the next night because the battery is low or dead.  The next problem I have is leaving enough time each night to set it up with and connect the Bluetooth. It is literally 2 steps to do this so this is pure laziness. I recommend this product to anyone looking to get more from their sleep, or that is a nerd and loves stats.  </p>
<p>Cheers,</p>
<p>Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikespicer.net/wp/everything/wakemate-revisited/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WakeMate Sleep System</title>
		<link>http://www.mikespicer.net/wp/everything/wakemate-sleep-system/</link>
		<comments>http://www.mikespicer.net/wp/everything/wakemate-sleep-system/#comments</comments>
		<pubDate>Tue, 10 May 2011 06:49:18 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Everything Else]]></category>
		<category><![CDATA[sleep]]></category>
		<category><![CDATA[Sleep system]]></category>
		<category><![CDATA[WakeMate]]></category>

		<guid isPermaLink="false">http://www.mikespicer.net/wp/?p=97</guid>
		<description><![CDATA[I am always fascinated by sleep systems and peoples inherent want to defeat sleep. I started in college with all night &#8220;Lan Parties&#8221; where we would have contests to see who could consume the most caffeine and stay up the longest. Then homework replaced my parties and long drawn out projects were my games. Once [...]]]></description>
			<content:encoded><![CDATA[<p>I am always fascinated by sleep systems and peoples inherent want to defeat sleep.  I started in college with all night &#8220;Lan Parties&#8221; where we would have contests to see who could consume the most caffeine and stay up the longest.  Then homework replaced my parties and long drawn out projects were my games.  Once I graduated and joined the real world of work and worry, I still find it useful to conquer sleep.  I have read many statistics of how the human body doesn&#8217;t really need 8 hours, or that you can break up your sleep cycle, or that you can sleep less and accomplish more.  </p>
<p>I initially started following a system where the theory was getting up was a conditioned behavior.  The idea was to train yourself to jump up at the sound of your alarm.  Like any good habit, after a few days of sleeping in, my ability to jump up on subsequent days was completely gone. </p>
<p>After frustration my research lead me to a scientific way of waking yourself up.  It is WakeMate.  This system is based on an accelerometer worn around your wrist that communicated via bluetooth to your Android or iOS device.  I researched it and read the reviews and finally bought it.  The 30 day money back guarantee finally sold me on the deal, because if there were any problems, I&#8217;d ship it back and be right where I was when I got it.  </p>
<p>Tonight is my first night of using it.  I pulled it out of the package, charged the battery.  I synced it to my Droid X, which people on the reviews said was not possible.  It is possible and it worked seamless.  I was able to log in to my account and was able to set all the settings.  I am ready to go to sleep now.  Everything looks like it is working properly.  Now all that is left to do if push the sleep button once I finish this write up.  </p>
<p>I am going to try and log my results with this system since my goals are to sleep less while having more fulfilling sleep.  About 80% of my mornings are a fight with myself and my determination is starting to falter.  Hopefully this system gives me the edge I need to avoid waking up during quality sleep.  Wish me luck!!!</p>
<p>Cheers,</p>
<p>Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikespicer.net/wp/everything/wakemate-sleep-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Locked SVN Repo</title>
		<link>http://www.mikespicer.net/wp/linux/locked-svn-repo/</link>
		<comments>http://www.mikespicer.net/wp/linux/locked-svn-repo/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 08:50:29 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.mikespicer.net/wp/?p=95</guid>
		<description><![CDATA[Have you ever been working on an SVN server and had to ask yourself, &#8220;Why in tar-nation is this file not commiting???!! And who is Joey to be so important to lock a file.&#8221; For which you gather all your rage and ask Joey why he had the audacity to lock the files you needed [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever been working on an SVN server and had to ask yourself, &#8220;Why in tar-nation is this file not commiting???!! And who is Joey to be so important to lock a file.&#8221;  For which you gather all your rage and ask Joey why he had the audacity to lock the files you needed to commit?  He tells you he didn&#8217;t lock them, nor is he working in the same area of the code.  Then you discover that by some way he accidentally locked 1/4 of all the files scattered throughout the repository.  Since you are very smart you went to the server command line and did:<br />
<code>svnadmin lslocks [path to repo]</code><br />
And it told you all the locks in the system.  </p>
<p>Now you should be thinking, how can I take that list and then unlock the whole server?  I too faced this same problem.  This is how I dealt with it.  First don&#8217;t mess with svnadmin rmlock&#8230; I couldn&#8217;t make it work to save my life.  The setup is like this, we are going to grep out some keywords from the svnadmin lslocks to get only paths, then we are going to use awk to help us build perfect paths, then we are going to use the svn client to finish the job. And it all fits on one line.<br />
*Important: Make sure your local copy is updated to the latest revision.<br />
<code>svnadmin lslocks /usr/local/svn/repos/[repo-name]/ |grep Path | awk '{print "file:///usr/local/svn/repos/[repo-name]" $2}' | xargs svn unlock --force</code></p>
<p>Thanks to some nifty piping, you have just unlocked your whole SVN.  Let me explain some key points here, &#8220;Path&#8221; next to grep will draw out something that looks like this: </p>
<p><code>Path: [Path to locked file]</code><br />
Here is a really quick run down of awk, basically it takes any white space and then seperates the information into variables starting with $0 being the whole line, $1 being the first, $2, the second, etc.  $1 would be the word &#8220;Path:&#8221; and $2 is our path.  But that is not enough because we have to make it a qualified repo path, and since I am doing it on my local server I can use the &#8220;file:///&#8221; prefix.  After that we send it to xargs and then use svn unlock and xargs will apend the argument to the end of the line.  &#8211;force is also important because that will make sure you steal the lock in the unlock process.  </p>
<p><em>FINE PRINT aka Caution: SVN locks were designed to protect files while a person is working on those files so no one else could over write them while they were developing on those files.  The idea is that someone can get exclusive access to the files, change them, commit them, and then release the lock when the work is completed.  If you are using this type of idea for your system, please send the list of locks to all of your developers and then have them manually unlock the locks they set.  Otherwise you can ruin and destroy work in progress if you are not careful.  Now if you do not care about locks and know what is being developed, by all means use the function above. </em></p>
<p>If you have a better way to unlock your svn repository I&#8217;d love to hear it, I created this method from my own knowledge of the shell. If you need some help or have questions, post a comment and I&#8217;ll get back with you.</p>
<p>Cheers,</p>
<p>-m</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikespicer.net/wp/linux/locked-svn-repo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cisco VPN Multiple or Overlapping L2L Tunnels Using NAT</title>
		<link>http://www.mikespicer.net/wp/cisco/cisco-vpn-multiple-or-overlapping-l2l-tunnels-using-nat/</link>
		<comments>http://www.mikespicer.net/wp/cisco/cisco-vpn-multiple-or-overlapping-l2l-tunnels-using-nat/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 08:09:01 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Cisco]]></category>
		<category><![CDATA[Cisco ASA]]></category>
		<category><![CDATA[multiple vpn]]></category>
		<category><![CDATA[NAT]]></category>
		<category><![CDATA[Tunnels]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://www.mikespicer.net/wp/?p=76</guid>
		<description><![CDATA[This post will have the details on how to configure multiple or overlapping tunnels which use NAT while having an existing one already created. This will effectively show you how to create multiple L2L tunnels to completely different networks and how to setup the access-list rules to make sure your traffic gets to where it [...]]]></description>
			<content:encoded><![CDATA[<p>This post will have the details on how to configure multiple or overlapping tunnels which use NAT while having an existing one already created.  This will effectively show you how to create multiple L2L tunnels to completely different networks and how to setup the access-list rules to make sure your traffic gets to where it needs to go.  This has been one of the more difficult VPN configuration that I have seen so far.  </p>
<p>Begin by first setting up an access-list for <em>interesting</em> traffic.  The world <em>interesting</em> in the Cisco context means any traffic that is bound for the VPN. Then you will configure any other ACL rules that you want.  After that you must define your crypto maps.  Crypto maps are the instructions for how the VPN work.  They include encryption, hashing, who their talking to and what access-list rules to use.  After that you define tunnel-group attributes which are the pre-shared key if one is used.  This first code block will feature the use of a static NAT example.  Static NAT is used in the situation of a single host mapping to a single outside IP.  For example, if you had a local server at 192.168.1.2 and you wanted outside to inside access to this server from its 1.1.1.9 outside IP address on all ports, then you would define a static NAT rule in the ASA to accommodate this.  If this is foreign to you and you want a blog entry on it specifically, drop me a line in the comments.  In the following example, here is the break down of IP&#8217;s and locations:<br />
Site A is a Pre-configured L2L Vpn that you need to connect to.  At site A, they use a local Subnet of 192.168.7.0/24.  They have given you a NAT IP address for your outside interface of 10.2.2.2.  Their Outside IP address of their ASA is 1.1.1.7.  Your internal network is 192.168.1.0/24.  Your server that needs to talk to the other side is 192.168.1.2  What you are trying to accomplish is to get to 192.168.7.0/24 resources by NATing through 10.2.2.2 while giving Site A access back to your server at 192.168.1.2<br />
<code><br />
! Access list for our interesting traffic.  This is traffic that goes from the NAT to the other side of the VPN.<br />
access-list vpn1 extended permit ip host 10.2.2.2 192.168.7.0 255.255.255.0</p>
<p>! Access List to allow traffic from the local server to the other side of the VPN and to allow traffic<br />
access-list static-vpn1 extended permit ip host 192.168.1.2 192.168.7.0 255.255.255.0 </p>
<p>! Setup the encryption transform-set<br />
crypto ipsec transform-set newset esp-3des esp-md5-hmac</p>
<p>! Crypto map configuration that will match Site A, starting with match address to match interesting traffic<br />
crypto map newmap 1 match address vpn1<br />
crypto map newmap 1 set peer 1.1.1.7<br />
! Set the crypto map to use the transform set<br />
crypto map newmap 1 set transform-set newset<br />
crypto map newmap interface outside<br />
crypto isakmp enable outside<br />
! These settings will come from your Site A configuration, match that.<br />
crypto isakmp policy 1<br />
 authentication pre-share<br />
 encryption 3des<br />
 hash sha<br />
 group 1<br />
 lifetime 86400</p>
<p>! Static will configure your Static NAT from your access list (local subnet to remote VPN subnet) through the outside interfaces NAT address<br />
static (inside,outside) 10.2.2.2  access-list static-vpn1</p>
<p>! And now for the tunnel-group configuration<br />
tunnel-group 1.1.1.7 type ipsec-l2l<br />
tunnel-group 1.1.1.7 ipsec-attributes<br />
 pre-shared-key [Match Pre-shared Key]<br />
</code></p>
<p>Now if everything went well you now have a functioning tunnel to Site A.  Test it by pinging.  I am going to write an article on advanced VPN troubleshooting one of these days because Cisco is quite cryptic and difficult to troubleshoot if the VPN doesn&#8217;t come up. For now I&#8217;ll assume all went well.  </p>
<p>Now it is time to program the second VPN.  This VPN will be much the same as the last, but instead of seeking local access to only one machine, we want the whole subnet to access resources across the VPN.  But we do not want the other side of the VPN talking back to our local machines.  This is made possible by a Global NAT or Dynamic NAT policy.  This is much the same as the policy on your home generic wireless router.  It provides you NAT to the internet, but it is difficult for traffic to come back to your network unless you allow it.  The IP&#8217;s for the local network will stay the same, but the remote and NAT address are different.  The remote side of the VPN has a local subnet of 172.16.4.0/24.  The remote side has provided you a NAT address of 10.10.10.4.  Their Peer address is 2.2.2.4.  </p>
<p>There are a few caveats that I am going to save you alot of trouble I found out the hard way.  The first deals with crypto maps.  You can not define a new crypto map name for a new VPN, you must use the same map name as you used previously, but you must change the priority (the number next to the map name).  The second is creating a NAT rule to stop traffic from going to the internet across the ASA.  When doing this, if you already have existing NAT rules (besides 0.0.0.0 default rule) then you must use that ACL to define it.  Only one NAT rule ACL will work, all others drop.  If you need clarification on this, type show run | in nat and if you see more than 2 lines of NAT listed and you are not sure what you are doing, then you are doing it wrong.  Remove one of the NAT lines and combine access-lists.  The rules are very similar to our previous one, I&#8217;ll give the play by play again:<br />
<code><br />
! Access list for our interesting traffic.  This is traffic that goes from the NAT to the other side of the VPN.<br />
access-list new-vpn extended permit ip host 10.10.10.4 172.16.4.0 255.255.255.0</p>
<p>! Access List to allow traffic from the local subnet to the remote subnet<br />
access-list new-nat extended permit ip 192.168.1.0 255.255.255.0 172.16.4.0 255.255.255.0 </p>
<p>! Setup access-list to stop traffic from going over the primary NAT to the internet<br />
access-list inside_nat_outbound extended permit ip 192.168.1.0 255.255.255.0 172.16.4.0 255.255.255.0 </p>
<p>! Setup the encryption transform-set<br />
crypto ipsec transform-set another-set esp-3des esp-sha-hmac</p>
<p>! Crypto map configuration that will match Site A, starting with match address to match interesting traffic<br />
crypto map newmap 1 match address new-vpn<br />
crypto map newmap 1 set peer 2.2.2.4<br />
! Set the crypto map to use the transform set<br />
crypto map newmap 1 set transform-set another-set<br />
! These settings will come from your next remote sites configuration, match that.<br />
crypto isakmp policy 5<br />
 authentication pre-share<br />
 encryption 3des<br />
 hash sha<br />
 group 2<br />
 lifetime 86400</p>
<p>! Global will setup the interface to do a Dynamic NAT of all local traffic to remote NAT<br />
global (outside) 2 192.168.204.33 netmask 255.255.255.0</p>
<p>! NAT rule to stop traffic destine for the VPN to go out over the primary outside interface.  Make sure it goes over the VPN<br />
nat (inside) 2 access-list inside_nat_outbound</p>
<p>! And now for the tunnel-group configuration<br />
tunnel-group 2.2.2.4 type ipsec-l2l<br />
tunnel-group 2.2.2.4 ipsec-attributes<br />
 pre-shared-key [Match Pre-shared Key]<br />
</code></p>
<p>Now if everything has gone well, then you have got yourself 2 functioning L2L tunnels to two separate networks.  If things didn&#8217;t go well, then you&#8217;ll have to wait for my trouble shooting guide which will be coming shortly. Or you could leave me a message int he comments and I&#8217;ll get back with you.  </p>
<p>I hope you have enjoyed my guide to setting up multiple L2L VPN&#8217;s and have found this useful.  Good LUCK!</p>
<p>Cheers,</p>
<p>Mike </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikespicer.net/wp/cisco/cisco-vpn-multiple-or-overlapping-l2l-tunnels-using-nat/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ubuntu 10.10 and Grub 2 Fun</title>
		<link>http://www.mikespicer.net/wp/linux/ubuntu-10-10-and-grub-2-fun/</link>
		<comments>http://www.mikespicer.net/wp/linux/ubuntu-10-10-and-grub-2-fun/#comments</comments>
		<pubDate>Sun, 31 Oct 2010 20:45:47 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.mikespicer.net/wp/?p=73</guid>
		<description><![CDATA[I am a few distros behind the current Ubuntu. I have been using 9.04 and 8.10 since I have found them very stable and familiar. For kicks, I installed 10.10 Server on a new project and thought I would find the same things I found in previous distros. For the most part I did. However, [...]]]></description>
			<content:encoded><![CDATA[<p>I am a few distros behind the current Ubuntu.  I have been using 9.04 and 8.10 since I have found them very stable and familiar.  For kicks, I installed 10.10 Server on a new project and thought I would find the same things I found in previous distros.  For the most part I did.  However, I stumbled across a stupid change that crippled my server.  First off, the server is a headless and keyboardless setup.  I know, I should run an IP KVM for complete control, but my other servers haven&#8217;t warranted it yet.   </p>
<p>The issue is that when the server looses power, and then during boot it looses power again, it throws a &#8220;Recordfail&#8221; flag that can be used to change the way Grub2 boots.  In the default configuration of Ubuntu 10.10, they have chosen to display the boot menu without a timer when there is a record fail.  It is much reminiscent of Windows when it fails to boot properly and gives you the boot menu for different modes.  </p>
<p>In a desktop environment, this would be fine because I could choose to run recovery, run normally or whatever.  However, in my configuration, I want this thing to boot even it if is on fire.  If it doesn&#8217;t boot, it should be cause some hardware needs to be replaced.  After some digging, I found the solution.  Edit /etc/grub.d/10_linux and commment the following lines like so:</p>
<p># recordfail=1<br />
# save_env recordfail</p>
<p>Save the file and then run sudo update-grub to generate a new grub.cfg file.  Viola, no more stalled boots.  </p>
<p>Cheers,</p>
<p>-Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikespicer.net/wp/linux/ubuntu-10-10-and-grub-2-fun/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Boot Script (Startup Script) with Ubiquiti AirOS</title>
		<link>http://www.mikespicer.net/wp/linux/boot-script-startup-script-with-ubiquiti-airos/</link>
		<comments>http://www.mikespicer.net/wp/linux/boot-script-startup-script-with-ubiquiti-airos/#comments</comments>
		<pubDate>Sat, 30 Oct 2010 07:04:46 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubiquiti]]></category>

		<guid isPermaLink="false">http://www.mikespicer.net/wp/?p=71</guid>
		<description><![CDATA[I have been hitting my head against the wall trying to set the bridge priority of a few radios involved in spanning tree. It is easy to log in to the radio and change the priority with the brctl setbridgeprio br0 . But what if you want to change it on boot and automatically? I [...]]]></description>
			<content:encoded><![CDATA[<p>I have been hitting my head against the wall trying to set the bridge priority of a few radios involved in spanning tree.  It is easy to log in to the radio and change the priority with the brctl setbridgeprio br0 <num>.  But what if you want to change it on boot and automatically?  I dug through the Ubiquiti forums only to find bits and pieces that lead me to the final solution.  </p>
<p>There are a number of key files that don&#8217;t exist by default, but can be setup to provide the scripting functionality you may need.  </p>
<p><code><br />
/etc/persistent/rc.presysinit<br />
/etc/persistent/rc.postsysinit</p>
<p>/etc/persistent/rc.prestart<br />
/etc/persistent/rc.poststart</p>
<p>/etc/persistent/rc.prestop<br />
/etc/persistent/rc.poststop<br />
</code></p>
<p>If you have read any of my other posts you will see that I am a huge supporter of VIM, and will assume you are using it.  You can simply do vi /etc/persistent/<CHOSEN FUNCTION> and then write your script.  For my example, I will give you a copy of my bridge priority script:</p>
<p><code><br />
#!/bin/sh<br />
brctl setbridgeprio br0 7000<br />
brctl setpathcost ath0 10<br />
</code></p>
<p>In a previous post I talked about the command that makes your /etc/ directory and changes to it persistent.  </p>
<p><code><br />
cfgmtd -w -p /etc/<br />
</code></p>
<p>This command will write the changes to /etc/ to flash and then you will be able to reboot the system and the new script will take effect.  Hopefully you found this helpful.</p>
<p>Cheers,</p>
<p>-Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikespicer.net/wp/linux/boot-script-startup-script-with-ubiquiti-airos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remote Keybased Login with SSH to AirOS</title>
		<link>http://www.mikespicer.net/wp/ubiquiti/remote-keybased-login-with-ssh-to-airos/</link>
		<comments>http://www.mikespicer.net/wp/ubiquiti/remote-keybased-login-with-ssh-to-airos/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 07:22:32 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Ubiquiti]]></category>

		<guid isPermaLink="false">http://www.mikespicer.net/wp/?p=66</guid>
		<description><![CDATA[I found the holy grail for any network admin, password-less login. This gives you the power to run remote scripts, forget passwords, and control the world&#8230; well maybe. Anyways, lets get to it. This specific post is talking about how to remotely login to an AirOS system (Ubiquiti). I&#8217;ll assume you are using a Linux [...]]]></description>
			<content:encoded><![CDATA[<p>I found the holy grail for any network admin, password-less login.  This gives you the power to run remote scripts, forget passwords, and control the world&#8230; well maybe.  Anyways, lets get to it.  This specific post is talking about how to remotely login to an AirOS system (Ubiquiti).  I&#8217;ll assume you are using a Linux system, or if not, you will need to know how to generate your own rsa key.  </p>
<p>First, open an ssh session to the radio in question and do the following:<br />
<code><br />
#vi /tmp/system.cfg<br />
</code><br />
Next add users.1.homedir=/etc/persistent and type the following:</p>
<p><code><br />
#cfgmtd -w -p /etc/<br />
#reboot<br />
</code></p>
<p>Next do ssh-keygen to generate a new RSA key.  You will be asked for a directory and a passphrase.  Make sure you leave passphrase blank, or you will have to enter that key each time.  </p>
<p>Now you will need to make a directory and copy the public key to the AirOS system:<br />
<code><br />
#ssh username@x.x.x.x 'mkdir /etc/persistent/.ssh/'<br />
#cat ~/.ssh/id_rsa.pub | ssh username@x.x.x.x 'cat >> /etc/persistent/.ssh/authorized_keys'<br />
</code></p>
<p>If you changed the directory during the ssh-keygen process, make the change in the command above.  </p>
<p>Now make your changes persistent with this command:<br />
<code>#cfgmtd -w -p /etc/</code></p>
<p>You should be able to login without a password!</p>
<p>Cheers,</p>
<p>Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikespicer.net/wp/ubiquiti/remote-keybased-login-with-ssh-to-airos/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Another Round With Qmail</title>
		<link>http://www.mikespicer.net/wp/linux/another-round-with-qmail/</link>
		<comments>http://www.mikespicer.net/wp/linux/another-round-with-qmail/#comments</comments>
		<pubDate>Fri, 08 Oct 2010 17:39:04 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.mikespicer.net/wp/?p=63</guid>
		<description><![CDATA[In today&#8217;s match we have a Qmail Server that has been demoted from sending and receiving email to just sending. The server had been properly configured for the new changes and email was successfully being sent off the server. Today, however mail stop sending to only one domain, the old domain that was hosted on [...]]]></description>
			<content:encoded><![CDATA[<p>In today&#8217;s match we have a Qmail Server that has been demoted from sending and receiving email to just sending.  The server had been properly configured for the new changes and email was successfully being sent off the server.  Today, however mail stop sending to only one domain, the old domain that was hosted on the server.  </p>
<p>The first place to look is the logs.  Read the logs, know the logs, they will help you.  Here is a command that will take the non-human readable date code and make it readable for better understanding:<br />
<code> cat /var/log/qmail/qmail-send/current |tai64nlocal |less</code></p>
<p>There are 2 major logs to check when dealing with qmail:<br />
<code>/var/log/qmail/qmail-smtp/current<br />
/var/log/qmail/qmail-send/current</code></p>
<p>Here is a sample of a bounce message log entry:<br />
<code><br />
2010-10-08 11:04:05.068209500 starting delivery 280: msg 1328309 to local dump@maul.com<br />
2010-10-08 11:04:05.075688500 status: local 1/10 remote 0/120<br />
2010-10-08 11:04:05.141754500 delivery 280: failure: Sorry,_no_mailbox_here_by_tha<br />
t_name._(#5.1.1)/<br />
2010-10-08 11:04:05.146678500 status: local 0/10 remote 0/120<br />
2010-10-08 11:04:05.155633500 triple bounce: discarding bounce/1328309<br />
2010-10-08 11:04:05.158451500 end msg 1328309<br />
2010-10-08 11:08:06.159425500 new msg 1327108<br />
2010-10-08 11:08:06.159435500 info msg 1327108: bytes 1025 from <anonymous@maul.com> qp 5008 uid 0<br />
</code><br />
The important thing to follow here is the &#8220;delivery 280.&#8221;  That is the delivery number that will allow you to follow the message.  In this case we can see it was a local delivery that failed and now is bouncing.  </p>
<p>It can be daunting to dig through the log files, but they will have the answer if you look.</p>
<p>Cheers,</p>
<p>Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikespicer.net/wp/linux/another-round-with-qmail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thoughts on Perl debugging and programming</title>
		<link>http://www.mikespicer.net/wp/programming/perl/thoughts-on-perl-debugging-and-programming/</link>
		<comments>http://www.mikespicer.net/wp/programming/perl/thoughts-on-perl-debugging-and-programming/#comments</comments>
		<pubDate>Thu, 16 Sep 2010 07:08:36 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Perl]]></category>

		<guid isPermaLink="false">http://www.mikespicer.net/wp/?p=60</guid>
		<description><![CDATA[Every now and then you get a problem that seems solvable and then, bam, no solution. Everything you do comes up failure. You ask for help in forums and on IRC and still nothing. You begin to question code, your experience, and everything else you have. You leave the project to clear your mind, but [...]]]></description>
			<content:encoded><![CDATA[<p>Every now and then you get a problem that seems solvable and then, bam, no solution.  Everything you do comes up failure.  You ask for help in forums and on IRC and still nothing.  You begin to question code, your experience, and everything else you have.  You leave the project to clear your mind, but that doesn&#8217;t seem to help.  Finally when you are back into the grind, you get a shed of light.  You forgot to change a source file that you thought you had changed but turns out you didn&#8217;t.  You have dug soo deep that you completely passed the problem and solution and have found magma.  </p>
<p>I have had this problem before where I look for a problem at the core, when really it is something on the surface.  I am talking about an instance where there was a perl script on Cron that was sending email at given intervals.  I thought the problem was with the database or with data communication, when really it was with an issue with syntax.  I had originally looked through the source file, made some changes, changed them back and then screwed myself.  </p>
<p>The important thing to remember is that when a problem seems overly complex, get back to basics and you might find the problem.  In the networking world, you would adhere to the OSI 7 layer model.  In programming I would say stick to the things you changed first and then double check those items first.  </p>
<p>To some of you, this will sound obvious, but I think it is worth saying.  Well, good luck with programming and debugging.</p>
<p>Cheers,</p>
<p>Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikespicer.net/wp/programming/perl/thoughts-on-perl-debugging-and-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>USB to Serial, Linux comes with built-in drivers!</title>
		<link>http://www.mikespicer.net/wp/linux/usb-to-serial-linux-comes-with-built-in-drivers/</link>
		<comments>http://www.mikespicer.net/wp/linux/usb-to-serial-linux-comes-with-built-in-drivers/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 00:46:41 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.mikespicer.net/wp/?p=58</guid>
		<description><![CDATA[I was trying to communicate with a serial device today and found that Linux is much more resourceful than M$oft products (Obviously). I plugged in my USB to serial adapter, and typed in dmesg and saw it there in the list, ready to use. But now, how to use it? First determine where you USB [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to communicate with a serial device today and found that Linux is much more resourceful than M$oft products (Obviously).  I plugged in my USB to serial adapter, and typed in dmesg and saw it there in the list, ready to use.  But now, how to use it?</p>
<p>First determine where you USB device is located.  You can ls /dev/ and look for it&#8230; Since there are 700+ items there, I&#8217;ll give you a hint: ttyUSB is what it should start with.  Mine was /dev/ttyUSB0.</p>
<p>I found a tutorial of a little program called minicom.  Minicom is a lightweight terminal client that is quiet cool in my opinion.  Start minicom with the following:</p>
<p><code>minicom -s</code></p>
<p>This will put you in interactive configuration mode. Change your port information to what you discovered above and make sure to set the baud rate and other parameters.  Now choose to save the config as dfl (default) and away you go.</p>
<p>Thanks again Linux for being awesome!</p>
<p>-Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikespicer.net/wp/linux/usb-to-serial-linux-comes-with-built-in-drivers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

