<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>From the Mind of Mark Farver</title>
    <link rel="alternate" type="text/html" href="http://mindbent.org/" />
    <link rel="self" type="application/atom+xml" href="http://mindbent.org/atom.xml" />
    <id>tag:mindbent.org,2009-03-16://1</id>
    <updated>2012-04-16T14:12:30Z</updated>
    
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.24-en</generator>

<entry>
    <title>Juniper JunOS USB partition table rescan</title>
    <link rel="alternate" type="text/html" href="http://mindbent.org/2012/04/juniper-junos-usb-partition-table-rescan.html" />
    <id>tag:mindbent.org,2012://1.41</id>

    <published>2012-04-16T14:03:24Z</published>
    <updated>2012-04-16T14:12:30Z</updated>

    <summary><![CDATA[As an update to my upgrading Juniper EX switches from USB. &nbsp;Upgrading from a USB thumb drive works well, but if you don't have one handy you might try to use another "dual use" mass storage device like a phone...]]></summary>
    <author>
        <name>Mark Farver</name>
        
    </author>
    
        <category term="Systems" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="DC Operations" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="junosjuniperexusb" label="JunOS Juniper EX USB" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://mindbent.org/">
        <![CDATA[As an update to my upgrading Juniper EX switches from USB. &nbsp;Upgrading from a USB thumb drive works well, but if you don't have one handy you might try to use another "dual use" mass storage device like a phone or Kindle. &nbsp;Problem is the delay while that device initializes causes JunOS to fail to read the partition table. &nbsp;You will have a /dev/da1 entry, but no /dev/da1s1:<div><br /><pre>umass1: Amazon Amazon Kindle, rev 2.00/1.00, addr 3
da1 at umass-sim1 bus 1 target 0 lun 0
da1: <kindle internal="" storage="" 0100=""> Removable Direct Access SCSI-2 device
da1: 40.000MB/s transfers
da1: Attempt to query device size failed: NOT READY, Medium not present
(da1:umass-sim1:1:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
(da1:umass-sim1:1:0:0): CAM Status: SCSI Status Error
(da1:umass-sim1:1:0:0): SCSI Status: Check Condition
(da1:umass-sim1:1:0:0): UNIT ATTENTION asc:28,0
(da1:umass-sim1:1:0:0): Not ready to ready change, medium may have changed
(da1:umass-sim1:1:0:0): Retrying Command (per Sense Data)
</kindle></pre>The workaround seems to be to issue a "camcontrol rescan da1" to rescan the parition table.</div><div><br /></div><div>This issue only shows up on some versions of Junos, and the camcontrol command is also only available on some versions of Junos.&nbsp;</div>]]>
        
    </content>
</entry>

<entry>
    <title>Disabling ip_conntrack to save memory, restore happiness</title>
    <link rel="alternate" type="text/html" href="http://mindbent.org/2012/01/disabling-ip-conntrack-to-save-memory-restore-happiness.html" />
    <id>tag:mindbent.org,2012://1.40</id>

    <published>2012-01-04T23:00:43Z</published>
    <updated>2012-01-04T23:12:38Z</updated>

    <summary><![CDATA[I found a new trick in iptables I wasn't aware of.&nbsp; Turns out iptables tracks all connections, even ones that are not going to be NAT'd.&nbsp; On a busy webserver or router this means iptables is wasting resources tracking connections...]]></summary>
    <author>
        <name>Mark Farver</name>
        
    </author>
    
        <category term="Systems" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="ip_conntrackrawiptables" label="ip_conntrack raw iptables" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://mindbent.org/">
        <![CDATA[I found a new trick in iptables I wasn't aware of.&nbsp; Turns out iptables tracks all connections, even ones that are not going to be NAT'd.&nbsp; On a busy webserver or router this means iptables is wasting resources tracking connections when it should be just routing.<br /><br />The raw table in iptables can be used to set a NOTRACK flag on a packet, and that packet will not traverse the ip_conntrack stuff.<br /><br />So for a busy webserver, you could disable tracking for web connection states:<pre>iptables -t raw -A PREROUTING -d &lt;server IP&gt; -p tcp --dport 80 -j NOTRACK
iptables -t raw -A PREROUTING -s &lt;server IP&gt; -p tcp --sport 80 -j NOTRACK</pre>
<br />Or on a machine that is routing between several internal networks and also NATing external connections you could disable tracking for the internal to internal stuff.<pre>iptables -t raw -A PREROUTING -s 172.16.0.0/16 -d 172.16.0.0/16 -j NOTRACK</pre>
<br />On one of our core Linux routers the number of ip_conntrack entries dropped from an average of 65-70k down to about 2k.&nbsp; <br /><br /> ]]>
        
    </content>
</entry>

<entry>
    <title>Upgrading Juniper EX series switches from USB.</title>
    <link rel="alternate" type="text/html" href="http://mindbent.org/2011/12/upgrading-juniper-ex-series-switches-from-usb.html" />
    <id>tag:mindbent.org,2011://1.39</id>

    <published>2011-12-06T18:35:13Z</published>
    <updated>2011-12-06T18:42:54Z</updated>

    <summary><![CDATA[This is for my notes. Generally I use this to upgrade the firmware of an EX4200 switch to the same JunOS version as the rest of a virtual chassis, BEFORE connecting the VC cables.&nbsp; I'm doing this from memory, so...]]></summary>
    <author>
        <name>Mark Farver</name>
        
    </author>
    
        <category term="Systems" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-US" xml:base="http://mindbent.org/">
        <![CDATA[<p>This is for my notes.  Generally I use this to upgrade the firmware of an EX4200 switch to the same JunOS version as the rest of a virtual chassis, BEFORE connecting the VC cables.&nbsp; I'm doing this from memory, so if there are any mistakes let me know.<br /></p>

<p>You will need to have access to a shell.  The "root" user logs into shell automatically, other users should run "start shell"</p>

<p>From the shell run these commands:</p>

<pre> # mkdir /mnt/usb</pre>

<p>Insert the USB stick (FAT32 formatted) into the port at the back of the switch.  It should have the firmware on it, generally in a file named something like "jinstall-ex-10.3R3.4-domestic-signed.tgz"</p>

<pre> # mount -t msdosfs /dev/da1s1 /mnt/usb"</pre>

<p>Note that tab completion works on Junos, to save some typing just enter the frist few characters of the filename and hit "tab"</p>

<pre> # cp /mnt/usb/jinstall-ex-10.3R3.4-domestic-signed.tgz /var/tmp </pre>
<p>If the switch is running firmware older than 10.3 you should upgrade the loader too:</p>
<pre> # cp /mnt/usb/jloader-ex-3242-11.3I20110326_0802_hmerge-signed.tgz /var/tmp</pre>

<pre> # umount /mnt/usb</pre>

<pre> # cli</pre>

At the "&gt;" cli prompt:
If the firmware on the switch is older than 10.3 you will need to install the updated jloader
<pre> &gt; request system software add /var/tmp/jloader-ex-3242-11.3I20110326_0802_hmerge-signed.tgz</pre>
then:
<pre> &gt; request system software add /var/tmp/jinstall-ex-10.3R3.4-domestic-signed.tgz reboot</pre>
]]>
        
    </content>
</entry>

<entry>
    <title>Dual IP stack for twice the love</title>
    <link rel="alternate" type="text/html" href="http://mindbent.org/2011/07/dual-ip-stack-for-twice-the-love.html" />
    <id>tag:mindbent.org,2011://1.36</id>

    <published>2011-07-24T15:59:12Z</published>
    <updated>2011-07-24T16:14:12Z</updated>

    <summary>Several weeks too late for world IPV6 day: My first directly connected dual stack router (no tunnel). In this case a Juniper MX-80 connected to TW Telecom. mfarver@RTR2&gt; ping 2001:470:1f0e:d23::1 16 bytes from 2001:470:1f0e:d23::1, icmp_seq=0 hlim=62 time=46.032 ms 16 bytes...</summary>
    <author>
        <name>Mark Farver</name>
        
    </author>
    
        <category term="Systems" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-US" xml:base="http://mindbent.org/">
        <![CDATA[Several weeks too late for world IPV6 day: My first directly connected dual stack router (no tunnel). In this case a Juniper MX-80 connected to TW Telecom.<br />
<pre>
mfarver@RTR2> ping 2001:470:1f0e:d23::1
16 bytes from 2001:470:1f0e:d23::1, icmp_seq=0 hlim=62 time=46.032 ms
16 bytes from 2001:470:1f0e:d23::1, icmp_seq=1 hlim=62 time=45.363 ms
16 bytes from 2001:470:1f0e:d23::1, icmp_seq=2 hlim=62 time=44.284 ms
</pre>
 ]]>
        
    </content>
</entry>

<entry>
    <title>LLDP: Your guide to the land of lost servers</title>
    <link rel="alternate" type="text/html" href="http://mindbent.org/2011/07/lldp-your-guide-to-the-land-of-lost-servers.html" />
    <id>tag:mindbent.org,2011://1.38</id>

    <published>2011-07-22T01:29:19Z</published>
    <updated>2011-08-01T07:27:02Z</updated>

    <summary>We often use LLDP (Link Layer Discovery Protocol) to find out which switches are uplinked to other switches. Each switch sends identification packets to the opposing switch identifying its name and the power number it is broadcasting from. Juniper EX...</summary>
    <author>
        <name>Mark Farver</name>
        
    </author>
    
        <category term="DC Operations" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="lldpcabling" label="LLDP cabling" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://mindbent.org/">
        <![CDATA[<p>We often use LLDP (Link Layer Discovery Protocol) to find out which switches are uplinked to other switches. Each switch sends identification packets to the opposing switch identifying its name and the power number it is broadcasting from.</p>

<h2>Juniper EX Example</h2>

<pre><code>user@core1&gt; show lldp neighbors    
Local Interface    Parent Interface    Chassis Id          Port info     System Name
ge-2/0/7.0         -                   00:26:f2:50:85:c0   47           data_sw1 
ge-2/0/14.0        ae15.0              00:26:f5:b1:3d:40   1            data_sw2 
ge-2/0/2.0         ae9.0               b4:39:d7:89:48:40   1            pub_sw1
ge-1/0/12.0        ae31.0              b4:39:d3:1a:2c:c0   1            pub_sw2 
ge-2/0/12.0        ae31.0              b4:39:d2:1a:2c:c0   2            pub_sw2
</code></pre>

<p>Makes it a little simpler to audit the wire maps.  I wondered if it would be possible to have servers broadcast as well.  </p>

<p>Turns out they can.  RHEL6 ships with lldpd already ready to go.  Just install the package and start the daemon.  We are running CentOS 5 still, and I wasn&#8217;t able to find a recent package for that.  Eventually I found a <a href="http://centos.alt.ru/pub/repository/centos/5/SRPMS/lldpd-0.4.2-1.el5.src.rpm">src</a> RPM for lldpd 0.4.2 and just updated it.  You can find the updated version <a href="http://mindbent.org/downloads/lldpd-0.5.4-1.src.rpm">here</a>.  </p>

<h2>HP Procurve Example</h2>

<pre><code>SW2# show lldp info remote

 LLDP Remote Devices Information
  LocalPort | ChassisId                 PortId PortDescr SysName               
  --------- + ------------------------- ------ --------- ----------------------
  2         | 50 c5 8f b7 33 c0         36     vme.0     pub-sw1              
  19        | 78 2b cf 16 14 f0         78 ... eth2      cache-1.example.com
  20        | 78 2b cf 15 a0 2f         78 ... eth2      web-3.example.com
  21        | 78 2b cf 16 7c 24         78 ... eth2      web-2.example.com
  22        | 78 2b cf 15 bf 9e         78 ... eth2      web-1.example.com
</code></pre>

<p>You can query LLDP info manually as noted above, or you can get it via SNMP MIB: lldpRemoteSystemsData 1.0.8802.1.1.2.1.4.   Interestingly it looks like you might be able to get remote IP information this way.  The lldpd daemon also supports CDP for Cisco environments and a few other features that we don&#8217;t use.  Windows hosts can broadcast the same data using the <a href="http://www.hanewin.net/lldp-e.htm">haneWIN LLDP Agent</a>.  Adding LLDP support is a simple add to your Puppet or Chef recipes, and makes a handy backup to manual wiremaps that your network team will appreciate. </p>
]]>
        

    </content>
</entry>

<entry>
    <title>With rainbows, black is the most worrisome color</title>
    <link rel="alternate" type="text/html" href="http://mindbent.org/2011/06/with-rainbows-black-is-the-most-worrisome-color.html" />
    <id>tag:mindbent.org,2011://1.35</id>

    <published>2011-06-27T17:36:05Z</published>
    <updated>2011-06-27T17:43:37Z</updated>

    <summary><![CDATA[This has been at the back of my mind for years now.&nbsp; Every company I've worked with stored MD5 hashed credit card numbers in the DB so "search by CC number" works.&nbsp; As far as I know no one has...]]></summary>
    <author>
        <name>Mark Farver</name>
        
    </author>
    
        <category term="Systems" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="creditcardsecurity" label="credit card security" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://mindbent.org/">
        <![CDATA[This has been at the back of my mind for years now.&nbsp; Every company I've worked with stored MD5 hashed credit card numbers in the DB so "search by CC number" works.&nbsp; As far as I know no one has released a rainbow table of all of the common credit card number prefixes hashed, but its getting way too easy to do so.&nbsp; 33.1 billions hashes per second.... yikes.<br /><br /><a href="http://blog.zorinaq.com/?e=42">http://blog.zorinaq.com/?e=42</a><br /><br />Back of the envelope, this system could calculate hashes for all of the Mastercard or Visa prefixes in 20 days or so.. faster if it concentrates on the most common BIN numbers.&nbsp; Discover cards would take less than a week.<br /><br />So reconsider if you really need a "search by CC number" function.&nbsp; If you do switch to a more computationally expensive hash. &nbsp; Consider adding a site specific salt so an attacker needs to generate a unique set of tables for your site.<br /><br /> ]]>
        
    </content>
</entry>

<entry>
    <title>iftop: its tops...</title>
    <link rel="alternate" type="text/html" href="http://mindbent.org/2011/05/iftop-its-tops.html" />
    <id>tag:mindbent.org,2011://1.34</id>

    <published>2011-05-29T00:10:37Z</published>
    <updated>2011-05-29T00:13:53Z</updated>

    <summary>New tool I just found today and am kinda disappointed I never noticed before: iftop.. it works exactly how you would expect....</summary>
    <author>
        <name>Mark Farver</name>
        
    </author>
    
    
    <content type="html" xml:lang="en-US" xml:base="http://mindbent.org/">
        New tool I just found today and am kinda disappointed I never noticed before: iftop.. it works exactly how you would expect.
        
    </content>
</entry>

<entry>
    <title>We&apos;re watching you, little PDU</title>
    <link rel="alternate" type="text/html" href="http://mindbent.org/2011/05/were-watching-you-little-pdu.html" />
    <id>tag:mindbent.org,2011://1.33</id>

    <published>2011-05-14T18:22:26Z</published>
    <updated>2011-05-14T18:40:01Z</updated>

    <summary>SNMP OID values for APC8941 PDUs we found useful when setting up Zenoss and cacti monitoring.Total Volt Amps:.1.3.6.1.4.1.318.1.1.12.1.18.0Temperature (with optional AP9335T Temperature Sensor).1.3.6.1.4.1.318.1.1.26.10.2.2.1.8 in C .1.3.6.1.4.1.318.1.1.26.10.2.2.1.7 in FRelative Humidity (with optional AP9335TH Temp and Humidity Sensor):.1.3.6.1.4.1.318.1.1.26.10.2.2.1.10There are a bunch more...</summary>
    <author>
        <name>Mark Farver</name>
        
    </author>
    
        <category term="DC Operations" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="pdusnmp" label="PDU SNMP" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://mindbent.org/">
        <![CDATA[<p></p><div>SNMP OID values for APC8941 PDUs we found useful when setting up Zenoss and cacti monitoring.</div><div><br /></div><div>Total Volt Amps:</div><div>.1.3.6.1.4.1.318.1.1.12.1.18.0</div><div><br /></div><div>Temperature (with optional AP9335T Temperature Sensor)</div><meta http-equiv="content-type" content="text/html; charset=utf-8">.1.3.6.1.4.1.318.1.1.26.10.2.2.1.8 in C<p></p>
<div><meta http-equiv="content-type" content="text/html; charset=utf-8">.1.3.6.1.4.1.318.1.1.26.10.2.2.1.7 in F</div><div><br /></div><div>Relative Humidity (with optional AP9335TH Temp and Humidity Sensor):</div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>.1.3.6.1.4.1.318.1.1.26.10.2.2.1.10</div><div><br /></div><div>There are a bunch more things you can check, Temp status, breaker and power outlet status as well. &nbsp;Make sure you get the latest PowerNet MIB form APC.</div>]]>
        

    </content>
</entry>

<entry>
    <title>Earth, Wind, Water and a Fire Alarm</title>
    <link rel="alternate" type="text/html" href="http://mindbent.org/2011/04/earth-wind-water-and-a-fire-alarm.html" />
    <id>tag:mindbent.org,2011://1.32</id>

    <published>2011-04-29T05:58:10Z</published>
    <updated>2011-04-29T06:20:26Z</updated>

    <summary>Odd experience at our older colo facility:We were onsite in the cage when the building fire alarms sounded. I did what most reasonable persons would: figured it was a false alarm but put down tools and walked out the front...</summary>
    <author>
        <name>Mark Farver</name>
        
    </author>
    
        <category term="Systems" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="datacenteroperations" label="datacenter operations" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://mindbent.org/">
        <![CDATA[Odd experience at our older colo facility:<div><br /></div><div>We were onsite in the cage when the building fire alarms sounded. I did what most reasonable persons would: figured it was a false alarm but put down tools and walked out the front door.<div><br /></div><div>The datacenter's technical staff had a little trouble. &nbsp;They told us immediately that it was a test, and not to worry. &nbsp;But usually tests involve technicians from the alarm company and there was no service trunks outside. &nbsp;The techs continued to try to reach the facilities manager on the phone. &nbsp;A gentleman turned up claiming to be the building owner, and said the fire department was on the way. &nbsp;The fire department shows up, and the first question they ask is "What is this place?" &nbsp;When we explained it was a datacenter they asked for further clarification. &nbsp;In one of the most crowded datacenter corridors in the world, the fire department had no special training on dealing with datacenter fires, and didn't even know the buildings within their area. &nbsp;The fire department leaves after a few minutes. &nbsp;The alarm continues sounding for another 15 minutes before resetting on its own.</div><div><br /></div><div>We later find out the issues was a false detect from an under floor smoke detector. &nbsp;Seems that some additional training in reading the fire panel and when to evacuate the datacenter might be in order for the DC operator. &nbsp;I was also a little surprised the fire department didn't inspect under the floor, or even walk around.&nbsp;</div><div><br /></div><div><br /></div><div><br /></div><div><br /></div></div>]]>
        
    </content>
</entry>

<entry>
    <title>Giving the Finger to Biometrics</title>
    <link rel="alternate" type="text/html" href="http://mindbent.org/2011/01/giving-the-finger-to-biometrics.html" />
    <id>tag:mindbent.org,2011://1.31</id>

    <published>2011-01-30T00:06:59Z</published>
    <updated>2011-07-24T23:01:52Z</updated>

    <summary><![CDATA[I've been touring datacenters for my employer, trying to decide if any of the options in Austin are well suited to our needs. &nbsp;Until recently Austin has been overshadowed by far greater connectivity in Dallas. &nbsp;Austin has been popular for...]]></summary>
    <author>
        <name>Mark Farver</name>
        
    </author>
    
        <category term="Systems" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-US" xml:base="http://mindbent.org/">
        <![CDATA[I've been touring datacenters for my employer, trying to decide if any of the options in Austin are well suited to our needs. &nbsp;Until recently Austin has been overshadowed by far greater connectivity in Dallas. &nbsp;Austin has been popular for Disaster recovery purposes, having a very low incidence of disasters. &nbsp;(Minimal tornadoes, inland enough to avoid hurricanes and&nbsp;seismically stable geology.)&nbsp;&nbsp;Connectivity is improving, and the MetCenter project near the airport boasts 11 major providers in the campus. &nbsp;DataFoundry is building their huge Texas One facility just south of the MetCenter, with 100MW of design capacity. &nbsp;<div><br /></div><div>Most datacenters today boast biometric security as a major feature. &nbsp;Biometrics have quite a few issues, and have been defeated quite readily. &nbsp;Still, when combined with another authentication method they can effective. &nbsp;</div><div><br /></div><div>Both datacenters I toured featured Biometric authentication combined with proximity cards and listed such on their marketing&nbsp;brochures. &nbsp;I was disappointed to notice one of them only requiring biometric authentication for the customers. &nbsp;Employees, whose credentials generally allow them wider access to the facility, only needed to be in&nbsp;possession&nbsp;of their proxcard to access the data floor. &nbsp;The facilities manager argued that their security system, which displays the employees photo next to the relevant security camera image every time a door is opened, adequately compensated for the lack of two factor authentication. &nbsp;I'm not sure if this is the case, since both the security guard and the NOC engineers did not seem to be paying much attention to the feeds.</div><div><br /></div><div>The second facility, I was pleased to note, required two factor authentication of both employees and customers before entering the datacenter floor, and for access to other critical areas.</div><div><br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>Changing your mind every 3000 miles</title>
    <link rel="alternate" type="text/html" href="http://mindbent.org/2010/12/changing-your-mind-every-3000-miles.html" />
    <id>tag:mindbent.org,2010://1.30</id>

    <published>2010-12-20T01:58:02Z</published>
    <updated>2010-12-20T02:22:24Z</updated>

    <summary><![CDATA[I was trying to explain the Monty Hall problem to Alyssa the other night and failing miserably.Imagine that the set of Monty Hall's game show&nbsp;Let's Make a Deal&nbsp;has three closed doors. Behind one of these doors is a car; behind...]]></summary>
    <author>
        <name>Mark Farver</name>
        
    </author>
    
        <category term="Misc" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-US" xml:base="http://mindbent.org/">
        <![CDATA[I was trying to explain the Monty Hall problem to Alyssa the other night and failing miserably.<div><br /></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><p style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">Imagine that the set of Monty Hall's game show&nbsp;<i>Let's Make a Deal</i>&nbsp;has three closed doors. Behind one of these doors is a car; behind the other two are goats. The contestant does not know where the car is, but Monty Hall does.</p><p style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">The contestant picks a door and Monty opens one of the remaining doors, one he knows&nbsp;<i>doesn't</i>&nbsp;hide the car. If the contestant has already chosen the correct door, Monty is equally likely to open either of the two remaining doors.</p><p style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">After Monty has shown a goat behind the door that he opens, the contestant is always given the option to switch doors.&nbsp;<b>What is the probability of winning the car if she stays with her first choice? What if she decides to switch?</b></p></div></blockquote><p style="display: inline !important; "><font class="Apple-style-span" color="#000000" face="'Times New Roman'" size="3"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">The correct answer is the contestant should always change their mind, by doing so they increase the odds of winning from 1 in 3 to 2 in 3. &nbsp;This is pretty counterintuitive, and even experts get it wrong. &nbsp;But it makes more sense if you draw it out:</span></font></p><br /><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><p></p><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-weight: bold; "><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: arial, helvetica, hirakakupro-w3, osaka, 'ms pgothic', sans-serif; font-size: 13px; font-weight: normal; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; "><b><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; display: inline !important; "><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: monospace; font-size: 13px; white-space: pre; font-weight: normal; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; "><br /></span></div></b></span></div><p></p></div></blockquote><b><div style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: medium; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; display: inline !important; "><span class="Apple-style-span" style="color: rgb(51, 51, 51); font-family: monospace; font-size: 13px; white-space: pre; font-weight: normal; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; ">Keep your choice:</span></div></b><br />
<pre>C G G Initial Config
X     Your choice
  H   Host's Choice (he could choose either goat w/same results)
X     Keep your choice (WIN)

C G G Initial Config
  X   Your choice
    H Host's Choice
  X   Keep your choice (LOSE)

C G G Initial Config
    X Your choice
  H   Hosts Choice
    X Keep your choice (LOSE)

Change your choice:
C G G Initial Config
X     Your choice
  H   Hosts Choice (he could choose either goat w/same results)
    X Change your choice (LOSE)

C G G Initial Config
  X    Your choice
    H  Hosts Choice
X     Change your choice (WIN)

C G G Initial Config
    X Your choice
  H   Hosts Choice
X     Change your choice (WIN)
</pre><div>More information on the <a href="http://mathforum.org/dr/math/faq/faq.monty.hall.html">Dr Math FAQ</a></div>




]]>
        
    </content>
</entry>

<entry>
    <title>Extinguishing the ddWRT firewall</title>
    <link rel="alternate" type="text/html" href="http://mindbent.org/2010/11/extinguishing-the-ddwrt-firewall.html" />
    <id>tag:mindbent.org,2010://1.29</id>

    <published>2010-11-19T00:01:58Z</published>
    <updated>2010-12-12T18:46:37Z</updated>

    <summary><![CDATA[I was trying to use OpenVPN with ddWRT to make some cheap simple VPN adapters. &nbsp;The user had H.323 Video conference stations at 3 locations, each behind a inexpensive home router. &nbsp;The user wanted to be able to connect easily...]]></summary>
    <author>
        <name>Mark Farver</name>
        
    </author>
    
        <category term="Systems" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-US" xml:base="http://mindbent.org/">
        <![CDATA[I was trying to use OpenVPN with ddWRT to make some cheap simple VPN adapters. &nbsp;The user had H.323 Video conference stations at 3 locations, each behind a inexpensive home router. &nbsp;The user wanted to be able to connect easily site to site. &nbsp;Now H.323 and the NAT used on home routers doesn't work very well together, H.323 requires each site connect to the other on&nbsp;arbitrary&nbsp;UDP ports. &nbsp;Very messy. &nbsp;Even configuring the VC stations to use fixed ports and opening those ports through the routers didn't work well, nor did UPNP. &nbsp;All methods the video stream itself subject to interception by an attacker.<div><br /></div><div>On each network I installed a Buffalo WHR-HP-54 router I got at Fry's for about $70. &nbsp;The latest version of ddWRT has a "VPN" edition that includes OpenVPN and some special configuration pages. &nbsp;</div><div><br /></div><div>The problem was that ddWRT wants to serve its intended use as a NATing router, and this conflicts with using OpenVPN in a point to point configuration. &nbsp;The default configuration of the router was NATing some of the VPN traffic and prevented it from working. &nbsp;Since these VPN devices were behind the firewall I only needed routing, not NAT. &nbsp;The fix was to disable all of the standard iptables rules. &nbsp;I couldn't find a way to turn this off via the control panel, but I did find a way to override it. &nbsp;Go to the Administration-&gt;Commands page and type these lines into the text box:</div><div><br /></div>
<pre>iptables -t nat -F
iptables -F INPUT
iptables -F FORWARD
</pre>Then press "Save Firewall." This wipes all of the firewall rules on startup, if you need any of your own rules just add them after the commands above.  This renders ddWRT into a simple router instead of a firewall and OpenVPN works perfectly.  The OpenVPN setup turned out to be pretty easy, I'll explain in a later post.]]>
        
    </content>
</entry>

<entry>
    <title>DIY crack: &quot;Where&apos;s my patching cement?&quot;</title>
    <link rel="alternate" type="text/html" href="http://mindbent.org/2010/10/diy-crack-wheres-my-patching-cement.html" />
    <id>tag:mindbent.org,2010://1.28</id>

    <published>2010-10-27T08:52:20Z</published>
    <updated>2010-10-27T09:16:21Z</updated>

    <summary><![CDATA[As these things go, my guilty pleasure is a pretty benign one. &nbsp;About the only TV I can sit down to anymore is home improvement shows. &nbsp;And not Tim the Toolman but old episodes of "This Old House," "Hometime," "Holmes...]]></summary>
    <author>
        <name>Mark Farver</name>
        
    </author>
    
        <category term="Misc" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="netflix" label="netflix" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-US" xml:base="http://mindbent.org/">
        <![CDATA[As these things go, my guilty pleasure is a pretty benign one. &nbsp;About the only TV I can sit down to anymore is home improvement shows. &nbsp;And not Tim the Toolman but old episodes of "This Old House," "Hometime," "Holmes on Homes," whatever. &nbsp;My local PBS and a few secondary off air channels provide a trickle of mostly repeats on the weekends. &nbsp;When I had cable Discovery provided a few more, and DIY was a premium channel with in house shows that were new as good as the Public Broadcasting originals.<div><br /></div><div>So here's my question: &nbsp;Netflix has licensed hundreds of old TV shows to fill out their "Watch Instantly" system. &nbsp;Viewers are getting a sweet taste of what we've known we've wanted for decades. &nbsp;A la carte, on demand programming with an immense back catalog. &nbsp;Despite thousands of TV shows available in its system, there isn't a single home improvement, DIY or similar show in Netflix's catalog. A few episodes of PBS's "Frontline" and some Mythbusters are about the closest. &nbsp;</div><div><br /></div><div>In fairness, shows like Hometime aren't produced by the network. &nbsp;They get some initial funding from the network for first broadcast rights which usually just covers the cost of production. &nbsp;Profits come from merchandising, and video sales. &nbsp; It has been said that tremendous sales of Hometime's Log Cabin series were largely responsible for the show's executive producer Dean Johnson being able to keep the Log Cabin itself after construction as well as build at least two other luxury homes for himself (also on camera, natch.)</div><div><br /></div><div>I don't know how many people would agree, but that is my suggestion for Netflix.. find a way to buy rights to these shows cheap and I can live vicariously, without ripping down more walls in my house. &nbsp;My wife will thank you.</div>]]>
        
    </content>
</entry>

<entry>
    <title>The Condemned</title>
    <link rel="alternate" type="text/html" href="http://mindbent.org/2010/10/the-condemned.html" />
    <id>tag:mindbent.org,2010://1.27</id>

    <published>2010-10-09T23:52:17Z</published>
    <updated>2010-10-09T23:57:28Z</updated>

    <summary>When the earth was created, the powers above, Gave each man a job to work at and love. He made doctors and lawyers and plumbers and then, He made carpenters, singers, and confidence men. And when each had a job...</summary>
    <author>
        <name>Mark Farver</name>
        
    </author>
    
        <category term="Systems" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-US" xml:base="http://mindbent.org/">
        <![CDATA[<blockquote><pre>When the earth was created, the powers above,
Gave each man a job to work at and love.
He made doctors and lawyers and plumbers and then,
He made carpenters, singers, and confidence men.
And when each had a job to work as he should,
He looked them all over and saw it was good.

He then sat down to rest for a day,
When a horrible groan chanced to come his way.
The Lord then looked down and his eyes opened wide,
For a motley collection of bums stood outside.
"And what do you want?" the creator asked them,
"Help us," they cried out, "A job for us men".
"We have no profession," they cried in dismay,
"And even the jails have turned us away".
Said the Lord, "I've seen many things without worth,
But here I find gathered the scum of the earth!"

The Lord was perplexed, and then he was mad,
For the jobs were all gone, there was none to be had.
Then he spoke aloud in a deep angry tone,
"Forever and ever ye mongrels shall roam,
Ye shall freeze in the summer and sweat when it's cold,
Ye shall work on equipment that's dirty and old,
Ye shall crawl under raised floors, and there cables lay,
Ye shall be called out at midnight and work through the day,
Ye shall work on all holidays, and not make your worth,
Ye shall be blamed for all downtime that occurs on the earth,
Ye shall watch all the glory go to software and sales,
Ye shall be blamed by them both if the system then fails.
Ye shall be paid nothing out of sorrow and tears,
Ye shall be forever cursed, and called SYSTEMS ENGINEERS!"</pre></blockquote>]]>
        
    </content>
</entry>

<entry>
    <title>Never answer a question you wouldn&apos;t ask.</title>
    <link rel="alternate" type="text/html" href="http://mindbent.org/2010/09/never-answer-a-question-you-wouldnt-ask.html" />
    <id>tag:mindbent.org,2010://1.26</id>

    <published>2010-09-26T01:04:07Z</published>
    <updated>2010-09-26T01:06:11Z</updated>

    <summary>Engineering humor:A man is walking through a field, when he spots a hot air balloon low above the trees. The balloon nears, and the man in the balloon calls out, &quot;Hello! Can you tell me where I am?&quot;The man in...</summary>
    <author>
        <name>Mark Farver</name>
        
    </author>
    
        <category term="Misc" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-US" xml:base="http://mindbent.org/">
        <![CDATA[<span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; "><div>Engineering humor:</div><br /></span><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; ">A man is walking through a field, when he spots a hot air balloon low above the trees. The balloon nears, and the man in the balloon calls out, "Hello! Can you tell me where I am?"</span></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; "></span><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; "><br /></span><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; ">The man in the field pauses for a second, then says, "You are in a hot air balloon, about thirty feet off of the ground, above the field in which I am walking."</span></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; "></span><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; "><br /></span><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; ">The man in the balloon replies, "You must be an engineer."</span><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; "><br /></span><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; "><br /></span></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; ">The man in the field, who is an engineer, responds, "Why yes, I am. How did you know?"</span><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; "><br /></span><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; "><br /></span></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; ">The man in the balloon says, "Well, everything you told me is technically correct, but is not useful to me."</span><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; "><br /></span><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; "><br /></span></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; ">The engineer asks, "Would you, by any chance, be an executive?"</span><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; "><br /></span><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; "><br /></span></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; ">The man in the balloon, who is indeed an executive, replies, "Yes. What gave it away?"</span><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; "><br /></span><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; "><br /></span></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Verdana, Arial, Helvetica, sans-serif; ">The engineer responds, "Well, you obviously have no idea of where you are or where you are going, you are in just as bad of a position now as you were before you talked to me, but now it's&nbsp;<i>my</i>&nbsp;fault."</span></blockquote>]]>
        
    </content>
</entry>

</feed>

