<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>khax.net &#187; linux</title>
	<atom:link href="http://blog.khax.net/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.khax.net</link>
	<description>Adventures in Ubuntu systems administration</description>
	<lastBuildDate>Thu, 08 Jul 2010 02:01:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.khax.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/6ccca40b5ab19d33d91882e4d8f9a9c4?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>khax.net &#187; linux</title>
		<link>http://blog.khax.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.khax.net/osd.xml" title="khax.net" />
	<atom:link rel='hub' href='http://blog.khax.net/?pushpress=hub'/>
		<item>
		<title>Odd iproute2 gateway behavior with two gateways</title>
		<link>http://blog.khax.net/2010/01/26/odd-iproute2-gateway-behavior-with-two-gateways/</link>
		<comments>http://blog.khax.net/2010/01/26/odd-iproute2-gateway-behavior-with-two-gateways/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 23:40:35 +0000</pubDate>
		<dc:creator>agentk</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[iptroute2]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.khax.net/?p=169</guid>
		<description><![CDATA[After helping a frustrated yet patient Elvar I thought I better post about the situation we came across incase anybody else finds themselves in the same situation. Elvar started with all the correct elements to setup a functioning multrouting gateway. Two connections from two different providers, eth1, eth2. Running on an Ubuntu box with eth0 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.khax.net&amp;blog=6484387&amp;post=169&amp;subd=khax&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After helping a frustrated yet patient Elvar I thought I better post about the situation we came across incase anybody else finds themselves in the same situation.</p>
<p>Elvar started with all the correct elements to setup a functioning multrouting gateway. Two connections from two different providers, eth1, eth2. Running on an Ubuntu box with eth0 as internal. Both internet connections working on their own.</p>
<p>But alas. Whenever both eth1 and eth2 were active on the host, outgoing packets just would not go out. I don&#8217;t know if incoming packets were being replied to as we were unable to check that.</p>
<p>If just eth1 or eth2 was active than everything traversed ok. But we wanted it to work with both connections.</p>
<p>After a LONG time of diagnosing we noticed there were two default routes in iproute2 (ip&#8217;s fudged, but you get the idea):</p>
<pre>firewall# ip route show
...
default via 1.1.2.1 dev eth2  metric 100
default via 1.1.3.1 dev eth1  metric 100</pre>
<p>My firewall often has two default routes listed on the main table (ppp0, and ppp1) until the cleanup script fixes it. Without any negative side effect. I may just be lucky though.</p>
<p>Upon removing the eth2 line from table main, everything started working correctly. Incoming, outgoing, forwarding, balancing.</p>
<p>I also noticed the output of ifconfig eth2 looked a bit screwed too, but there was not much we could do about that as it was assigned by dhcp.</p>
<pre>eth2      Link encap:Ethernet  HWaddr 00:11:22:33:44:55
    inet addr:1.1.2.1  Bcast:255.255.255.255  Mask:255.255.255.0</pre>
<p>See it? No not the MAC address. The broadcast address. A quick ipcalc 1.1.2.1/24 gives me a broadcast of 1.1.2.255. But once we removed the eth2 default route line, it all started working again and didn&#8217;t get to dig into it to see if the broadcast actually affected it.</p>
<p>So that&#8217;s all. Just remember there are a lot more things to go wrong in a multigateway setup, including things outside of iptables.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khax.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khax.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khax.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khax.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khax.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khax.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khax.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khax.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khax.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khax.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khax.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khax.wordpress.com/169/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khax.wordpress.com/169/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khax.wordpress.com/169/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.khax.net&amp;blog=6484387&amp;post=169&amp;subd=khax&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.khax.net/2010/01/26/odd-iproute2-gateway-behavior-with-two-gateways/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">agentk</media:title>
		</media:content>
	</item>
		<item>
		<title>Multi gateway balancing with iptables</title>
		<link>http://blog.khax.net/2009/12/01/multi-gateway-balancing-with-iptables/</link>
		<comments>http://blog.khax.net/2009/12/01/multi-gateway-balancing-with-iptables/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 02:14:06 +0000</pubDate>
		<dc:creator>agentk</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[gateway]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[multi]]></category>

		<guid isPermaLink="false">http://blog.khax.net/?p=163</guid>
		<description><![CDATA[I have been testing load balancing via both iptables and ip route nexthop for a couple of days now.  They both work pretty well too. This only balances outgoing traffic as incoming traffic balanced via DNS RR and the firewall just returns the traffic on the interface it arrived on as per the previous post. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.khax.net&amp;blog=6484387&amp;post=163&amp;subd=khax&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have been testing load balancing via both iptables and ip route nexthop for a couple of days now.  They both work pretty well too.</p>
<p>This only balances outgoing traffic as incoming traffic balanced via DNS RR and the firewall just returns the traffic on the interface it arrived on as per the previous post.</p>
<p>On the whole, I prefer the iptables solution. It seems to balance the traffic better. ip route balances outgoing connections based on nexthop of the route to that host is not already in it&#8217;s routing cache. While iptables balances traffic by alternate outgoing connections. The only downside I have seen is occasional connection drops to the BlackBerry servers.</p>
<p>After 24 hours of iptables balancing:</p>
<pre>ppp0      Link encap:Point-to-Point Protocol
          RX bytes:1186783900 (1.1 GB)  TX bytes:1290603327 (1.2 GB)
ppp1      Link encap:Point-to-Point Protocol
          RX bytes:1109227490 (1.1 GB)  TX bytes:1140565429 (1.1 GB)
</pre>
<p>&nbsp;</p>
<p>This is using inclusion rules for determining balanced traffic. These are the rules that ended up on the production server:</p>
<p>&nbsp;</p>
<pre># Load balancing rules (Split 50/50 between fwmark 1/2)
iptables -t mangle -A balance1 -d 192.168.0.0/16      -j RETURN
iptables -t mangle -A balance1 -d 10.0.0.0/8          -j RETURN
iptables -t mangle -A balance1 -m connmark ! --mark 0 -j RETURN
iptables -t mangle -A balance1 -m state --state ESTABLISHED,RELATED -j RETURN
iptables -t mangle -A balance1 -m statistic --mode nth --every 2 --packet 0 -j CONNMARK --set-mark 1
iptables -t mangle -A balance1 -m statistic --mode nth --every 2 --packet 1 -j CONNMARK --set-mark 2

# Check to see if we have already marked a packet
iptables -t mangle -A PREROUTING  -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark
iptables -t mangle -A OUTPUT      -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark

# Mark incoming connections to return on the interface they came in on
iptables -t mangle -A PREROUTING          -i ppp0                     -m state --state NEW  -j CONNMARK --set-mark 1
iptables -t mangle -A PREROUTING          -i ppp1                     -m state --state NEW  -j CONNMARK --set-mark 2

# New outgoing packets
iptables -t mangle -A PREROUTING  -i eth0          -p tcp --dport  22 -m state --state NEW  -j balance1
iptables -t mangle -A PREROUTING  -i eth0          -p tcp --dport  25 -m state --state NEW  -j balance1
iptables -t mangle -A PREROUTING  -i eth0          -p tcp --dport  80 -m state --state NEW  -j balance1
iptables -t mangle -A PREROUTING  -i eth0          -p tcp --dport 443 -m state --state NEW  -j balance1
iptables -t mangle -A OUTPUT                       -p tcp --dport  80 -m state --state NEW  -j balance1

# Choose our route and save the mark
iptables -t mangle -A PREROUTING  -m connmark --mark 1 -j MARK --set-mark 1
iptables -t mangle -A PREROUTING  -m connmark --mark 2 -j MARK --set-mark 2
iptables -t mangle -A PREROUTING  -m state --state NEW -m connmark ! --mark 0  -j CONNMARK --save-mark
</pre>
<p>&nbsp;</p>
<p>That&#8217;s all of the CONNMARK and MARK related rules I use.</p>
<p>The new outgoing packets section is where I choose what packets should be balanced and accounts for about 95% of our outgoing traffic.</p>
<p>The balance1 chain just has some checks at the beginning to catch further traffic that should not be balanced in case some rule gets messed up.</p>
<p>Of the new outgoing packets rules, the PREROUTE lines are for forwarded traffic and the OUTPUT rule is for traffic generated on that host by a transparent squid proxy.</p>
<p>Hope somebody finds that useful one day.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khax.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khax.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khax.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khax.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khax.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khax.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khax.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khax.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khax.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khax.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khax.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khax.wordpress.com/163/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khax.wordpress.com/163/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khax.wordpress.com/163/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.khax.net&amp;blog=6484387&amp;post=163&amp;subd=khax&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.khax.net/2009/12/01/multi-gateway-balancing-with-iptables/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">agentk</media:title>
		</media:content>
	</item>
		<item>
		<title>Multi gateway routing with iptables and iproute2</title>
		<link>http://blog.khax.net/2009/11/28/multi-gateway-routing-with-iptables-and-iproute2/</link>
		<comments>http://blog.khax.net/2009/11/28/multi-gateway-routing-with-iptables-and-iproute2/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 07:39:08 +0000</pubDate>
		<dc:creator>agentk</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.khax.net/?p=160</guid>
		<description><![CDATA[Notes on multi gateway routing with iptables and iproute2, suggestions and corrections gladly accepted. My notes may be incomplete or just plain wrong, I pieced them together after getting it working. Running on Ubuntu-9.10 with two internet connections ppp0 and ppp1 both with static IP&#8217;s from two different internet providers in Australia (iiNet and Internode). [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.khax.net&amp;blog=6484387&amp;post=160&amp;subd=khax&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Notes on multi gateway routing with iptables and iproute2, suggestions and corrections gladly accepted. My notes may be incomplete or just plain wrong, I pieced them together after getting it working.</p>
<p>Running on Ubuntu-9.10 with two internet connections ppp0 and ppp1 both with static IP&#8217;s from two different internet providers in Australia (iiNet and Internode).</p>
<h2>Preperation:</h2>
<p>Extra ip route tables per gateway.</p>
<p>Add tables to /etc/iproute2/rt_tables. Table names and numbers can be anything as long as they are consistent later on.</p>
<pre>echo -e "101 connection1\n102 connection2" | sudo tee -a /etc/iproute2/rt_tables
</pre>
<p>Add routes to the extra rule tables. Copy the local routes from the main table then add the default gateway specific to this connection. Replace the vars at the beginning with your relevant settings.</p>
<pre>#!/bin/sh
DEV1=ppp0
IP1=100.0.1.1
GW1=100.0.1.254
TABLE2=connection2
DEV2=ppp1
IP2=100.0.2.1
GW2=100.0.2.254
ip route flush table $TABLE1
ip route flush table $TABLE2
ip route show table main | grep -Ev '(^default|ppp)' | while read ROUTE ; do
    ip route add table $TABLE1 $ROUTE
    ip route add table $TABLE2 $ROUTE
done
ip route add table $TABLE1 $GW1 dev $DEV1 src $IP1
ip route add table $TABLE2 $GW2 dev $DEV2 src $IP2
ip route add table $TABLE1 default via $GW1
ip route add table $TABLE2 default via $GW2
</pre>
<p>ip route output:</p>
<pre>~# ip route show
100.0.1.254 dev ppp0  proto kernel  scope link  src 100.0.1.1
100.0.2.254 dev ppp1  proto kernel  scope link  src 100.0.2.1
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.1
default via 100.0.1.254 dev ppp0
</pre>
<pre>~# ip route show table connection1
100.0.1.254 dev ppp0  proto kernel  scope link  src 100.0.1.1
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.1
default via 100.0.1.254 dev ppp0

~# ip route show table connection2
100.0.2.254 dev ppp1  proto kernel  scope link  src 100.0.2.1
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.1
default via 100.0.2.254 dev ppp1
</pre>
<p>Add the ip rules:</p>
<pre>ip rule add from 100.0.1.1 lookup connection1
ip rule add from 100.0.2.1 lookup connection2
ip rule add fwmark 1 lookup connection1
ip rule add fwmark 2 lookup connection2
</pre>
<p>Add the iptables rules for SNAT:</p>
<pre>iptables -A POSTROUTING -o ppp0 -j SNAT --to-source 100.0.1.1
iptables -A POSTROUTING -o ppp1 -j SNAT --to-source 100.0.2.1
</pre>
<p>And finally add the rules for marking the connection they should be going out on. The first PREROUTING rule is for packets we forward to be returned via the interface they were received on. The OUTPUT rule is for packets handled on this PC to be returned on the correct interface too. We only want to mark new packets and restore marks on established connections else the packets</p>
<pre>-A PREROUTING          -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark
-A OUTPUT              -m state --state ESTABLISHED,RELATED -j CONNMARK --restore-mark
-A PREROUTING -i ppp0  -m state --state NEW                 -j CONNMARK --set-mark 1
-A PREROUTING -i ppp1  -m state --state NEW                 -j CONNMARK --set-mark 2
-A PREROUTING -m connmark --mark 1                          -j MARK --set-mark 1
-A PREROUTING -m connmark --mark 2                          -j MARK --set-mark 2
-A PREROUTING -m state --state NEW -m connmark ! --mark 0   -j CONNMARK --save-mark
</pre>
<h2>Selective routing:</h2>
<p>To send all outgoing traffic on a specific table:</p>
<pre>-A PREROUTING -i eth0 -m state --state NEW -p tcp --dport  80 -j CONNMARK --set-mark 2
-A PREROUTING -i eth0 -m state --state NEW -p tcp --dport 443 -j CONNMARK --set-mark 2
</pre>
<p>&nbsp;</p>
<h2>References:</h2>
<p><a href="http://www.clintoneast.com/articles/multihomed.php">http://www.clintoneast.com/articles/multihomed.php</a></p>
<p><a href="http://linux-ip.net/html/adv-multi-internet.html">http://linux-ip.net/html/adv-multi-internet.html</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khax.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khax.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khax.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khax.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khax.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khax.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khax.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khax.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khax.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khax.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khax.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khax.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khax.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khax.wordpress.com/160/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.khax.net&amp;blog=6484387&amp;post=160&amp;subd=khax&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.khax.net/2009/11/28/multi-gateway-routing-with-iptables-and-iproute2/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">agentk</media:title>
		</media:content>
	</item>
		<item>
		<title>Installing Debian Lenny on my DNS-323</title>
		<link>http://blog.khax.net/2009/09/02/installing-debian-lenny-on-my-dns-323/</link>
		<comments>http://blog.khax.net/2009/09/02/installing-debian-lenny-on-my-dns-323/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 04:23:37 +0000</pubDate>
		<dc:creator>agentk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[dlink]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[dns-323]]></category>
		<category><![CDATA[install]]></category>

		<guid isPermaLink="false">http://blog.khax.net/?p=153</guid>
		<description><![CDATA[I finished upgrading my Dlink DNS-323 to Debian Lenny today. I followed the instruction at: http://www.cyrius.com/debian/orion/d-link/dns-323/install.html The install took quite a while, I selected the standard package list. Then because it gets quit hot here in Griffith I really wanted to have fan control back, so instruction here were also followed. As I wanted to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.khax.net&amp;blog=6484387&amp;post=153&amp;subd=khax&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I finished upgrading my Dlink DNS-323 to Debian Lenny today. I followed the instruction at:</p>
<p><a href="http://www.cyrius.com/debian/orion/d-link/dns-323/install.html">http://www.cyrius.com/debian/orion/d-link/dns-323/install.html</a></p>
<p>The install took quite a while, I selected the standard package list. Then because it gets quit hot here in Griffith I really wanted to have fan control back, so instruction <a href="http://www.cyrius.com/journal/debian/orion/d-link/dns-323/dns-323-fan-control">here</a> were also followed.</p>
<p>As I wanted to install to an 8GB Flash drive I had handy I first uploaded the netboot.img firmware, turned off the DNS-323, removed the hard drives and left only the flash drive inserted, then powered up and followed the installation instructions.</p>
<p>I like keeping root on the flash drive as the hard drives can be stopped all day when not in use to save temp and power.</p>
<p>Fans are also controlled by lm-sensors and the unit seems to run about 47degC most of the day.</p>
<p>I use the unit mostly for irc (screen/weechat), rsync backup target and samba media server. It handles all that pretty well but I do notice it bog a fair bit with only 64mb ram and hard drive transfer rates are not as good as I am used to, but on the whole a great little unit (now that it runs debian).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khax.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khax.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khax.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khax.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khax.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khax.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khax.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khax.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khax.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khax.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khax.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khax.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khax.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khax.wordpress.com/153/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.khax.net&amp;blog=6484387&amp;post=153&amp;subd=khax&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.khax.net/2009/09/02/installing-debian-lenny-on-my-dns-323/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">agentk</media:title>
		</media:content>
	</item>
		<item>
		<title>Dlink DWA-110 + Ubuntu 8.10 = Happy Customer</title>
		<link>http://blog.khax.net/2009/03/20/dlink-dwa-110-ubuntu-810-happy-customer/</link>
		<comments>http://blog.khax.net/2009/03/20/dlink-dwa-110-ubuntu-810-happy-customer/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 22:17:15 +0000</pubDate>
		<dc:creator>agentk</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[dick smiths]]></category>
		<category><![CDATA[dlink]]></category>
		<category><![CDATA[drivers]]></category>
		<category><![CDATA[dse]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu-8.10]]></category>
		<category><![CDATA[usb]]></category>
		<category><![CDATA[wireless]]></category>

		<guid isPermaLink="false">http://blog.khax.net/?p=119</guid>
		<description><![CDATA[Just a quick note for anybody looking to see if this Wireless (802.11b/g) USB adaptor works with linux before purchasing. I purchased one from Dick Smiths last night plugged it into my (Ubuntu-8.10 powered) laptop and was up and running within seconds. Signal strength and speed are fairly industry standard. Cost AU$50. I probably could [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.khax.net&amp;blog=6484387&amp;post=119&amp;subd=khax&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just a quick note for anybody looking to see if this Wireless (802.11b/g) USB adaptor works with linux before purchasing.</p>
<p>I purchased one from Dick Smiths last night plugged it into my (Ubuntu-8.10 powered) laptop and was up and running within seconds.</p>
<p>Signal strength and speed are fairly industry standard. Cost AU$50. I probably could have found it cheaper elseware but DSE was conveniently on my way home last night.</p>
<div id="attachment_120" class="wp-caption aligncenter" style="width: 180px"><a href="http://khax.files.wordpress.com/2009/03/dwa-110.jpg"><img class="size-full wp-image-120" title="dwa-110" src="http://khax.files.wordpress.com/2009/03/dwa-110.jpg?w=170&#038;h=136" alt="D-Link DWA-110" width="170" height="136" /></a><p class="wp-caption-text">D-Link DWA-110</p></div>
<p>Now just to find an access point with decent signal strength.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khax.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khax.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khax.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khax.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khax.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khax.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khax.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khax.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khax.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khax.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khax.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khax.wordpress.com/119/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khax.wordpress.com/119/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khax.wordpress.com/119/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.khax.net&amp;blog=6484387&amp;post=119&amp;subd=khax&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.khax.net/2009/03/20/dlink-dwa-110-ubuntu-810-happy-customer/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">agentk</media:title>
		</media:content>

		<media:content url="http://khax.files.wordpress.com/2009/03/dwa-110.jpg" medium="image">
			<media:title type="html">dwa-110</media:title>
		</media:content>
	</item>
		<item>
		<title>PostBooks install tutorial for Ubuntu Linux 7.10</title>
		<link>http://blog.khax.net/2009/02/08/postbooks-install-tutorial-for-ubuntu-linux-710/</link>
		<comments>http://blog.khax.net/2009/02/08/postbooks-install-tutorial-for-ubuntu-linux-710/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 22:26:20 +0000</pubDate>
		<dc:creator>agentk</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[accounting]]></category>
		<category><![CDATA[erp]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[postbooks]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[ubuntu-7.10]]></category>

		<guid isPermaLink="false">http://blog.khax.net/?p=45</guid>
		<description><![CDATA[PostBooks is an excellent cross-platform commercial open source ERP / accounting software suite. These are my old instructions from installing PostBooks in Ubuntu-7.10. This document will give you setup instructions for installing PostBooks from scratch. Ie, no previous install of postgresql or PostBooks on the system. You will need to read between the lines if [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.khax.net&amp;blog=6484387&amp;post=45&amp;subd=khax&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>PostBooks is an excellent cross-platform commercial open source ERP / accounting software suite. These are my old instructions from installing PostBooks in Ubuntu-7.10.</p>
<p>This document will give you setup instructions for installing PostBooks from scratch. Ie, no previous install of postgresql or PostBooks on the system. You will need to read between the lines if your install does not fit that description.<span id="more-45"></span></p>
<h3>Download PostBooks</h3>
<p>Download the postbooks init and postbooks-empty (or quickstart/demo) to /tmp. You can find the latest files <a href="http://sourceforge.net/project/showfiles.php?group_id=196195&amp;package_id=240538" target="_blank">here</a>. Ie:</p>
<pre>wget -P /tmp http://downloads.sourceforge.net/postbooks/init-2.3.0beta1.sql?use_mirror=optusnet  \

http://downloads.sourceforge.net/postbooks/postbooks_empty-2.3.0beta1.backup?use_mirror=optusnet</pre>
<h3>Install PostgreSQL</h3>
<pre>sudo apt-get install postgresql postgresql-contrib</pre>
<p>At this time I also install openssh-server mc and vim. If your more comfortable using an editor other than vim, just replace any mention of vim with your preference.</p>
<h3>Create mfgadmin</h3>
<p>Now to create the mfgadmin user in postgresql. The default mfgadmin password is mfgadmin. Please change this upon first connecting with the PostBooks client.</p>
<pre>sudo -u postgres psql -U postgres -f /tmp/init-2.3.0alpha1.sql template1</pre>
<h3>Create a company</h3>
<p>Now we create an &#8216;company&#8217; database. You could create a few databases here if needed, using</p>
<pre>sudo -u postgres createdb -h localhost -U mfgadmin mfg</pre>
<h3>Restore PostBooks to the company</h3>
<pre>sudo -u postgres pg_restore -h localhost -U mfgadmin -d mfg /tmp/postbooks_empty-2.3.0alpha1.backup -v</pre>
<h3>Allow network access to postgresql</h3>
<p>to the following files add the indicated lines:</p>
<pre>sudo vim /etc/postgresql/8.2/main/pg_hba.conf
host all all 172.16.80.0/24 md5</pre>
<pre>sudo vim /etc/postgresql/8.2/main/postgresql.conf
listen_addresses = '*'</pre>
<p>And now restart postgresql</p>
<pre>sudo /etc/init.d/postgresql-8.2 restart</pre>
<h3>Finished</h3>
<p>You should now be able to open the PostBooks client application and connect to the &#8216;mfg&#8217; database with the username and password mfgadmin/mfgadmin</p>
<p>If you want to create another company just go back to the Create a company step and replace <strong>mfg </strong>with your desired company database name.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khax.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khax.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khax.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khax.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khax.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khax.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khax.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khax.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khax.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khax.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khax.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khax.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khax.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khax.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.khax.net&amp;blog=6484387&amp;post=45&amp;subd=khax&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.khax.net/2009/02/08/postbooks-install-tutorial-for-ubuntu-linux-710/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">agentk</media:title>
		</media:content>
	</item>
		<item>
		<title>Adjusting mouse and touchpad speed in xorg.conf</title>
		<link>http://blog.khax.net/2009/02/08/adjusting-mouse-and-touchpad-speed-in-xorgconf/</link>
		<comments>http://blog.khax.net/2009/02/08/adjusting-mouse-and-touchpad-speed-in-xorgconf/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 22:19:32 +0000</pubDate>
		<dc:creator>agentk</dc:creator>
				<category><![CDATA[Desktop]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mouse speed]]></category>
		<category><![CDATA[SHMConfig]]></category>
		<category><![CDATA[synaptics]]></category>
		<category><![CDATA[touchpad]]></category>
		<category><![CDATA[xorg.conf]]></category>

		<guid isPermaLink="false">http://blog.khax.net/?p=41</guid>
		<description><![CDATA[My Dell XPS M1210 had received an install of Ubuntu *the* day it arrived. But the mouse and touchpad always accelerated at different speeds. The problem is that when I go to Mouse Preferences, I can only adjust cursor speed, not the speed of individual movement sources. After a lot of searching here are the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.khax.net&amp;blog=6484387&amp;post=41&amp;subd=khax&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My Dell XPS M1210 had received an install of Ubuntu *the* day it arrived. But the mouse and touchpad always accelerated at different speeds. The problem is that when I go to Mouse Preferences, I can only adjust cursor speed, not the speed of individual movement sources. After a lot of searching here are the samples from my xorg.conf file.</p>
<p>I only use two devices for cursor movement. The trackpad, and a Logitech bluetooth mouse. After booting with an Ubuntu live cd, the trackpad moves at a medium-quick pace, and once I connect to the mouse, the mouse moves at a very-fast pace.<span id="more-41"></span></p>
<h3>xorg.conf</h3>
<p>My xorg.conf file has been sum what adjusted from default, but my server layout here has two pointing devices,  Mouse0 as CorePointer and Synaptics Touchpad.</p>
<pre>Section "ServerLayout"
    Identifier     "Default Layout"
    Screen         "Default Screen" 0 0
    InputDevice    "Generic Keyboard" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    InputDevice    "Synaptics Touchpad"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
<strong>    Option         "Sensitivity" "0.3"</strong>
EndSection

Section "InputDevice"
    Identifier     "Synaptics Touchpad"
    Driver         "synaptics"
    Option         "SendCoreEvents" "true"
    Option         "Device" "/dev/psaux"
    Option         "Protocol" "auto-dev"
    Option         "HorizEdgeScroll" "0"
    Option         "SHMConfig" "On"
<strong>    Option         "MaxSpeed" "0.15"</strong>
EndSection</pre>
<p>I cannot remember for sure which how much of the xorg.conf file I have changed in total, but the two lines in bold are the ones controlling device speed.</p>
<h3>Synaptics Touchpad Speed</h3>
<p>For the synaptics device there are three main lines to control pointer speed.</p>
<pre>Option "MinSpeed" "&lt;float&gt;"
Option "MaxSpeed" "&lt;float&gt;"
Option "AccelFactor" "&lt;float&gt;"</pre>
<p>The command to find your current touchpad settings is (in bold):</p>
<pre>~/ <strong>synclient -l | grep -E '( MinSpeed| MaxSpeed| AccelFactor)'</strong>
    MinSpeed                = 0.0822368
    MaxSpeed                = 0.15
    AccelFactor             = 0.00164474</pre>
<p>There you can see the MaxSpeed that I have changed.</p>
<p>You can also test touchpad speed adjustments without having to restart X by using synclient [var1=value1 [var2=value2] &#8230;]. Eg:</p>
<pre>~/ synclient MaxSpeed=0.15</pre>
<p>If you are following this example, also add the SHMConfig line if it is not yet present, as it adds the &#8216;Touchpad&#8217; tab to the mouse preferences screen that allows you to set the touchpad to turn off while typing.</p>
<h3>Mouse Speed</h3>
<p>I cannot remember what the speed is relative to for the mouse section, but some quick tweeking and playing should see you straight. You will need to restart X each time you adjust the setting for it to take effect.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/khax.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/khax.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/khax.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/khax.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/khax.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/khax.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/khax.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/khax.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/khax.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/khax.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/khax.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/khax.wordpress.com/41/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/khax.wordpress.com/41/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/khax.wordpress.com/41/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.khax.net&amp;blog=6484387&amp;post=41&amp;subd=khax&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.khax.net/2009/02/08/adjusting-mouse-and-touchpad-speed-in-xorgconf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">agentk</media:title>
		</media:content>
	</item>
	</channel>
</rss>