<?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>LonnieOlson &#187; Work</title>
	<atom:link href="http://lonnieolson.com/blog/tag/work/feed/" rel="self" type="application/rss+xml" />
	<link>http://lonnieolson.com/blog</link>
	<description>Words from the geeky sysadmin</description>
	<lastBuildDate>Wed, 30 Jul 2008 00:58:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>VMware Workstation flooding network</title>
		<link>http://lonnieolson.com/blog/2007/09/19/vmware-workstation-flooding-network/</link>
		<comments>http://lonnieolson.com/blog/2007/09/19/vmware-workstation-flooding-network/#comments</comments>
		<pubDate>Wed, 19 Sep 2007 19:50:05 +0000</pubDate>
		<dc:creator>fungus</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Linux/BSD]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.kittypee.com/2007/09/19/vmware-workstation-flooding-network/</guid>
		<description><![CDATA[I discovered a problem with Virtual machines and traffic being broadcast out all switches and switch ports. Any traffic sent from the host machine to his guest machine was broadcast out *all* ports on *all* switches in the subnet.
The VMware Forums have detailed the reason for this problem, but I will summarize.
VMware has a limitation [...]]]></description>
			<content:encoded><![CDATA[<p>I discovered a problem with Virtual machines and traffic being broadcast out all switches and switch ports. Any traffic sent from the host machine to his guest machine was broadcast out *all* ports on *all* switches in the subnet.</p>
<p>The <a href="http://www.vmware.com/community/message.jspa?messageID=384995">VMware Forums</a> have detailed the reason for this problem, but I will summarize.</p>
<p>VMware has a limitation (supposedly due to kernel limitation) in which traffic from host to guest must be put on the wire, when guest to host is not put on the wire. This split causes this situation.</p>
<p>When a guest does not run much traffic outside the host, it&#8217;s mac-address-table entry on the connected switch may expire and be removed. Switches handle packets addressed to mac addresses not in it&#8217;s table like hubs, broadcast everywhere to find the proper interface. This is normally fine because the next packet from that MAC will cause the table to be updated. However in the special situation of the host <-> guest conversation the packets generated by the guest never get put on the wire hence the mac-address-table never updating. Also causing host generated packets to continue to be broadcast *everywhere*.</p>
<p>Solutions:<br />
* Patch the vmnet kernel module on the host as described in the forum posting. This patch causes guest -> host traffic to be put on the wire as well. Preventing the lopside problem, but causing more traffic on the wire to the switch.<br />
* Statically add the mac-address to the table in the connected switch. This prevents host->guest traffic from moving beyond the connected switch, and doesn&#8217;t add additional packets on the wire, but adds additional maintenance.<br />
* Cause the guest to send packets that pass outside the host at least once every 5 minutes (default aging-time). Few additional packets, and no switch maintenance.  Install NTPd to synchronize the time.</p>
]]></content:encoded>
			<wfw:commentRss>http://lonnieolson.com/blog/2007/09/19/vmware-workstation-flooding-network/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sandbox a VMware Virtual Machine With iptables</title>
		<link>http://lonnieolson.com/blog/2007/08/27/sandbox-a-vmware-virtual-machine-with-iptables/</link>
		<comments>http://lonnieolson.com/blog/2007/08/27/sandbox-a-vmware-virtual-machine-with-iptables/#comments</comments>
		<pubDate>Mon, 27 Aug 2007 22:52:32 +0000</pubDate>
		<dc:creator>fungus</dc:creator>
				<category><![CDATA[Linux/BSD]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.kittypee.com/2007/08/27/sandbox-a-vmware-virtual-machine-with-iptables/</guid>
		<description><![CDATA[Occasionally I need to play with an experimental machine using VMware Workstation on my Linux host.  The virtualizaton already sanboxes my disks, memory, and other resources.  However I only have 3 choices for networking: Bridged, NAT, and host-only.  

Bridged is often unacceptable for experimentation due to it&#8217;s unrestricted nature.  It also [...]]]></description>
			<content:encoded><![CDATA[<p>Occasionally I need to play with an experimental machine using VMware Workstation on my Linux host.  The virtualizaton already sanboxes my disks, memory, and other resources.  However I only have 3 choices for networking: Bridged, NAT, and host-only.  </p>
<ul>
<li>Bridged is often unacceptable for experimentation due to it&#8217;s unrestricted nature.  It also does not pass through the standard netfilter interfaces in the kernel to be filtered.</li>
<li>NAT is often unacceptable because I cannot control it&#8217;s filtering policies.  It runs a separate daemon to handle the address translation.  This blocks many of my filtering options in iptables.</li>
<li>Host-only is almost never acceptable since I rarely do any experimentation that doesn&#8217;t require a network interface to my network outside my machine.</li>
</ul>
<p>My favorite solution is to use the host-only networking option, and configure my host machine to NAT and route the traffic.  This gives me extreme control over the network policies, addresses, etc.  All with a familiar iptables interface.</p>
<p>To accomplish this there are a few steps that need to happen.</p>
<ul>
<li>Configure your Virtual Machine to use Host-only networking</li>
<li>Enable IP forwarding on your host.
<pre><code>echo 1 > /proc/sys/net/ipv4/ip_forward</code></pre>
</li>
<li>Add the address you want your virtual machine to use on your network as an alias to your real interface.
<pre><code>ifconfig eth0:0 10.49.220.40 netmask 255.255.252.0</code></pre>
</li>
<li>Add a NAT rule with iptables to translate packets to this new address.
<pre><code>iptables -t nat -A POSTROUTING -i vmnet1 -o eth0 -j SNAT --to-source 10.49.220.40</code></pre>
</li>
<li>Add any rules you wish to impose to the FORWARD chain in the default filter table.  Example here defaults to DROP all packets, but allow DNS to a DNS server, and all traffic to a host for the experiment.
<pre><code>iptables -P FORWARD DROP
iptables -A FORWARD -d 10.49.1.25 -p udp --dport 53 -j ACCEPT
iptables -A FORWARD -d 10.49.1.26 -j ACCEPT</code></pre>
</li>
</ul>
<p>Now your experiment will come from your chosen IP as you would have wanted with bridged mode, but you get the awesome power and flexibility of filtering it via iptables.  Great for playing with Windows and it&#8217;s included vulnerabilities.</p>
]]></content:encoded>
			<wfw:commentRss>http://lonnieolson.com/blog/2007/08/27/sandbox-a-vmware-virtual-machine-with-iptables/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Spam statistics and spamd</title>
		<link>http://lonnieolson.com/blog/2006/12/22/spam-statistics-and-spamd/</link>
		<comments>http://lonnieolson.com/blog/2006/12/22/spam-statistics-and-spamd/#comments</comments>
		<pubDate>Fri, 22 Dec 2006 23:54:24 +0000</pubDate>
		<dc:creator>fungus</dc:creator>
				<category><![CDATA[Linux/BSD]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.kittypee.com/2006/12/22/spam-statistics-and-spamd/</guid>
		<description><![CDATA[
I discovered today that I left my [tag]procmail[/tag] deliveries logging all kinds of information.  I had logs that went back a month and a half.  I thought why not parse them up, and generate some [tag]stats[/tag].

My procmailrc sorts most of my mail into folders for me.  When I was writing the script [...]]]></description>
			<content:encoded><![CDATA[<p><a class="imagelink" href="http://www.kittypee.com/wp-content/uploads/2006/12/mailchart.png" title="Mail Chart"><img id="image2259" src="http://www.kittypee.com/wp-content/uploads/2006/12/mailchart.thumbnail.png" alt="Mail Chart" /></a><br />
I discovered today that I left my <a href="http://www.procmail.org/">[tag]procmail[/tag]</a> deliveries logging all kinds of information.  I had logs that went back a month and a half.  I thought why not parse them up, and generate some [tag]stats[/tag].
</p>
<p>My procmailrc sorts most of my mail into folders for me.  When I was writing the script to parse I decided to categorize my folders to make the statistics more meaningful.  This leaves me with 4 types of mail: work (automated reports, logs, and such), [tag]spam[/tag] (SpamAssasin, and discarded mail), lists (mailing lists), and Inbox (everything else).</p>
<p>These stats turned out to be quite interesting, at least to me.  Since I am the sysadmin for an ISP, I get <strong>tons</strong> of email.  I get the output for any and all cron jobs, <a href="http://www2.logwatch.org">interesting snippets of logs</a>, and all mail addressed to common aliases (postmaster, root, webmaster, abuse, daemon, security, etc).  This will cause my work category to be quite large.  You can see that my work mail accounts for more than half of all deliveries.  If you leave out the work category, my spam accounts for about 80% of all of my email, and that doesn&#8217;t count all the crap that SpamAssassin or my own filters don&#8217;t catch.  Holy cow.  Spam is a <strong>huge</strong> problem.</p>
<p>The big dip this week is caused by my experimentation with new anti-spam techniques.  I tried out <a href="http://www.openbsd.org/papers/bsdcan05-spamd/">OpenBSD&#8217;s spamd</a>.  It is amazing.  It reduces spam quite a bit, as you can see here.  It would show even better results, but I only used it on one of several balanced incoming mail servers.  It is a great implementation of <a href="http://www.greylisting.org/">[tag]greylisting[/tag]</a>.  However, this technique causes some legitimate mail to be delayed by 5min &#8211; a few hours.  We had a few complaints from customers about delayed mail, so I had to turn it off.  I highly recommend this technique for anyone who is battling spam, doesn&#8217;t have extremely picky users, and don&#8217;t mind slightly delayed mail from time to time.</p>
]]></content:encoded>
			<wfw:commentRss>http://lonnieolson.com/blog/2006/12/22/spam-statistics-and-spamd/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Becoming a Tor server</title>
		<link>http://lonnieolson.com/blog/2006/10/10/becoming-a-tor-server/</link>
		<comments>http://lonnieolson.com/blog/2006/10/10/becoming-a-tor-server/#comments</comments>
		<pubDate>Tue, 10 Oct 2006 22:24:22 +0000</pubDate>
		<dc:creator>fungus</dc:creator>
				<category><![CDATA[Linux/BSD]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://www.kittypee.com/2006/10/10/becoming-a-tor-server/</guid>
		<description><![CDATA[ The flat green plateau was a bittorrent I left on, and the massive mountain is Tor.
Last week I used quite a bit of bandwidth on my colocated server.  Part of it was due to leaving a bittorrent of a few episodes of &#8220;Weeds&#8221; running for a few days.  Those sure are popular, [...]]]></description>
			<content:encoded><![CDATA[<p><a class="imagelink" href="http://www.kittypee.com/wp-content/uploads/2006/10/coloc.png" title="Bandwidth Usage Graph"><img id="image2250" src="http://www.kittypee.com/wp-content/uploads/2006/10/coloc.thumbnail.png" alt="Bandwidth Usage Graph" /></a> The flat green plateau was a bittorrent I left on, and the massive mountain is Tor.</p>
<p>Last week I used quite a bit of bandwidth on my colocated server.  Part of it was due to leaving a bittorrent of a few episodes of &#8220;Weeds&#8221; running for a few days.  Those sure are popular, but I have the max upload rate limited to 800KBps.  Not enough to cause problems, but enough to share my generous amount of bandwidth.</p>
<p>While Bittorrent can eat up quite a bit of bandwidth, it wasn&#8217;t the culprit.  The problem was Tor!  I misread the documentation for BandwidthRate and BandwidthBurst.  I thought it was in bps (bits), but, in fact, it was in Bps (bytes).  Whoops!  When I was going through the normal everyday sysadmin duties I noticed that our primary backbone link was a lot closer to being full than it normally should be.  A little poking around and I found that my own server was eating up about 14Mbps.  I shut it off immediately, and headed for the documentation.  To my surprise <a href="http://wiki.noreply.org/noreply/TheOnionRouter/TorFAQ#DoesBandwidthRateReallyWork">FAQ 5.17</a> is very clear about the units for the BandwidthRate.  I am a total idiot.  Config fixed, tor restarted.</p>
<p>I am not one of those privacy nuts that won&#8217;t do anything that isn&#8217;t anonymized or encrypted.  In fact I tried using <strong>tor</strong> myself for about 2 minutes.  It was painfully slow.  I don&#8217;t really care who sees most of my traffic, and the traffic I do care about is already either SSL&#8217;d or ssh tunneled.  However, I understand the occasional need for tor, and it&#8217;s obvious benefits.  Since I have so much bandwidth available that no  one will be using, I thought I would share.  <em>Ain&#8217;t it nice to be sysadmin of your own ISP.  <img src='http://lonnieolson.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </em></p>
<p>Interesting note:  So far in the first 10 days of this month I have used 981GB on my server.  Holy bejeezus</p>
]]></content:encoded>
			<wfw:commentRss>http://lonnieolson.com/blog/2006/10/10/becoming-a-tor-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dream Job</title>
		<link>http://lonnieolson.com/blog/2005/07/08/dream-job/</link>
		<comments>http://lonnieolson.com/blog/2005/07/08/dream-job/#comments</comments>
		<pubDate>Fri, 08 Jul 2005 17:52:00 +0000</pubDate>
		<dc:creator>fungus</dc:creator>
				<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://kittypee.com/wordpress/2005/07/08/dream-job/</guid>
		<description><![CDATA[If only I could move to Boston.
FSF Sys Admin
]]></description>
			<content:encoded><![CDATA[<p>If only I could move to Boston.<br />
<a href="http://www.fsf.org/news/fsfsysadmin.html">FSF Sys Admin</a></p>
]]></content:encoded>
			<wfw:commentRss>http://lonnieolson.com/blog/2005/07/08/dream-job/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
