<?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>blog &#124; edwards research &#187; networking</title>
	<atom:link href="http://blog.edwards-research.com/category/networking/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.edwards-research.com</link>
	<description>some notes from our staff...</description>
	<lastBuildDate>Wed, 04 May 2011 02:11:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Spam Forensics&#160;II</title>
		<link>http://blog.edwards-research.com/2010/09/spam-forensics-ii/</link>
		<comments>http://blog.edwards-research.com/2010/09/spam-forensics-ii/#comments</comments>
		<pubDate>Fri, 24 Sep 2010 18:39:08 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[networking]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[forensics]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://blog.edwards-research.com/?p=407</guid>
		<description><![CDATA[(Continued from Spam Forensics I) Our email contained an attachment in html: &#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD HTML 4.01//EN&#34; &#34;http://www.w3.org/TR/html4/strict.dtd&#34;&#62; &#60;html&#62; &#60;head&#62; &#60;meta content=&#34;text/html; charset=ISO-8859-1&#34; http-equiv=&#34;content-type&#34;&#62; &#60;title&#62;&#60;/title&#62; &#60;/head&#62; &#60;body&#62; Greetings from &#60;span class=&#34;il&#34;&#62;Amazon&#60;/span&#62;.com.&#60;br&#62; &#60;br&#62; We're sorry. &#38;nbsp;You've written to an address that cannot accept incoming&#60;br&#62; e-mail. &#38;nbsp;But that's OK--this automated response will direct you to the&#60;br&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>(Continued from <a href="http://blog.edwards-research.com/2010/09/spam-forensics-i/">Spam Forensics I</a>)</p>
<p>Our email contained an attachment in html:</p>
<pre class="brush: xml; title: ;">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;meta content=&quot;text/html; charset=ISO-8859-1&quot;
 http-equiv=&quot;content-type&quot;&gt;
  &lt;title&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
Greetings from &lt;span class=&quot;il&quot;&gt;Amazon&lt;/span&gt;.com.&lt;br&gt;
&lt;br&gt;
We're sorry. &amp;nbsp;You've written to an address that cannot accept
incoming&lt;br&gt;
e-mail. &amp;nbsp;But that's OK--this automated response will direct
you to the&lt;br&gt;
right place at &lt;span class=&quot;il&quot;&gt;Amazon&lt;/span&gt;.com
to answer your question or help you contact&lt;br&gt;
customer service if you need further assistance.&lt;br&gt;
&lt;br&gt;
You will find the answers to the most common questions here:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;Ordering: &lt;a href=&quot;http://www.amazon.com/help/ordering&quot;
 target=&quot;_blank&quot;&gt;http://www.&lt;span class=&quot;il&quot;&gt;amazon&lt;/span&gt;.com/help/&lt;wbr&gt;ordering&lt;/a&gt;&lt;br&gt;
&amp;nbsp;Where's My Stuff: &lt;a
 href=&quot;http://www.amazon.com/help/wheres-my-stuff&quot;
 target=&quot;_blank&quot;&gt;http://www.&lt;span class=&quot;il&quot;&gt;amazon&lt;/span&gt;.com/help/&lt;wbr&gt;wheres-my-stuff&lt;/a&gt;&lt;br&gt;
&amp;nbsp;Gift Certificates: &lt;a
 href=&quot;http://www.amazon.com/gift-certificates&quot; target=&quot;_blank&quot;&gt;http://www.&lt;span
 class=&quot;il&quot;&gt;amazon&lt;/span&gt;.com/gift-&lt;wbr&gt;certificates&lt;/a&gt;&lt;br&gt;
&amp;nbsp;Promotions: &lt;a
 href=&quot;http://www.amazon.com/o/tg/browse/-/565778/&quot;
 target=&quot;_blank&quot;&gt;http://www.&lt;span class=&quot;il&quot;&gt;amazon&lt;/span&gt;.com/o/tg/&lt;wbr&gt;browse/-/565778/&lt;/a&gt;&lt;br&gt;
&amp;nbsp;Shipping Options: &lt;a
 href=&quot;http://www.amazon.com/help/shipping&quot; target=&quot;_blank&quot;&gt;http://www.&lt;span
 class=&quot;il&quot;&gt;amazon&lt;/span&gt;.com/help/&lt;wbr&gt;shipping&lt;/a&gt;&lt;br&gt;
&amp;nbsp;Returns: &lt;a href=&quot;http://www.amazon.com/returns&quot;
 target=&quot;_blank&quot;&gt;http://www.&lt;span class=&quot;il&quot;&gt;amazon&lt;/span&gt;.com/returns&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;script&gt;if(frames){if(top.frames.length&gt;0)top.location.href=self.location;}&lt;/script&gt;&lt;script language=JavaScript&gt;document.write(unescape('%3Cme%74a h%74tp%2Deq%75iv%3D%22r%65fr%65sh%22 co%6Ete%6Et%3D%220%3B%75rl%3Dht%74p%3A%2F%2Fg%72ad%75at%69on%6Fut%66it%74er%73%2Ec%6F%2Ez%61%2F1%2Eht%6Dl%22 %2F%3E%0D%0A%3Ct%61bl%65 wi%64th%3D%221%300%25%22 bo%72de%72%3D%22%30%22%3E%3Ctr %62gc%6Flo%72%3D%22%2355%3668%38%22 a%6Cig%6E%3D%22%63en%74er%22%3E%3C%74d%3E%3Ca h%72ef%3D%22h%74tp%3A%2F%2F%77ww%2Epu%6Cls%6Fft%2Eco%6D%2Fh%74ml%70ow%65r%2E%68tm%22%3E%3C%66on%74 fa%63e%3D%22Ar%69al%2C He%6Cve%74ic%61%2C s%61ns%2Dse%72if%22 co%6Cor%3D%22#%46FF%46FF%22 si%7Ae%3D%22%2D1%22%3ET%68is %57eb %50ag%65 wa%73 pr%6Fte%63te%64 by %48TM%4CPo%77er%2C  Cl%69ck %68er%65 to %52eg%69st%65r%3C%2Ffo%6Et%3E%3C%2Fa%3E%3C%2F%74d%3E%3C%2Ft%72%3E%3C%2Fta%62le%3E%0D%0A'))&lt;/script&gt;
If your question is not answered by the above links, we invite you to&lt;br&gt;
search our Help Desk at &lt;a href=&quot;http://www.amazon.com/help&quot;
 target=&quot;_blank&quot;&gt;http://www.&lt;span class=&quot;il&quot;&gt;amazon&lt;/span&gt;.com/help&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
If you need to modify an unshipped order or make changes to your&lt;br&gt;
account or subscriptions, you may do so online at any time via&lt;br&gt;
Your Account: &amp;nbsp;&lt;a href=&quot;http://www.amazon.com/your-account&quot;
 target=&quot;_blank&quot;&gt;http://www.&lt;span class=&quot;il&quot;&gt;amazon&lt;/span&gt;.com/your-&lt;wbr&gt;account&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
We hope our online resources meet all your needs. &amp;nbsp;If you've
explored&lt;br&gt;
the above links but find you still need to get in touch with us,&lt;br&gt;
please click the &quot;Contact Customer Service&quot; link on our main Help page.&lt;br&gt;
&lt;br&gt;
Thanks for shopping at &lt;span class=&quot;il&quot;&gt;Amazon&lt;/span&gt;.com.&lt;br&gt;
&lt;br&gt;
Sincerely,&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;il&quot;&gt;Amazon&lt;/span&gt;.com Customer Service&lt;br&gt;
&lt;a href=&quot;http://www.amazon.com&quot; target=&quot;_blank&quot;&gt;http://www.&lt;span
 class=&quot;il&quot;&gt;amazon&lt;/span&gt;.com&lt;/a&gt;&lt;br&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>Which is pretty boring, containing some amazon links and otherwise benign code, except for line 37, which contains two JavaScript sections (formatting added):</p>
<pre>
&lt;script&gt;
    if(frames){
        if(top.frames.length&gt;0)
            top.location.href=self.location;
    }
&lt;/script&gt;

&lt;script language=JavaScript&gt;
    document.write(
        unescape('%3Cme%74a h%74tp%2Deq%75iv%3D%22r%65fr%65sh%22 co%6Ete%6Et%3D%220%3B%75rl%3Dht%74p%3A%2F%2Fg%72ad%75at%69on%6Fut%66it%74er%73%2Ec%6F%2Ez%61%2F1%2Eht%6Dl%22 %2F%3E%0D%0A%3Ct%61bl%65 wi%64th%3D%221%300%25%22 bo%72de%72%3D%22%30%22%3E%3Ctr %62gc%6Flo%72%3D%22%2355%3668%38%22 a%6Cig%6E%3D%22%63en%74er%22%3E%3C%74d%3E%3Ca h%72ef%3D%22h%74tp%3A%2F%2F%77ww%2Epu%6Cls%6Fft%2Eco%6D%2Fh%74ml%70ow%65r%2E%68tm%22%3E%3C%66on%74 fa%63e%3D%22Ar%69al%2C He%6Cve%74ic%61%2C s%61ns%2Dse%72if%22 co%6Cor%3D%22#%46FF%46FF%22 si%7Ae%3D%22%2D1%22%3ET%68is %57eb %50ag%65 wa%73 pr%6Fte%63te%64 by %48TM%4CPo%77er%2C  Cl%69ck %68er%65 to %52eg%69st%65r%3C%2Ffo%6Et%3E%3C%2Fa%3E%3C%2F%74d%3E%3C%2Ft%72%3E%3C%2Fta%62le%3E%0D%0A')
    )
&lt;/script&gt;
</pre>
<p>The first section is quickly identified as a simple <a href="http://en.wikipedia.org/wiki/Framekiller">FrameBuster</a>.</p>
<p>The section section simply inline inserts the value of the string, once it is <a href="http://www.w3schools.com/jsref/jsref_unescape.asp">unescaped</a>.  Using <a href="http://www.web-code.org/coding-tools/javascript-escape-unescape-converter-tool.html">the tool found here</a>, I unescaped the JavaScript string without worrying about what it did.</p>
<p>The result is (formatting added):</p>
<pre class="brush: xml; title: ;">
&lt;meta http-equiv=&quot;refresh&quot; content=&quot;0;url=http://graduationoutfitters.co.za/1.html&quot; /&gt;
&lt;table width=&quot;100%&quot; border=&quot;0&quot;&gt;
    &lt;tr bgcolor=&quot;#556688&quot; align=&quot;center&quot;&gt;
        &lt;td&gt;
            &lt;a href=&quot;http://www.pullsoft.com/htmlpower.htm&quot;&gt;
                &lt;font face=&quot;Arial, Helvetica, sans-serif&quot; color=&quot;#FFFFFF&quot; size=&quot;-1&quot;&gt;
                    This Web Page was protected by HTMLPower,  Click here to Register
                &lt;/font&gt;
            &lt;/a&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
</pre>
<p>This HTML meta tag &#8220;refreshes&#8221; or redirects your browser to whatever page is specified, in this case <strong>http://graduationoutfitters.co.za/1.html</strong>. (In case you&#8217;re wondering, the <a href="http://en.wikipedia.org/wiki/.za">.za TLD</a> is South Africa)</p>
<p>The humorous thing is, after looking at the <strong>pullsoft.com</strong> link, is appears the spammer used their software to encode the meta refresh tag, and the software appended a little advertisement.  How thoughtful.</p>
<p>After all that, nothing crazy &#8212; a forged email header, an (unnecessarily) encoded html meta refresh tag and one more spam for the bit bucket.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.edwards-research.com/2010/09/spam-forensics-ii/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Spam Forensics&#160;I</title>
		<link>http://blog.edwards-research.com/2010/09/spam-forensics-i/</link>
		<comments>http://blog.edwards-research.com/2010/09/spam-forensics-i/#comments</comments>
		<pubDate>Fri, 24 Sep 2010 18:30:09 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[networking]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[forensics]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[spf]]></category>

		<guid isPermaLink="false">http://blog.edwards-research.com/?p=399</guid>
		<description><![CDATA[I&#8217;ve been getting a lot of these emails coming through my Gmail filters &#8212; and on searching, I found a lot more were caught. After a quick look around I found a blog post discussing the most recent barrage over at geofffox.com and decided to look into it more closely. Here is what the message [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been getting a lot of these emails coming through my Gmail filters &#8212; and on searching, I found a lot more were caught.  After a quick look around I found a blog post discussing the most recent barrage over at <a href="http://www.geofffox.com/MT/archives/2010/09/23/another-new-spam-being-tested-with-html-attachment-from-amazon.php">geofffox.com</a> and decided to look into it more closely.</p>
<p>Here is what the message in &#8220;original form&#8221; with headers (I modified the headers &#8212; see below):</p>
<pre>
Delivered-To: {my_name}@gmail.com
Received: by 10.216.17.75 with SMTP id i53cs3487wei;
        Fri, 24 Sep 2010 00:33:03 -0700 (PDT)
Received: by 10.223.114.194 with SMTP id f2mr3098412faq.71.1285313582949;
        Fri, 24 Sep 2010 00:33:02 -0700 (PDT)
Return-Path: <{my_initials}+caf_={my_name}=gmail.com@{oneofmydomains.com}>
Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com [209.85.161.53])
        by mx.google.com with ESMTP id 15si1933947fax.156.2010.09.24.00.33.02;
        Fri, 24 Sep 2010 00:33:02 -0700 (PDT)
Received-SPF: neutral (google.com: 209.85.161.53 is neither permitted nor denied by best guess record for domain of {my_initials}+caf_={my_name}=gmail.com@{oneofmydomains.com}) client-ip=209.85.161.53;
Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.161.53 is neither permitted nor denied by best guess record for domain of {my_initials}+caf_={my_name}=gmail.com@{oneofmydomains.com}) smtp.mail={my_initials}+caf_={my_name}=gmail.com@{oneofmydomains.com}
Received: by mail-fx0-f53.google.com with SMTP id 14so1830412fxm.12
        for <{my_name}@gmail.com>; Fri, 24 Sep 2010 00:33:02 -0700 (PDT)
Received: by 10.223.104.71 with SMTP id n7mr3115235fao.27.1285313582681;
        Fri, 24 Sep 2010 00:33:02 -0700 (PDT)
X-Forwarded-To: {my_name}@gmail.com
X-Forwarded-For: {my_initials}@{oneofmydomains.com} {my_name}@gmail.com
Delivered-To: archellian001@{oneofmydomains.com}
Received: by 10.223.108.197 with SMTP id g5cs3379fap;
        Fri, 24 Sep 2010 00:33:02 -0700 (PDT)
Received: by 10.101.69.6 with SMTP id w6mr3307377ank.207.1285313582003;
        Fri, 24 Sep 2010 00:33:02 -0700 (PDT)
Return-Path: <brushwoodzd279@rotulosjethro.com>
Received: from ARDBVPNZJS ([117.196.230.243])
        by mx.google.com with ESMTP id c4si4326905anc.186.2010.09.24.00.32.03;
        Fri, 24 Sep 2010 00:33:01 -0700 (PDT)
Received-SPF: neutral (google.com: 117.196.230.243 is neither permitted nor denied by best guess record for domain of brushwoodzd279@rotulosjethro.com) client-ip=117.196.230.243;
Received: from 5802.rotulosjethro.com ([207.171.164.40])
	by rotulosjethro.com with esmtp (Exim 4.69)
	id C5B7C3-A452D9-9E
	for ashleybentley@sammyk.com; Fri, 24 Sep 2010 13:01:19 +0530
Date: Fri, 24 Sep 2010 13:01:19 +0530
From: "Barbra Ladner" <brushwoodzd279@rotulosjethro.com>
To: ashleybentley@sammyk.com
Message-ID: <74583179.15516372984772561261.JavaMail.abhi114b879f20@rotulosjethro.com>
Subject: hello
MIME-Version: 1.0
Content-Type: multipart/mixed;
	boundary="----=_Part_023295_191642150.1971937775771"

------=_Part_023295_191642150.1971937775771
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

Please find attached my CV for your attention.

------=_Part_023295_191642150.1971937775771
Content-Type: text/html; name="78238doc.html"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="78238doc.html"

(Base64 encoded data here)

------=_Part_023295_191642150.1971937775771--
</pre>
<p>First of all, I forward all of the mail to any address at one of my domains to my personal gmail address.  That means that legitimate email addresses and random strings both end up headed to my gmail account.  (I then employ a whitelist filter in Gmail).  But to avoid having the email addresses scooped up by spiders, I edited them in the header with tags like {my_name}, {my_initials} and {oneofmydomains.com}.</p>
<p>The email address it was sent to was:  archellian001@{oneofmydomains.com} &#8212; and the <strong>archellian001</strong> is called the &#8220;local-part&#8221; in <a href="http://en.wikipedia.org/wiki/Email_address">email lingo</a>.  In this case, the local-part is clearly just a random string (name?) and some numbers.  Nothing on that domain would suggest <strong>archellian</strong> would be a good name to choose.</p>
<p>The return path and sender are both listed as: brushwoodzd279@rotulosjethro.com &#8212; likely a forgery.</p>
<p>Starting at the beginning of the email&#8217;s life, we see:</p>
<pre>
Received: from 5802.rotulosjethro.com ([207.171.164.40])
	by rotulosjethro.com with esmtp (Exim 4.69)
	id C5B7C3-A452D9-9E
	for ashleybentley@sammyk.com; Fri, 24 Sep 2010 13:01:19 +0530
</pre>
<p>Now 207.171.164.40 traces back to <strong>mm-notify-out-1102.amazon.com</strong> and this was verified with a DNS lookup for <strong>mm-notify-out-1102.amazon.com</strong> and it indeed returned 207.171.164.40.  I also tried a DNS lookup for <strong>5802.rotulosjethro.com</strong> which failed and <strong>rotulosjethro.com</strong> which returned an ISP in Spain.  So this adds credibility to the idea that this is whole hop is a forgery but we&#8217;ll know better soon.</p>
<p>The next hop reports,</p>
<pre>
Received: from ARDBVPNZJS ([117.196.230.243])
        by mx.google.com with ESMTP id c4si4326905anc.186.2010.09.24.00.32.03;
        Fri, 24 Sep 2010 00:33:01 -0700 (PDT)
</pre>
<p>We can be relatively certain this is not a forgery.  The reason is that the recipient reports themselves as <strong>mx.google.com</strong> and recall that the email was sent to <strong>{oneofmydomains.com}</strong>.</p>
<p>So far, the reported path was:</p>
<pre>
5802.rotulosjethro.com ([207.171.164.40])   ->   rotulosjethro.com
ARDBVPNZJS ([117.196.230.243])   ->   mx.google.com
</pre>
<p>So either:</p>
<ol>
<li>The Amazon IP address (207.171.164.40) actually did send the email to ARDBVPNZJS (117.196.230.243) (perhaps an <a href="http://aws.amazon.com/">Amazon Web Hosting</a> client) and the DNS settings and mail records of rotulosjethro.com has changed since.</li>
<li>117.196.230.243 is the originating sender who forged the first receipt header.</li>
</ol>
<p>
Most likely its the second case.  A test to see if 117.196.230.243 was up showed that it did not respond to ping or attempts to open a connection on port 22 (SSH) or 25 (SMTP) &#8212; this seems unlikely for a legitimate mail server.  <a href="http://cqcounter.com/whois/?query=117.196.230.243">Further tests show</a> that the IP is registered to <a href="http://www.bsnl.co.in/service/internet.htm">BSNL</a>, an Indian ISP.</p>
<p>Also note where gmail checked the <a href="http://en.wikipedia.org/wiki/Sender_Policy_Framework">SPF record</a> of rotulosjethro.com:</p>
<pre>
Received-SPF: neutral (google.com: 117.196.230.243 is neither permitted nor denied by best guess record for domain of brushwoodzd279@rotulosjethro.com) client-ip=117.196.230.243;
</pre>
<p>This exposes one of weaknesses of SPF.  Although SPF can help prevent others from impersonating you or your domain, it does little to prevent spam.  This is because all a spammer needs to do is find a domain that doesn&#8217;t have an SPF whitelist defined, such that SPF checks return neutral, and use that domain name to send out an unlimited number of emails.  As long as one domain is yet to implement an SPF whitelist, SPF will not be effective against this sort of forgery spam.</p>
<p>I don&#8217;t see much else interesting in the header, it bounces around internal private Gmail networks and is ultimately delivered.</p>
<p>So then I decided to have a look into what the attachment contained&#8230;.</p>
<p><a href="http://blog.edwards-research.com/2010/09/spam-forensics-ii/">Continue to Spam Forensics II</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.edwards-research.com/2010/09/spam-forensics-i/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ping fails but dig / nslookup&#160;works?</title>
		<link>http://blog.edwards-research.com/2010/01/ping-fails-but-dig-nslookup-works/</link>
		<comments>http://blog.edwards-research.com/2010/01/ping-fails-but-dig-nslookup-works/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 20:27:11 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[shell scripting]]></category>
		<category><![CDATA[dig]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[nslookup]]></category>
		<category><![CDATA[ping]]></category>
		<category><![CDATA[resolv.conf]]></category>

		<guid isPermaLink="false">http://blog.edwards-research.com/?p=334</guid>
		<description><![CDATA[I&#8217;ve now run into two scenarios where this happened. The most recent was after I had to kill a vpnc process (used to connect to a cisco VPN). It looks like this: [james@workstation ~]$ ping google.com ping: unknown host google.com [james@workstation ~]$ dig google.com +short 72.14.204.147 72.14.204.99 72.14.204.103 72.14.204.104 What ended up happening was that [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve now run into two scenarios where this happened.  The most recent was after I had to kill a vpnc process (used to connect to a cisco VPN).</p>
<p>It looks like this:</p>
<pre class="brush: plain; title: ;">
[james@workstation ~]$  ping google.com
ping: unknown host google.com

[james@workstation ~]$  dig google.com +short
72.14.204.147
72.14.204.99
72.14.204.103
72.14.204.104
</pre>
<p>What ended up happening was that the VPN was configured to tunnel <strong>all</strong> traffic through it, so when it re-wrote the /etc/resolv.conf file, it didn&#8217;t append the VPN nameservers to the nameservers provided to us by our DHCP lease, but completely overwrote them.  I&#8217;m assuming that when you closed the VPN it would replace the resolv.conf file with the one containing the non-VPN nameservers but since I killed it, it was not restored.</p>
<p>Anyway, the fix was easy but finding it out was annoying.</p>
<p>All you have to do is release and renew your DHCP lease.</p>
<p>You could try:</p>
<pre class="brush: bash; title: ;">dhclient -r; dhclient</pre>
<p>&#8230; but I was on an SSH connection and I didn&#8217;t quite trust the second command to be run after I lost the connection when the lease was released (this seems like a silly fear but whatever).</p>
<p>Instead I wrote a bash script and put it in a file:</p>
<pre class="brush: bash; title: ;">
#!/bin/bash
#refreshlease.sh
IFACE=&quot;eth0&quot;

dhclient -r ${IFACE}
dhclient ${IFACE}
</pre>
<p>&#8230; and ran that over the SSH connection.  The connection seemed to get dropped for a few seconds but then came back up.  Checking /etc/resolv.conf showed that my original nameservers were, in fact, back and I was able to resolve DNS queries:</p>
<pre class="brush: plain; title: ;">
[james@workstation ~]$  ping google.com
PING google.com (64.233.169.105) 56(84) bytes of data.
64 bytes from yo-in-f105.1e100.net (64.233.169.105): icmp_seq=1 ttl=238 time=31.1 ms
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.edwards-research.com/2010/01/ping-fails-but-dig-nslookup-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gigabit LAN&#160;Upgrade</title>
		<link>http://blog.edwards-research.com/2009/11/gigabit-lan-upgrade/</link>
		<comments>http://blog.edwards-research.com/2009/11/gigabit-lan-upgrade/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 22:40:08 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://blog.edwards-research.com/?p=261</guid>
		<description><![CDATA[Not much time to post, so I&#8217;ll post the quick bandwidth test we did between two machines before and after the LAN upgrade: Some notes: For a bandwidth tester we used iperf, a linux script that has been ported to windows via a cygwyn build. For Linux we just ran &#8220;yum install iperf&#8221; For Windows [...]]]></description>
			<content:encoded><![CDATA[<p>Not much time to post, so I&#8217;ll post the quick bandwidth test we did between two machines before and after the LAN upgrade:</p>
<p><a href="http://blog.edwards-research.com/wp-content/uploads/2009/11/Gigabit-Performance-Table-Fixed.PNG" rel="lightbox[261]"><img class="alignnone size-full wp-image-266" title="Gigabit-Performance-Table-Fixed" src="http://blog.edwards-research.com/wp-content/uploads/2009/11/Gigabit-Performance-Table-Fixed.PNG" alt="Gigabit-Performance-Table-Fixed" width="574" height="602" /></a></p>
<p><strong>Some notes:</strong></p>
<ul>
<li>For a bandwidth tester we used iperf, a linux script that has been ported to windows via a cygwyn build.
<ul>
<li>For Linux we just ran &#8220;yum install iperf&#8221;</li>
<li>For Windows we googled &#8220;iperf windows&#8221;, but <a href="http://www.noc.ucf.edu/Tools/Iperf/" target="_blank">here is one binary</a> from UCF.</li>
</ul>
</li>
<li>The real path just explains the connection between the two units.</li>
<li>The window size was automatically determined by iperf.</li>
<li>The 10 second test duration is iperf&#8217;s default.</li>
</ul>
<p>And the same data graphically:</p>
<p><a href="http://blog.edwards-research.com/wp-content/uploads/2009/11/Gigabit-Performance-Chart.PNG" rel="lightbox[261]"><img class="alignnone size-full wp-image-262" title="Gigabit-Performance-Chart" src="http://blog.edwards-research.com/wp-content/uploads/2009/11/Gigabit-Performance-Chart.PNG" alt="Gigabit-Performance-Chart" width="667" height="443" /></a></p>
<p>As you can see, there is considerable bandwidth improvement, even for the integrated NIC (and the PCI NIC is more than twice as fast as that!)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.edwards-research.com/2009/11/gigabit-lan-upgrade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To: Speed up X Tunneling over&#160;SSH</title>
		<link>http://blog.edwards-research.com/2009/11/how-to-speed-up-x-tunneling-over-ssh/</link>
		<comments>http://blog.edwards-research.com/2009/11/how-to-speed-up-x-tunneling-over-ssh/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 07:52:26 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[networking]]></category>
		<category><![CDATA[tips and tricks]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[putty]]></category>

		<guid isPermaLink="false">http://blog.edwards-research.com/?p=252</guid>
		<description><![CDATA[I use PuTTY (actually, I use PuTTY tray) and XWin Server to run Linux GUI applications in Windows.  Basically, I have a headless Linux server running and I connect to it via SSH.  While 90% of the things I do on it are command-line based, I&#8217;ve yet to find a real good strategy for developing [...]]]></description>
			<content:encoded><![CDATA[<p>I use <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</a> (actually, I use <a href="http://haanstra.eu/putty/">PuTTY tray</a>) and <a href="http://x.cygwin.com/devel/server/">XWin Server</a> to run Linux GUI applications in Windows.  Basically, I have a headless Linux server running and I connect to it via SSH.  While 90% of the things I do on it are command-line based, I&#8217;ve yet to find a real good strategy for developing <em><strong>true</strong></em> linux C/C++ applications from a Windows machine, so I end up running Eclipse on the headless box with the windows tunneled to my Windows system.  (I say true because I know I could use something like MinGW or Cygwin and get 99% of the functionality, but I&#8217;m picky about that last 1%).  Also, I know there is a really interesting project underway in the Eclipse community to get CDT to build and debug remotely (<a href="http://wiki.eclipse.org/PTP/planning/remote">Remote Development Tools</a>), but I ran into all kinds of problems getting it to work and it really wasn&#8217;t worth the time I was spending on it.  Further, X tunneling over SSH worked great.</p>
<p>I wasn&#8217;t satisfied though.</p>
<p>My LAN&#8217;s throughput chokepoint was my router, limiting connections to 100Mbps so I went ahead and ordered a Gigabit switch and upgraded my cabling (it was pretty shoddy) and one of my NICs.  Before they come in though, I decided to explore some ways to improve tunneling without hardware changes.</p>
<p>The first thing I looked into was changing SSH cipers.</p>
<p>You can look at the available ciphers in PuTTY by going into the configuration window, and under Connection, clicking SSH.  You should see something like this:</p>
<p><a href="http://blog.edwards-research.com/wp-content/uploads/2009/11/SSH-Cipher-Putty-SSH.PNG" rel="lightbox[252]"><img class="alignnone size-full wp-image-253" title="SSH-Cipher-Putty-SSH" src="http://blog.edwards-research.com/wp-content/uploads/2009/11/SSH-Cipher-Putty-SSH.PNG" alt="SSH-Cipher-Putty-SSH" width="470" height="453" /></a></p>
<p>You can change the the order that these ciphers are considered simply by clicking Up or Down and rearranging them.  I like to put the one I want at the top, then immediately following it with the &#8220;&#8211;warn below here&#8211;&#8221; tag, so I know definitively whether I&#8217;m getting my #1 choice.</p>
<p><strong>But how do I know which ciper to choose? </strong></p>
<p>Thats a good question, and I didn&#8217;t know either.  I did some extremely quick <a href="http://www.google.com/search?hl=en&amp;q=fastest+ssh+cipher+putty">googling</a> and I didn&#8217;t get a very definitive answer in the 2 or 3 pages I landed on, but I did find a nice command to run a benchmark on your local system so you can find out for yourself.  The command was:</p>
<pre class="brush: plain; title: ;">openssl speed -engine padlock -evp *ciper* </pre>
<p>Where *ciper* is replaced by the name of the cipher you wish to test.  Executing this command starts an OpenSSL script which runs through the algorithm on locally on your computer, measuring the number of computations it can perform per second.</p>
<p>I extended this command with a simple tweak that allowed me to loop through the script using mulitple different ciphers:</p>
<pre class="brush: plain; title: ;">for ENC in aes-256-cbc bf bf-ecb rc4 rc4-40 bf-cfb bf-ofb des3 des ; do openssl speed -engine padlock -evp ${ENC} ; done</pre>
<p>After executing this, I walked away for a little (probably takes less than 5 mintutes but I didn&#8217;t want to introduce any more variability by messing around during the benchmark) and when I cameback it has maybe 150 lines of output, about 15 for each ciper.</p>
<p>Being the quantitative dude that I am, I immediately threw the data into Excel and plotted the processing throughput (in KBps and given on the last line of each iteration) vs block size (given on the second to last line).</p>
<p>The results were really surprising.  Here&#8217;s the table I compiled:</p>
<p><a href="http://blog.edwards-research.com/wp-content/uploads/2009/11/SSH-Cipher-Table.png" rel="lightbox[252]"><img class="alignnone size-full wp-image-254" title="SSH-Cipher-Table" src="http://blog.edwards-research.com/wp-content/uploads/2009/11/SSH-Cipher-Table.png" alt="SSH-Cipher-Table" width="448" height="261" /></a></p>
<p>Where the highlighted cells indicate maximum throughput for each column or blocksize.  Its pretty apparent from this that RC4 really flys, but the table above doesn&#8217;t do the improvement justice.  Lets look at the data plotted:</p>
<p><strong>Note</strong>: The label on the vertical axis incorrectly states the units as <strong>KBps </strong>when they are, in fact, <strong>MBps</strong>.</p>
<div id="attachment_255" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.edwards-research.com/wp-content/uploads/2009/11/SSH-Cipher-Graph.PNG" rel="lightbox[252]"><img class="size-medium wp-image-255" title="SSH-Cipher-Graph" src="http://blog.edwards-research.com/wp-content/uploads/2009/11/SSH-Cipher-Graph-300x197.PNG" alt="(click for full-size)" width="300" height="197" /></a><p class="wp-caption-text">(click for full-size)</p></div>
<p>Wow, that is really a tremendous difference between the two RC4 ciphers and the rest, more often than not doubling the throughput of their alternatives.</p>
<p>So with such a huge difference in performance, certainly the RC4 cipher is the default cipher in PuTTY, right?  Actually, no.  At least in my vanilla PuTTY installations, RC4 (AKA Arcfour in PuTTY) is fairly low on the list, only preferred over DES.</p>
<p>I&#8217;m not a cryptographer, and I&#8217;m not well versed on the differences between the ciphers certainly not well enough to give any informed opinion on which cipher to choose from a security point of view, but from a sheer speed point of view, it would seem that RC4 would preferred.</p>
<p>Now our network is secured from the WAN side by a firewall on our router which we are trusting to prevent unauthorized access to the LAN side, so for us, encrypting SSH sessions that strictly live on the LAN side with a possibly sub-par cipher was acceptable if it provided the latency improvement that it looked like it would.  Your circumstances may differ and I urge you to consider all of them before you go changing settings.</p>
<p>Given that you&#8217;ve considered them, and you&#8217;re comfortable, lets go ahead and change the ciper priorities and see if we get any improvement.</p>
<p>Simply by clicking the cipher we want to move, then the Up / Down buttons, we were able to configure our priorities to this:</p>
<p><a href="http://blog.edwards-research.com/wp-content/uploads/2009/11/SSH-Cipher-Putty-SSH-Modified.PNG" rel="lightbox[252]"><img class="alignnone size-full wp-image-256" title="SSH-Cipher-Putty-SSH-Modified" src="http://blog.edwards-research.com/wp-content/uploads/2009/11/SSH-Cipher-Putty-SSH-Modified.PNG" alt="SSH-Cipher-Putty-SSH-Modified" width="467" height="453" /></a></p>
<p>The idea here being that if, for some reason, we can&#8217;t establish a link with RC4, we&#8217;ll be notified.  We could then go back into the settings and move the &#8220;&#8211;warn below here&#8211;&#8221; line down a line and try again, hoping to connect with the Blowfish ciper, the second quickest cipher or otherwise receive a warning.</p>
<p><strong>Results</strong></p>
<p>Unfortunately, I don&#8217;t have any quantitative data to show the latency improvement, although I suppose you could demonstrate a bandwidth / throughput increase by doing a file transfer, however it is abundantly clear that there was, in fact, a huge latency improvement.  Things that caused annoying lag (eg clicking on the scrollbar to scroll quickly) showed a noticeable improvement.</p>
<p>As it is, without real data to show the improvement, you are left to experiment with the settings yourself, and, given you feel comfortable, I strongly encourage doing so &#8212; as it really seems to make a difference.</p>
<p>I&#8217;ll be sure to check back here when we receive the Gigabit hardware and present a before and after look at our LAN transfer speeds.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.edwards-research.com/2009/11/how-to-speed-up-x-tunneling-over-ssh/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LAN DNS Resolution with WRT54G DD-WRT&#8217;s DNSMasq (Linux and Windows&#160;7)</title>
		<link>http://blog.edwards-research.com/2009/09/lan-dns-resolution-with-wrt54g-dd-wrts-dsnmasq-linux-and-windows-7/</link>
		<comments>http://blog.edwards-research.com/2009/09/lan-dns-resolution-with-wrt54g-dd-wrts-dsnmasq-linux-and-windows-7/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 07:18:50 +0000</pubDate>
		<dc:creator>Jim</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[tips and tricks]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[dns]]></category>

		<guid isPermaLink="false">http://blog.edwards-research.com/?p=119</guid>
		<description><![CDATA[I have a ton of computers. I have a quad-core AMD box (running Fedora 11), an AMD Phenom II X4 955 Black Edition box (running Windows 7), a few random head-less desktops, a laptop (F11) and a netbook (F11). I run a fileserver on one box, I run an X session through ssh on my [...]]]></description>
			<content:encoded><![CDATA[<p>I have a ton of computers.</p>
<p>I have a quad-core AMD box (running Fedora 11), an AMD Phenom II X4 955 Black Edition box (running Windows 7), a few random head-less desktops, a laptop (F11) and a netbook (F11).</p>
<p>I run a fileserver on one box, I run an X session through ssh on my Windows box to access linux GUI stuff, I frequently transfer files between computers and I wanted to be able to access them by my defined hostname rather than the dynamic IP address my router assigned them (WRT54G running DD-WRT v24 SP1).</p>
<p>Now you may say, &#8220;dude, just give them static IP&#8217;s and be done with it.&#8221;  I considered that, but I would much rather remember &#8220;tophat&#8221; and &#8220;fractal&#8221; than 192.168.1.5 and 192.168.12.  Plus I&#8217;m a nerd and if there&#8217;s a way, I&#8217;ll figure it out.</p>
<p>&#8230; so I figured it out.</p>
<p>Windows will automatically report the Hostname of the computer (I think Windows calls it the Computer Name), so you won&#8217;t have to configure that.  You will however, have to allow your router to cache the hostnames and resolve them to IPs, and you will need to configure Linux to report the hostname when a DHCP lease is acquired.</p>
<p><strong>Configure Router</strong></p>
<ol>
<li>Login to your router</li>
<li>Click on the &#8220;Services&#8221; tab</li>
<li>Under DNSMasq enable both options (&#8220;Enable DNSMasq&#8221; and &#8220;Enable Local DNS&#8221;)</li>
<li>Click &#8220;Apply Settings&#8221;</li>
</ol>
<p><strong>Configure Linux to Report Hostnames</strong></p>
<ol>
<li>Disclaimer: This is using Fedora 11 &#8211; other distros/versions may vary.</li>
<li>You should really pick a unique hostname per interface, so in the case that they&#8217;re both connected there isn&#8217;t a conflict.</li>
<li>As root, or with appropriate permissions, edit /etc/sysconfig/network-scripts/ifcfg-{interface} (ie /etc/sysconfig/network-scripts/ifcfg-eth0).</li>
<li>Add this line:</li>
</ol>
<pre>DHCP_HOSTNAME=fractal</pre>
<ol>
<li>Save the file</li>
<li>Restart the network service (sudo service restart network, or use the GUI)</li>
<li>Release your DHCP lease (sudo dhclient -r)</li>
<li>Renew your DHCP lease (sudo dhclient or ifconfig {interface} down; ifconfig {interface} up)</li>
</ol>
<p><strong>Configure Windows 7 to resolve hostnames</strong> (<a href="http://stackoverflow.com/questions/330395/dns-problem-nslookup-works-ping-doesnt" target="_blank">source</a>)</p>
<ol>
<li>Go into Network Connections (I just typed &#8220;Network Connections&#8221; om the start icon -&gt; run box)</li>
<li>Right click on your Network Adapter and go into Properties</li>
<li>Select &#8220;Internet Protocol Version 4 (TCP/IPv4)&#8221;</li>
<li>Under the General Tab click Advanced</li>
<li>Under the DNS Tab select the radio button that says &#8220;Append these DNS suffixes (in order)&#8221;</li>
<li>Click &#8220;Add&#8230;&#8221;</li>
<li>Enter a single period in the text box and click &#8220;Add.&#8221;</li>
<li>Click OK in the &#8220;Advanced TCP/IP Settings&#8221; Dialog</li>
<li>Click OK in the &#8220;Local Area Connection Properties&#8221; Dialog</li>
</ol>
<p>And there you go.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.edwards-research.com/2009/09/lan-dns-resolution-with-wrt54g-dd-wrts-dsnmasq-linux-and-windows-7/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

