<?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>John&#039;s Tidbits &#187; linux</title>
	<atom:link href="http://inodes.org/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://inodes.org</link>
	<description>Moo - Development, Trouble-shooting and Random thoughts...</description>
	<lastBuildDate>Thu, 19 Apr 2012 10:15:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>OLPC Library &#8211; Trying to get XOs out of people wardrobes</title>
		<link>http://inodes.org/2009/01/20/olpc-library-trying-to-get-xos-out-of-people-wardrobes/</link>
		<comments>http://inodes.org/2009/01/20/olpc-library-trying-to-get-xos-out-of-people-wardrobes/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 03:40:26 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[olpc]]></category>
		<category><![CDATA[olpcfriends]]></category>
		<category><![CDATA[olpclibrary]]></category>

		<guid isPermaLink="false">http://inodes.org/blog/?p=113</guid>
		<description><![CDATA[This time last year was a very exciting time at linux.conf.au 2008. The conference organisers had arranged for 100 XO laptops to be given away to conference attendees. The XOs came with the following message attached. Please do something wonderful with this XO, or inspire someone else and pass it on. I was fortunate enough [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" src="http://farm3.static.flickr.com/2408/2230576130_c3b1dbf081.jpg?v=0" alt="XOs at LCA08" width="500" height="281" /></p>
<p>This time last year was a very exciting time at linux.conf.au 2008. The conference organisers had arranged for 100 XO laptops to be <a href="http://lwn.net/Articles/267113/">given away</a> to conference attendees.</p>
<p>The XOs came with the following message attached.</p>
<blockquote><p>Please do something wonderful with this XO, or inspire someone else and pass it on.</p></blockquote>
<p>I was fortunate enough to get one of these XOs. I knew however that I wouldn&#8217;t have any time in the foreseeable future to actually do anything cool with my XO. At the same time I didn&#8217;t simply want to give it away to someone, since I knew at some stage I would actually want to do something with it.</p>
<p>After chatting this over with a few other people I came up with the idea of putting together an OLPC Library. (It was originally going to be OLPC Bank but after chatting it over with <a href="http://pipka.org">Pia</a> we decided that a Library seemed to fit the ideals of the project much better).</p>
<p>So as part of the work I&#8217;m doing with <a href="http://olpcfriends.org">OLPC Friends</a> we have finally launched <a href="http://www.olpclibrary.org">OLPC Library</a>. At the moment this is just a place holder page but hopefully soon we will have a site up to actually enable people to loan out OLPCs whether that be to a developer wanting to write a new piece of software/port an application or a community advocate putting on a demo at a school or trade show.</p>
<p>If you are interested in helping out you can see the beginnings of the ideas for the website at the <a href="http://project.olpclibrary.org/wiki/olpclibrary">OLPC Library Project</a> page and you can also join the <a href="http://www.olpclibrary.org/mailman/listinfo">mailing lists</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2009/01/20/olpc-library-trying-to-get-xos-out-of-people-wardrobes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Firefox 3 and howtoforge.com</title>
		<link>http://inodes.org/2008/03/19/firefox-3-and-howtoforgecom/</link>
		<comments>http://inodes.org/2008/03/19/firefox-3-and-howtoforgecom/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 02:07:11 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://inodes.org/blog/2008/03/19/firefox-3-and-howtoforgecom/</guid>
		<description><![CDATA[There is currently a bug in firefox 3 which causes it to crash with an XError BadAloc when you go to any page hosted on howtoforge. This seems to be related to the image at http://howtoforge.com/themes/htf_glass/images/bg_header_bottom_left15.png. I suggest you don&#8217;t click on that link Apparently this image is 10,000 pixels wide. It looks like this [...]]]></description>
			<content:encoded><![CDATA[<p>There is currently a bug in firefox 3 which causes it to <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=402204"> crash with an XError BadAloc</a> when you go to any page hosted on <a href="http://howtoforge.com">howtoforge</a>.</p>
<p>This seems to be related to the image at <a href="http://howtoforge.com/themes/htf_glass/images/bg_header_bottom_left15.png">http://howtoforge.com/themes/htf_glass/images/bg_header_bottom_left15.png</a>. I suggest you don&#8217;t click on that link <img src='http://inodes.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Apparently this image is 10,000 pixels wide. It looks like this is probably a GTK issue since the same problem happended when I opened the image with evince!</p>
<p>I tried writing a greasemonkey script to get around this problem but it loads too late to avert the crash. So iptables to the rescue.</p>
<p><strong>iptables -I OUTPUT -d howtoforge.com -m string &#8211;algo bm &#8211;to 70 &#8211;string &#8220;GET /themes/htf_glass/images/bg_header_bottom_left15.png&#8221; -j DROP</strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">iptables <span style="color: #000000; font-weight: bold;">&amp;</span><span style="color: #666666; font-style: italic;">#32;</span>
    <span style="color: #660033;">-I</span> OUTPUT \ <span style="color: #666666; font-style: italic;"># Match packets levaing my laptop</span>
    <span style="color: #660033;">-d</span> howtoforge.com  \ <span style="color: #666666; font-style: italic;"># Only packets going to howtoforge</span>
    <span style="color: #660033;">-m</span> string \ <span style="color: #666666; font-style: italic;"># Invoke the string matcher</span>
    <span style="color: #660033;">--algo</span> bm \ <span style="color: #666666; font-style: italic;"># Pick a matching algorithm</span>
    <span style="color: #660033;">--to</span> <span style="color: #000000;">70</span> \ <span style="color: #666666; font-style: italic;"># Only check the first 70 bytes of each packet</span>
    <span style="color: #660033;">--string</span> <span style="color: #ff0000;">&quot;GET /themes/htf_glass/images/bg_header_bottom_left15.png&quot;</span> \ 
    <span style="color: #660033;">-j</span> DROP <span style="color: #666666; font-style: italic;"># Drop the sucker</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2008/03/19/firefox-3-and-howtoforgecom/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Vim and spell checking</title>
		<link>http://inodes.org/2008/02/08/vim-and-spell-checking/</link>
		<comments>http://inodes.org/2008/02/08/vim-and-spell-checking/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 01:48:22 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mutt]]></category>
		<category><![CDATA[spelling]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://inodes.org/blog/2008/02/08/vim-and-spell-checking/</guid>
		<description><![CDATA[I just discovered Vim has spell checking. No more having to manually spell check in mutt with ispell when writing emails, Hurray!! In your .vimrc file simply add setlocal spell spelllang=en_au Note: By default vim only installs en_us spell files. If you are running debian then there is a vim-spellfiles package. There is an ubuntu [...]]]></description>
			<content:encoded><![CDATA[<p>I just discovered Vim has spell checking. No more having to manually spell check in mutt with ispell when writing emails, Hurray!!</p>
<p>In your .vimrc file simply add</p>
<pre>
setlocal spell spelllang=en_au
</pre>
<p><strong>Note:</strong> By default vim only installs en_us spell files. If you are running debian then there is a <em>vim-spellfiles</em> package. There is an ubuntu <a href="https://bugs.launchpad.net/ubuntu/+source/vim/+bug/66878">bug</a> to do something about this as well. Since I&#8217;m using ubuntu I simply grabbed the <em>en</em> directory from ftp://ftp.vim.org/pub/vim/runtime/spell/ and dumped it in <em>/usr/share/vim/vim71/spell</em></p>
<p>Vim will now highlight words it thinks are misspelled. The magic incarnations you will need are:</p>
<p>z= &#8211; Suggest alternatives for the word<br />
zg &#8211; Add word to dictionary<br />
zw &#8211; Remove word from dictionary</p>
]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2008/02/08/vim-and-spell-checking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux.conf.au 2008 selling out</title>
		<link>http://inodes.org/2007/12/21/linuxconfau-2008-selling-out/</link>
		<comments>http://inodes.org/2007/12/21/linuxconfau-2008-selling-out/#comments</comments>
		<pubDate>Fri, 21 Dec 2007 04:12:20 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[lca2007]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://inodes.org/blog/2007/12/21/linuxconfau-2008-selling-out/</guid>
		<description><![CDATA[It&#8217;s 15:11pm and there are only 11 tickets left for linux.conf.au. WARNING: If you have registered but haven&#8217;t gotten around to paying yet then you are going to miss out. So hop to it. Otherwise you are going to be a sad panda.]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s 15:11pm and there are only 11 tickets left for linux.conf.au.</p>
<p>WARNING: If you have registered but haven&#8217;t gotten around to paying yet then you are going to miss out.</p>
<p>So hop to it. Otherwise you are going to be a sad panda.</p>
<p><img src="http://farm1.static.flickr.com/213/492819160_b19547643b_m.jpg" alt="Sad Banda" /></p>
]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2007/12/21/linuxconfau-2008-selling-out/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Out of the wilderness</title>
		<link>http://inodes.org/2007/07/17/out-of-the-wilderness/</link>
		<comments>http://inodes.org/2007/07/17/out-of-the-wilderness/#comments</comments>
		<pubDate>Tue, 17 Jul 2007 01:05:30 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mutt]]></category>
		<category><![CDATA[pidgin]]></category>

		<guid isPermaLink="false">http://inodes.org/blog/2007/07/17/out-of-the-wilderness/</guid>
		<description><![CDATA[I took another step out of the wilderness today&#8230; Those who have know me for a while will know that up until recently I exclusively used linux virtual consoles (ie what CTRL-ALT-F1 gives you from within X) to do all my work except for browsing the web. Recently I stopped using them all together and [...]]]></description>
			<content:encoded><![CDATA[<p>I took another step out of the wilderness today&#8230;</p>
<p>Those who have know me for a while will know that up until recently I exclusively used linux virtual consoles (ie what  CTRL-ALT-F1 gives you from within X) to do all my work except for browsing the web. Recently I stopped using them all together and moved totally into the land of X and started using gnome-terminal instead.</p>
<p>Well I suppose it wasn&#8217;t that big a step as my processes havn&#8217;t changed that much. I simply have a gnome-terminal with tabs full screen in the monitor on my left and a full screen firefox in the monitor on my right <img src='http://inodes.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I took another step today moving from centericq to pidgin for my IM needs. I&#8217;m quite liking it so far especially some of the pop up notification plugins since I can follow channel conversations without switching away from what I&#8217;m doing.</p>
<p>Now does anyone know if there is a plugin to sync all my configuration settings between different machines. That was the handiest thing about running centericq from inside a screen.</p>
<p>But have no fear I&#8217;m still using mutt for mail and doubt that will ever change.</p>
]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2007/07/17/out-of-the-wilderness/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DSPAM case sensitivity</title>
		<link>http://inodes.org/2007/05/11/dspam-case-sensitivity/</link>
		<comments>http://inodes.org/2007/05/11/dspam-case-sensitivity/#comments</comments>
		<pubDate>Fri, 11 May 2007 06:30:01 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[dspam]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://inodes.org/blog/2007/05/11/dspam-case-sensitivity/</guid>
		<description><![CDATA[I use DSPAM to handle my spam checking and have been quite happy with it as it normally delivers >99.9% hit rate. In the last few weeks the amount of spam in my INBOX had been getting progressively worse to the point where I noticed no spam whatsoever was making its way into my spam [...]]]></description>
			<content:encoded><![CDATA[<p>I use <a href="http://www.nuclearelephant.com">DSPAM</a> to handle my spam checking and have been quite happy with it as it normally delivers >99.9% hit rate.</p>
<p>In the last few weeks the amount of spam in my INBOX had been getting progressively worse to the point where I noticed no spam whatsoever was making its way into my spam folder.</p>
<p>Looking through my logs I eventually found the following</p>
<pre>
May 10 10:03:03 fozzie dspam[30287]: Unable to find a valid signature. Aborting.
May 10 10:03:03 fozzie dspam[30287]: process_message returned error -5.  dropping message.
</pre>
<p>I process my spam by using a mutt macro which bounces emails to johnf-spam at inodes dot org. This then passes the email to DSPAM which reclassifies it. It does this by looking at a header it added to the email.</p>
<pre>
X-DSPAM-Signature: 464400d0223642194712985
</pre>
<p>However these were appearing in my INBOX as</p>
<pre>
X-Dspam-Signature: 464400d0223642194712985
</pre>
<p>I use procmail and a perl script to pre-process some of my email and it uses <strong>Mail::Internet</strong> which in turn uses <strong>Mail::Header</strong>. It bestows this piece of wisdom upon the world.</p>
<pre>
# attempt to change the case of a tag to that required by RFC822. That
# being all characters are lowercase except the first of each word. Also
# if the word is an `acronym' then all characters are uppercase. We decide
# a word is an acronym if it does not contain a vowel.

sub _tag_case
{
</pre>
<p>Now I can&#8217;t see where in <a href="http://www.ietf.org/rfc/rfc0822.txt">RFC822</a> it specifies this but in section B.2 it does specify</p>
<pre>
Upper and lower case are not dis-tinguished when comparing field-names.
</pre>
<p>So on that basis I choose to blame DSPAM and applied the following diff</p>
<pre>
diff -ur dspam-3.8.0.orig/src/dspam.c dspam-3.8.0/src/dspam.c
--- dspam-3.8.0.orig/src/dspam.c        2006-12-13 02:33:45.000000000 +1100
+++ dspam-3.8.0/src/dspam.c     2007-05-11 16:25:11.000000000 +1000
@@ -2165,7 +2165,7 @@
           while(node_header != NULL) {
             head = (ds_header_t) node_header->ptr;
             if (head->heading &#038;&#038;
-                !strcmp(head->heading, "X-DSPAM-Signature")) {
+                !strcasecmp(head->heading, "X-DSPAM-Signature")) {
               if (!strncmp(head->data, SIGNATURE_BEGIN,
                            strlen(SIGNATURE_BEGIN)))
               {
</pre>
<p>Now to work out the best way to push that upstream.</p>
]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2007/05/11/dspam-case-sensitivity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu, VLANs and Bridges</title>
		<link>http://inodes.org/2007/04/30/ubuntu-vlans-and-bridges/</link>
		<comments>http://inodes.org/2007/04/30/ubuntu-vlans-and-bridges/#comments</comments>
		<pubDate>Mon, 30 Apr 2007 06:58:23 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[Sysadmin]]></category>
		<category><![CDATA[bridge]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[vlan]]></category>
		<category><![CDATA[vquence]]></category>

		<guid isPermaLink="false">http://inodes.org/blog/2007/04/30/ubuntu-vlans-and-bridges/</guid>
		<description><![CDATA[Bridge and VLAN support has improved dramatically under Ubuntu and probably Debian as well since I last looked into it. once upon a time to create a bridge linked to a VLAN interface you would have to do horrible things like. auto eth0 ifconfig eth0 inet manual pre-up /sbin/vconfig set_name_type VLAN_PLUS_VID_NO_PAD &#124;&#124; true auto vlan7 [...]]]></description>
			<content:encoded><![CDATA[<p>Bridge and VLAN support has improved dramatically under Ubuntu and probably Debian as well since I last looked into it. once upon a time to create a bridge linked to a VLAN interface you would have to do horrible things like.</p>
<pre>
auto eth0
ifconfig eth0 inet manual
    pre-up /sbin/vconfig set_name_type VLAN_PLUS_VID_NO_PAD || true

auto vlan7
iface vlan7 inet manual
    pre-up /sbin/vconfig add eth0 7 || true
    post-down /sbin/vconfig rem vlan7 || true

auto br0
    pre-up brctl addbr br0
    pre-up brctl addif br0 vlan7
    post-down brctl delbr br0
    address 10.38.38.1
    netmask 255.255.255.0
    network 10.38.38.0
    broadcast 10.38.38.255
</pre>
<p>Now the bridge-utils and vlan packages provide hooks into the ifup and ifdown commands so you can simply do</p>
<pre>
auto br-vlan4
iface br-vlan4 inet static
    address 10.38.38.1
    netmask 255.255.255.0
    network 10.38.38.0
    broadcast 10.38.38.255
    vlan-raw-device eth1
    bridge_ports vlan4
    bridge_maxwait 0
    bridge_fd 0
    bridge_stp off
</pre>
<p>Which will automagically</p>
<ul>
<li>Bring up <strong>eth1</strong></li>
<li>Create <strong>vlan4</strong> bound to the <strong>eth1</strong> interface</li>
<li>Bring up <strong>vlan4</strong></li>
<li>Create the <strong>br0</strong> with <strong>vlan4</strong> attached</li>
<li>Give <strong>eth1</strong> the same HW address as <strong>br0</strong></li>
<li>Bring up <strong>br0</strong> with the IP address</li>
</ul>
<p>Nifty!</p>
]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2007/04/30/ubuntu-vlans-and-bridges/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lindsay made me do it!</title>
		<link>http://inodes.org/2006/11/22/lindsay-made-me-do-it/</link>
		<comments>http://inodes.org/2006/11/22/lindsay-made-me-do-it/#comments</comments>
		<pubDate>Wed, 22 Nov 2006 12:33:06 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[Presentations]]></category>
		<category><![CDATA[beagle]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[slug]]></category>
		<category><![CDATA[voip]]></category>

		<guid isPermaLink="false">http://inodes.org/blog/2006/11/22/lindsay-made-me-do-it/</guid>
		<description><![CDATA[While at the Waugh Partners launch party tonight, a bunch of people, mainly Lindsay asked for some details on what I&#8217;d be talking about at SLUG on Friday. I thought that was a very good question and that I should make something up So for those that are wondering I will attempt to cover the [...]]]></description>
			<content:encoded><![CDATA[<p>While at the <a href="http://waughpartners.com.au">Waugh Partners</a> launch party tonight, a bunch of people, mainly <a href="http://holmwood.id.au/~lindsay">Lindsay</a> asked for some details on what I&#8217;d be talking about at <a href="http://slug.org.au">SLUG</a> on Friday. I thought that was a very good question and that I should make something up <img src='http://inodes.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So for those that are wondering I will attempt to cover the following topics in no particular order or level of detail</p>
<ul>
<li>VoIP <img src='http://inodes.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<li>Codecs, which one should I use</li>
<li>VoIP Hardware (Phones, ATAs, ISDN and PSTN cards, Mobile Pods)</li>
<li>VoIP Providers and what they offer</li>
<li>Asterisk and what it can do</li>
<li>Beagle Internet IVR and distributed VoIP Call Centre as a case study</li>
<li>Asterisk@Home</li>
</ul>
<p>If there is anything else that in particular you are interested in or would like me to talk about then let me know.</p>
<p>I&#8217;ll also be bringing along various bits of hardware and hope to have a full demonstration running.</p>
<p>At <a href="http://perkypants.org/blog/">Jeff&#8217;s</a> request I will be doing an in depth overview  of the difference between FXO and FXS and why it is critically important to any VoIP implementation. This will most likely require at least 20 slides and about 50 minutes of explanation <img src='http://inodes.org/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2006/11/22/lindsay-made-me-do-it/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>iptables evilness</title>
		<link>http://inodes.org/2006/11/13/iptables-evilness/</link>
		<comments>http://inodes.org/2006/11/13/iptables-evilness/#comments</comments>
		<pubDate>Sun, 12 Nov 2006 22:43:10 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Bulletproof]]></category>
		<category><![CDATA[itables]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://inodes.org/blog/2006/11/13/iptables-evilness/</guid>
		<description><![CDATA[Matt came to me with an interesting problem at Bulletproof this week. We have a dedicated hosting customer who talks to an external application for e-commerce. The IP for this was going to change but they needed to do to some testing before the switch. As usual with most enterprise applications, the hostname was hard [...]]]></description>
			<content:encoded><![CDATA[<p>Matt came to me with an interesting problem at <a href="http://bulletproof.net">Bulletproof</a> this week. We have a dedicated hosting customer who talks to an external application for e-commerce. The IP for this was going to change but they needed to do to some testing before the switch. As usual with most enterprise applications, the hostname was hard coded. <img src='http://inodes.org/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Matt suggested we do some DNS poisoning or do some transparent proxying using squid or similar. While these would have worked they required firewall changes through three levels of firewalls and extra infrastructure.</p>
<p>So I turned to an evil solution, iptables. <img src='http://inodes.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Most people use DNAT on the inbound connection from the  Internet to their internal private network to port forward to internal servers, or perform one-to-one NAT mappings. There is nothing stopping you using it the other way around.</p>
<p>Lets say that every time someone browses to <a href="http://bulletproof.net">http://bulletproof.net</a> we want them to hit <a href="http://inodes.org">http://inodes.org</a> instead. All you need to do is use DNAT to translate one IP address into the other.<br />
[code]<br />
animal:~ johnf$ host bulletproof.net<br />
bulletproof.net has address 202.44.98.174<br />
animal:~ johnf$ host inodes.org<br />
inodes.org has address 202.125.41.97<br />
animal:~ johnf$ sudo iptables -t nat -A PREROUTING -d 202.44.98.174 -j DNAT  --to 202.125.41.97</p>
<p>[/code]</p>
<p>Now for some testing, a ping looks normal</p>
<p>[code]</p>
<p>animal:~johnf$ ping www.bulletproof.net<br />
PING www.bulletproof.net.au (202.44.98.174) 56(84) bytes of data.<br />
64 bytes from 202.44.98.174: icmp_seq=1 ttl=241 time=198 ms</p>
<p>[/code]</p>
<p>but a tcpdump looks like</p>
<p>[code]</p>
<p>animal:~johnf$ sudo tcpdump -ni eth0<br />
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode<br />
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes<br />
16:35:25.099510 IP 211.30.227.143 > 202.125.41.97: icmp 64: echo request seq 1<br />
16:35:25.301712 IP 202.125.41.97 > 211.30.227.143: icmp 64: echo reply seq 1</p>
<p>[/code]</p>
<p>Of course if anyone needs to try and debug this they are going to have a really fun time working out what is going on. <img src='http://inodes.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If you want to test this yourself you can do it on your own machine using the OUTPUT chain instead of PREROUTING.</p>
]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2006/11/13/iptables-evilness/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>250!</title>
		<link>http://inodes.org/2006/11/11/250/</link>
		<comments>http://inodes.org/2006/11/11/250/#comments</comments>
		<pubDate>Sat, 11 Nov 2006 02:07:04 +0000</pubDate>
		<dc:creator>johnf</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[justblamepia]]></category>
		<category><![CDATA[lca2007]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://inodes.org/blog/2006/11/11/250/</guid>
		<description><![CDATA[We&#8217;ve just hit 250 registrations for linux.conf.au, only 5 days to go before early bird registrations close. So here are some interesting stats of the attendee breakdown so far: By Country Country Number Brazil 1 Canada 1 France 1 Ireland 1 Liberia 1 Nigeria 1 China 1 Singapore 1 Spain 1 UK 1 Croatia 4 [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve just hit 250 registrations for <a href="http://lca2007.linux.org.au">linux.conf.au</a>, only 5 days to go before early bird registrations close.</p>
<p>So here are some interesting stats of the attendee breakdown so far:</p>
<p><strong>By Country</strong></p>
<table>
<tr>
<td><strong>Country</strong></td>
<td><strong>Number</strong></td>
</tr>
<tr>
<td>Brazil</td>
<td>1</td>
</tr>
<tr>
<td>Canada</td>
<td>1</td>
</tr>
<tr>
<td>France</td>
<td>1</td>
</tr>
<tr>
<td>Ireland</td>
<td>1</td>
</tr>
<tr>
<td>Liberia</td>
<td>1</td>
</tr>
<tr>
<td>Nigeria</td>
<td>1</td>
</tr>
<tr>
<td>China</td>
<td>1</td>
</tr>
<tr>
<td>Singapore</td>
<td>1</td>
</tr>
<tr>
<td>Spain</td>
<td>1</td>
</tr>
<tr>
<td>UK</td>
<td>1</td>
</tr>
<tr>
<td>Croatia</td>
<td>4</td>
</tr>
<tr>
<td>Germany</td>
<td>4</td>
</tr>
<tr>
<td>Japan</td>
<td>4</td>
</tr>
<tr>
<td>Romania</td>
<td>9</td>
</tr>
<tr>
<td>New Zealand</td>
<td>13</td>
</tr>
<tr>
<td>USA</td>
<td>18</td>
</tr>
<tr>
<td>Australia</td>
<td>188</td>
</tr>
</table>
<p><strong>Australia by state</strong></p>
<table>
<tr>
<td><strong>State</strong></td>
<td><strong>Number</strong></td>
</tr>
<tr>
<td>NT</td>
<td>1</td>
</tr>
<tr>
<td>TAS</td>
<td>3</td>
</tr>
<tr>
<td>WA</td>
<td>19</td>
</tr>
<tr>
<td>QLD</td>
<td>20</td>
</tr>
<tr>
<td>SA</td>
<td>20</td>
</tr>
<tr>
<td>ACT</td>
<td>23</td>
</tr>
<tr>
<td>VIC</td>
<td>24</td>
</tr>
<tr>
<td>NSW</td>
<td>77</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://inodes.org/2006/11/11/250/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

