<?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>AndyB &#187; linux</title>
	<atom:link href="http://andrewbevitt.com/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://andrewbevitt.com</link>
	<description>shakin&#039; up noth-ink</description>
	<lastBuildDate>Mon, 26 Sep 2011 03:32:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>New Ubuntu 9.04 Login Screen</title>
		<link>http://andrewbevitt.com/2009/03/03/new-ubuntu-904-login-screen/</link>
		<comments>http://andrewbevitt.com/2009/03/03/new-ubuntu-904-login-screen/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 11:50:08 +0000</pubDate>
		<dc:creator>AndyB</dc:creator>
				<category><![CDATA[Everyday Life]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://andrewbevitt.com/?p=253</guid>
		<description><![CDATA[<br/><p>I refrained myself from posting anything, except the food challenge, last week. Basically so that the food challenge was nice and consecutive. Most of the stuff I thought: Gee I might post about that; is no longer something I feel like writing about.</p> <p>But I can&#8217;t go past this one: I installed a Ubuntu 9.04 [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I refrained myself from posting anything, except the food challenge, last week. Basically so that the food challenge was nice and consecutive. Most of the stuff I thought: Gee I might post about that; is no longer something I feel like writing about.</p>
<p>But I can&#8217;t go past this one: I installed a Ubuntu 9.04 Virtual Machine (Under <a href="http://www.virtualbox.org/">VirtualBox</a>). After some updates the login screen changed to the following. Put simply: I like it. No frills, no fuss.</p>
<p><img src="http://andrewbevitt.com/wp-content/uploads/2009/03/login.png" alt="Ubuntu 9.04 Login" /></p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbevitt.com/2009/03/03/new-ubuntu-904-login-screen/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Install xauth to do X over ssh</title>
		<link>http://andrewbevitt.com/2009/02/11/install-xauth-to-do-x-over-ssh/</link>
		<comments>http://andrewbevitt.com/2009/02/11/install-xauth-to-do-x-over-ssh/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 22:25:53 +0000</pubDate>
		<dc:creator>AndyB</dc:creator>
				<category><![CDATA[Everyday Life]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[X11]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://andrewbevitt.com/2009/02/11/install-xauth-to-do-x-over-ssh/</guid>
		<description><![CDATA[<br/><p>I just spent an hour trying to figure out why I could run firefox over ssh from two remote offices but not from a third. The DISPLAY variable was not set when I connected with:<br /> ssh -X user@host</p> <p>Turns out that xauth is not installed by default (on Ubuntu Server). I vaguely remember figuring [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I just spent an hour trying to figure out why I could run firefox over ssh from two remote offices but not from a third. The DISPLAY variable was not set when I connected with:<br />
<code>ssh -X user@host</code></p>
<p>Turns out that xauth is not installed by default (on Ubuntu Server). I vaguely remember figuring that out before but never documenting it. So now I have.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbevitt.com/2009/02/11/install-xauth-to-do-x-over-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Here we go again</title>
		<link>http://andrewbevitt.com/2009/01/14/here-we-go-again/</link>
		<comments>http://andrewbevitt.com/2009/01/14/here-we-go-again/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 11:33:27 +0000</pubDate>
		<dc:creator>AndyB</dc:creator>
				<category><![CDATA[Everyday Life]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[windows]]></category>

	<!-- AutoMeta Start -->
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://andrewbevitt.com/?p=162</guid>
		<description><![CDATA[<br/><p>It is almost guaranteed that the upcoming Windows 7, which I&#8217;m beta testing tomorrow, the ongoing developments of OS X and the expanding percentage of X11 desktops will bring forth an abundance of articles, lists, and flame wars on how one or the other is a killer for the rest. Just <a href="http://www.networkworld.com/community/node/37086">like this piece</a>.</p> [...]]]></description>
			<content:encoded><![CDATA[<br/><p>It is almost guaranteed that the upcoming Windows 7, which I&#8217;m beta testing tomorrow, the ongoing developments of OS X and the expanding percentage of X11 desktops will bring forth an abundance of articles, lists, and flame wars on how one or the other is a killer for the rest. Just <a href="http://www.networkworld.com/community/node/37086">like this piece</a>.</p>
<p>While I strongly suspect that this is a flame-bait article; and some of the reply comments already have fallen for it, if it is; each desktop environment is salient. Given enough time all things change. But the current computer operating interface is a desktop environment. There are 3 at the moment and for the foreseeable future that is how it will stay. Buy why, oh why, do we keep getting this sort of article?</p>
<p>Because people only see what their bubble of life includes. There are 6.5 billion people on the planet; no-one can profess to knowing anywhere near 1% of that. Yet we all think because a majority of who / what we know does / thinks something that a planetary majority must also.</p>
<p>WRONG!</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbevitt.com/2009/01/14/here-we-go-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Tutorial: MultiWAN</title>
		<link>http://andrewbevitt.com/2008/07/08/new-tutorial-multiwan/</link>
		<comments>http://andrewbevitt.com/2008/07/08/new-tutorial-multiwan/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 14:41:31 +0000</pubDate>
		<dc:creator>AndyB</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[multiwan]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[tutorial]]></category>

	<!-- AutoMeta Start -->
	<category>tutorials</category>
	<category>tutorial</category>
	<category>multiwan</category>
	<category>direct</category>
	<category>uploaded</category>
	<category>link</category>
	<category>routing</category>
	<category>linux</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://andrewbevitt.com/?p=123</guid>
		<description><![CDATA[<br/><p>I&#8217;ve just uploaded a new tutorial to the <a href="http://andrewbevitt.com/tutorials/">Tutorials</a> page on MultiWAN Routing with a Linux server (<a href="http://andrewbevitt.com/tutorials/linux-multiwan-router/">direct link</a>).</p>]]></description>
			<content:encoded><![CDATA[<br/><p>I&#8217;ve just uploaded a new tutorial to the <a href="http://andrewbevitt.com/tutorials/">Tutorials</a> page on MultiWAN Routing with a Linux server (<a href="http://andrewbevitt.com/tutorials/linux-multiwan-router/">direct link</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbevitt.com/2008/07/08/new-tutorial-multiwan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Huawei E220 Optus Wireless</title>
		<link>http://andrewbevitt.com/2008/07/04/huawei-e220-optus-wireless/</link>
		<comments>http://andrewbevitt.com/2008/07/04/huawei-e220-optus-wireless/#comments</comments>
		<pubDate>Fri, 04 Jul 2008 12:09:56 +0000</pubDate>
		<dc:creator>AndyB</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[3G]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[optus]]></category>
		<category><![CDATA[wireless internet]]></category>

	<!-- AutoMeta Start -->
	<category></category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://andrewbevitt.com/?p=105</guid>
		<description><![CDATA[<br/><p>At work recently, to meet our growing on-the-go connection demands, we got hold of some of the Optus Wireless USB modems. The rebadged Huawei E220. In the spirit of my previous posts on <a href="http://andrewbevitt.com/2007/07/18/nextg-over-lan/">Telstra NextG</a> under Linux, I want to use these with Linux. They are natively supported in recent kernels which is great [...]]]></description>
			<content:encoded><![CDATA[<br/><p>At work recently, to meet our growing on-the-go connection demands, we got hold of some of the Optus Wireless USB modems. The rebadged Huawei E220. In the spirit of my previous posts on <a href="http://andrewbevitt.com/2007/07/18/nextg-over-lan/">Telstra NextG</a> under Linux, I want to use these with Linux. They are natively supported in recent kernels which is great news. There were a few gotchas with Ubuntu 8.04 though.<span id="more-105"></span></p>
<p><strong>Gotcha 1</strong><br />
It seems in there is a bug in the airprime module in the kernel I am running. There is a <a href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/241484">bug report</a> for the error and fortunately an easy enough fix.<br />
<code>$ uname -ar<br />
Linux pegasus 2.6.24-19-generic #1 SMP Wed Jun 18 14:15:37 UTC 2008 x86_64 GNU/Linux</code></p>
<p>To fix you need to blacklist the airprime module so it does not load. This of course is only until a proper code fix / new kernel is released. You can read about how to black list <a href="http://ubuntuforums.org/showpost.php?p=4975798&#038;postcount=2">here</a>. <em>You will need to unplug / replug the device after removing the module and blacklisting.</em></p>
<p><strong>Gotcha 2</strong><br />
I use pppconfig and the associated pon / poff / plog commands to dial up. There are graphical programs available but the CLI ones are so much quicker for me: plug in modem, open terminal, run pon optus, use connection.</p>
<p>In the case of the Next G device pppconfig managed to create a working set of ppp scripts. Unfortunately that wasn&#8217;t the case for the OWB device. Here are the ppp and chat scripts I am using the connect:</p>
<pre>cat /etc/ppp/peers/optus
hide-password
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/optus"
/dev/ttyUSB0
115200

user ppp
password ppp

noipdefault
replacedefaultroute
defaultroute
persist
noauth
usepeerdns

user ppp
password ppp

debug
local
novj
nodeflate
nobsdcomp
passive

holdoff 5
lcp-echo-interval 0
crtscts</pre>
<p><strong>AND</strong></p>
<pre>cat /etc/chatscripts/optus
TIMEOUT 3
ABORT BUSY
ABORT 'NO CARRIER'
ABORT VOICE
ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE'
ABORT 'NO ANSWER'
ABORT DELAYED
"" ATZ

OK AT&#038;FE0Q0V1
OK 'AT+CGDCONT=1,"IP","Connect"'

OK ATDT*99***1#
TIMEOUT 30
CONNECT ""</pre>
<p>Happy interneting!</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbevitt.com/2008/07/04/huawei-e220-optus-wireless/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KVM: Virtualising Servers</title>
		<link>http://andrewbevitt.com/2007/11/18/kvm-virtualising-servers/</link>
		<comments>http://andrewbevitt.com/2007/11/18/kvm-virtualising-servers/#comments</comments>
		<pubDate>Sun, 18 Nov 2007 13:56:11 +0000</pubDate>
		<dc:creator>AndyB</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[kvm]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[login]]></category>

	<!-- AutoMeta Start -->
	<category>tonight</category>
	<category>login</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://andrewbevitt.com/2007/11/18/kvm-virtualising-servers/</guid>
		<description><![CDATA[<br/><p>Tonight at <a href="http://www.newcastlelug.org/">LOGIN</a> the topic is Virtualisation. I&#8217;ve spent the last week playing with <a href="http://www.newcastlelug.org/">KVM</a> to virtualise some of our servers at work. So the meeting topic will be interesting from the point of view of comparing technologies to that end. However, I have also been asked to briefly discus KVM.</p> <p>KVM is [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Tonight at <a href="http://www.newcastlelug.org/">LOGIN</a> the topic is Virtualisation. I&#8217;ve spent the last week playing with <a href="http://www.newcastlelug.org/">KVM</a> to virtualise some of our servers at work. So the meeting topic will be interesting from the point of view of comparing technologies to that end. However, I have also been asked to briefly discus KVM.<span id="more-100"></span></p>
<p>KVM is essentially comprised of two components. A Linux kernel module, more on this later, and a userspace application that uses the kernel module to provide a virtual machine. The userspace application is a fork of QEMU. <em>I would actually suggest KVM&#8217;s QEMU and the real QEMU are parallel developments of QEMU; and not a literal fork. Yet.</em></p>
<p>At work we had 7 servers all running with (on average) under 10% utilisation. Needless to say that is chewing through power and hardware in ways that we don&#8217;t need to as a NFP. Anyway we recently got two new servers so I&#8217;ve been virtualising the 7 down to 2. I&#8217;ll post the write up I&#8217;m preparing for LOGIN when it&#8217;s done which will details the howto information.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbevitt.com/2007/11/18/kvm-virtualising-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: NextG over LAN w/ SmoothWall</title>
		<link>http://andrewbevitt.com/2007/10/03/howto-nextg-over-lan-w-smoothwall/</link>
		<comments>http://andrewbevitt.com/2007/10/03/howto-nextg-over-lan-w-smoothwall/#comments</comments>
		<pubDate>Wed, 03 Oct 2007 07:46:53 +0000</pubDate>
		<dc:creator>AndyB</dc:creator>
				<category><![CDATA[Everyday Life]]></category>
		<category><![CDATA[bigpond]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nat]]></category>
		<category><![CDATA[NextG]]></category>
		<category><![CDATA[smoothwall]]></category>
		<category><![CDATA[telstra]]></category>

	<!-- AutoMeta Start -->
	<category>ttys0|ttys1|ttys2|ttys3|ttyusb3|isdn1|isdn2|pppoe|adsl</category>
	<category>ttys0|ttys1|ttys2|ttys3|isdn1|isdn2|pppoe|adsl</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://andrewbevitt.com/2007/10/03/howto-nextg-over-lan-w-smoothwall/</guid>
		<description><![CDATA[<br/><p>As mentioned before in <a href="http://andrewbevitt.com/2007/07/18/nextg-over-lan/">Next G over LAN</a> my phone line has a high signal attenuation, too high for me to get ADSL. Essentially this means there is too much copper cable between the exchange and my house. I need some form of broadband at home so I turned to wireless. The 3G HSDPA [...]]]></description>
			<content:encoded><![CDATA[<br/><p>As mentioned before in <a href="http://andrewbevitt.com/2007/07/18/nextg-over-lan/">Next G over LAN</a> my phone line has a high signal attenuation, too high for me to get ADSL. Essentially this means there is too much copper cable between the exchange and my house. I need some form of broadband at home so I turned to wireless. The 3G HSDPA networks provide the speed I need, and the UTMS 850Mhz network from Telstra (i.e. Next G) has coverage for where I live. So I&#8217;m using Next G for home internet.</p>
<p>Recently there have been several questions how I got this working. This post goes through the steps in more detail. In fact I reinstalled SmoothWall myself last night to upgrade to the official version 3.0 release so I wrote this as I went. </p>
<p><strong>UPDATE JUNE 2009:</strong> See <a href="#comment-57">comments</a> about using the &#8220;Option Driver&#8221; instead of Airprime &#8211; Airprime is, since 2.6.27, deprecated. The Option Driver does not require patching.<span id="more-94"></span></p>
<p>At home Prue and I have two laptops, a media server, and a few other random computers that I sometimes use. In any given time at least two computers will want access to the internet. With a typical Ethernet router this wouldn&#8217;t matter the router would NAT both computers and let them share the connection. With a USB modem only one computer can be connected at a time, because the modem can only be attached to one computer at a time. Unfortunately the only modems Telstra/Bigpond supply have USB connections.</p>
<p>SmoothWall is a custom Linux distribution that, in very basic terms, does the job of the Ethernet router. SmoothWall comes in two forms; a) the Express edition which is free; and b) a commercial version which is not. I am using the Express edition in this how-to. Using SmoothWall I can dial up my Next G connection and SmoothWall will perform NAT for all computers on the LAN. All that remains is to successfully configure SmoothWall to actually dial out over the USB modem. </p>
<p>Can it be done? Yes. Does it work out of the box? Sort of. As explained on http://quozl.netrek.org/bp3-usb/ the modem works with the usbserial kernel module but only at speeds of up to 60Kbps (kilobits) which is not much better than dial up. However the modem also works, and at full speed, with a patched version of the airprime module. There&#8217;s a catch: firstly the airprime module is not compiled into the SmoothWall kernel by default so the kernel must be recompiled, and even if it was, to patch the airprime module you would need to recompile your kernel. <em>Compiling a kernel can be somewhat of a daunting prospect.</em></p>
<p>But, it certainly works. And for me speed wise; on average from a reliable server we get down speeds of 275KB/s (kilobytes) which is faster than standard 1.5Mbps ADSL and the E1 (2Mbps) link at work. With a recent firmware upgrade theoretical speeds should approach 3Mbps (~385Kbps) but I haven&#8217;t done the firmware upgrade so I can&#8217;t verify that. These figures of course will depend on the signal strength and the server you are accessing &#8211; the same can, generally, be said for ADSL.</p>
<p><em>Note: SmoothWall also has other features such as POP3 virus scanning, Intrusion Detection and a few other fancy bits and bobs. You can look at them in your own time.</em></p>
<p><strong>On with the show: How to setup SmoothWall</strong></p>
<p>What you need:</p>
<ul>
<li>A computer to run SmoothWall on: I am using an old P3 866 however, in the past, I have used P2 400&#8242;s and even 486 machines for LAN gateways. Keep in mind that for USB modems you need a USB port so a 486 might not be so great. You will also need a 5GB or greater hard drive that you are willing to format.</li>
<li>A Maxon USB Modem: There are two options (see photos). Personally I use the blue powered device as it was slightly cheaper to buy, and from memory offered better plans. However we have several of the orange USB stick devices at work. They both work the same.</li>
<li>SmoothWall Express 3.0 Developer Edition. You must get the Developer Edition &#8211; you need some of the tools that come with it.</li>
<li>A copy of the Linux kernel source code (get the tar.bz2 it&#8217;s smaller).</li>
<li>Some experience with the Linux command line.</li>
<li>I use vi for editing, SmoothWall doesn&#8217;t have anything else installed. I suggest learning the basics of vi now.</li>
<li><strong>Time and Patience!</strong> Work through this at a comfortable pace. Ignoring the kernel compile (which takes a long time on older computers) I can setup a box in a little under 40 minutes. Don&#8217;t try and match my pace, learn what you are doing.</li>
<li>Read some of the quick introductions to SmoothWall. Pay close attention to what GREEN (safe), PURPLE (untrusted/wireless), ORANGE (dmz), and RED (internet/unsafe) networks are.</li>
<li><em>A working internet connection is also useful.</em></li>
</ul>
<p><strong>Device Photos</strong><br />
<a href='http://andrewbevitt.com/wp-content/uploads/2007/10/orange-nextg-modem.png' title='Orange NextG Modem'><img src='http://andrewbevitt.com/wp-content/uploads/2007/10/orange-nextg-modem.thumbnail.png' alt='Orange NextG Modem' /></a><a href='http://andrewbevitt.com/wp-content/uploads/2007/10/blue-nextg-modem.png' title='Blue NextG Modem'><img src='http://andrewbevitt.com/wp-content/uploads/2007/10/blue-nextg-modem.thumbnail.png' alt='Blue NextG Modem' /></a></p>
<p><strong>Step 0: Preparation</strong></p>
<ol>
<li>Download SmoothWall Express 3.0 Developer Edition.</li>
<li>Burn the ISO as an image to a CD.</li>
<li>Put the burnt CD into your intended SmoothWall computer and power it up.</li>
<li>Note: You need to tell your computer to boot from CD; this is a bios setting.</li>
</ol>
<p><strong>Step 1a: Installing</strong></p>
<ol>
<li>A welcome screen will be displayed, hit enter/return to begin the install.</li>
<li>You should receive a few warning messages that your hard drive will be formatted. Press the OK buttons.</li>
<li>You will see a message about the drive being partitioned and then some file systems being created. Wait.</li>
<li>Once the file systems have been created SmoothWall will begin installing files. Once again: Wait.</li>
<li>When the Congratulations screen is displayed you can remove the CD and click OK. I&#8217;m assuming most people don&#8217;t have back up settings, as this is a first install, but if you do enter the disk and let SmoothWall do its thing. Otherwise select No.</li>
</ol>
<p><strong>Step 1b: Configuration</strong></p>
<ol>
<li>You keyboard layout is up to you, but I chose US; if you have a pound symbol UK is also an option.</li>
<li>Your machines Hostname is the name you want your SmoothWall computer to have on the LAN. I use smoothwall (the default) because that&#8217;s what best describes the machine, at least IMO.</li>
<li>I use an Open default security policy. Once again, choose something appropriate to your needs.</li>
<li>At the Network configuration menu choose: Network configuration type. Select &#8220;GREEN (RED is modem/ISDN)&#8221; unless you have a non-basic LAN, in which case you should have an idea which choice to make. For example: If you have an open wireless access point you may choose &#8220;GREEN + PURPLE (RED is modem/ISDN)&#8221; and make the PURPLE component be your wireless clients.</li>
<li>At the Network configuration menu choose: Drivers and card assignments. Select probe. When each card is detected assign it to a network interface (i.e. GREEN or PURPLE or ORANGE). I have one network card in my SmoothWall box which I assign as the GREEN interface.</li>
<li>At the Network configuration menu choose: Address settings. Configure the GREEN interface appropriately for your network. I use IP Address 192.168.1.5 with a Network Mask of 255.255.255.0.</li>
<li>If you chose a multiple network type (i.e. GREEN + PURPLE) repeat the above for each other interface. You may also need to manually probe for the extra network device using the Drivers and card assignments menu item. Don&#8217;t worry about DNS and Gateway settings. Next G essentially amounts to dial up &#8211; so these are provided/set at connection.</li>
<li>At the Section menu the only option we are concerned with is the DHCP server configuration. If you are running another DHCP server on your LAN (I am using my Ethernet router as a LAN switch it has a DHCP server) I recommend disabling it and using SmoothWall&#8217;s DHCP server. Or reconfigure your DHCP server to set clients default gateway to your SmoothWall IP.</li>
<li>In the DHCP server configuration check Enabled and then enter your desired values. If you have a small network the defaults should be fine.</li>
</ol>
<p><em>When you&#8217;re ready select Finished.</em></p>
<p><strong>Step 1c: Passwords</strong></p>
<ol>
<li>Select sensible passwords: a combination of upper and lower case, numbers, and punctuation is recommended. Of course the letter q will also work.</li>
<li>Don&#8217;t use the same password for the admin and root users. The admin password will be sent as plain text over your network when using the standard web interface (you can use ssl to mitigate this if you need/want).</li>
</ol>
<p><em>Press OK to reboot the machine and watch while SmoothWall boots.</em></p>
<p><strong>Step 2: The Hard Stuff</strong></p>
<ol>
<li>Get a copy of the Linux kernel source onto your SmoothWall computer. WinSCP is useful if you downloaded on a Windows machine, or plain scp if on a *nix OS. SCP uses SSH to transfer files across a network &#8211; so first you will need to enable SSH. Visit http://<ip address>:81 in your browser login with your admin user name and password. Under Services->Remote Access check SSH and click save. Now you can access the box as root over ssh/scp. Note: The SSH port is 222 by default. If you wish to change that edit /usr/etc/sshd_config. I have changed mine with no ill effects but &#8230; I have no idea if that will break something.</ip></li>
<li>Login as the root user.</li>
<li>Extract the kernel source:<br />
<code>    cd /usr/src<br />
    tar xjf /path/to/linux-2.6.22.9.tar.bz2 # replace with the appropriate version<br />
</code></li>
<li>Patch the kernel source:<br />
<code>    vi linux-2.6.22.9/drivers/usb/serial/airprime.c # replace with the appropriate version<br />
</code></p>
<ol>
<li>Quick word on vi: to insert text press i then type your text, when done hit esc. To save and exit: ZZ or :wq</li>
<li>You want to add the line starting with a + (roughly line 22)<br />
<code>  { USB_DEVICE(0x0c88, 0x17da) }, /* Kyocera Wireless KPC650/Passport */<br />
  { USB_DEVICE(0x1410, 0x1110) }, /* Novatel Wireless Merlin CDMA */<br />
+ { USB_DEVICE(0x16d8, 0x6280) }, /* Maxon BP3-USB 3G Bigpond Telstra */<br />
  { },<br />
</code></li>
</ol>
</li>
<li>Configure the kernel<br />
<code>    cd linux-2.6.22.9 # replace with appropriate version<br />
    make menuconfig<br />
</code></p>
<ul>
<li>Configuring a kernel is documented in many places I&#8217;m not going to duplicate that here.</li>
<li>There are a few things you definitely need to set though:
<ul>
<li>Networking->Networking Options->Network packet filtering framework (Netfilter)
<ol>
<li>Say YES to everything under Core and IP Netfilter Configuration.</li>
<li>It might not all be necessary but it saves working out what is.</li>
</ol>
</li>
<li>Networking->Networking Options
<ul>
<li>Say YES to IP: advanced router</li>
<li>Say YES to IP: tunneling</li>
<li>Say YES to IP: TCP syncookie support</li>
</ul>
</li>
<li>Device Drivers->Network device support
<ul>
<li>Make sure your device is selected.</li>
<li>Say YES to PPP (point-to-point) support</li>
<li>Say YES to everything that shows up below PPP support</li>
</ul>
</li>
<li>Device Drivers->USB Support->USB Serial Converter support
<ul>
<li>Say YES to USB Serial Converter support</li>
<li>Say YES to USB AirPrime CDMA Wireless Driver</li>
</ul>
</li>
<li><em>Optional:</em> Under General give a local version append &#8220;nextg&#8221;</li>
<li><em>Optional:</em> Turn off CPU Frequency Scaling if not supported/needed</li>
</ul>
</li>
<li>There are many other kernel options you may want to investigate, but that should get you started.</li>
<li>You might want to consider making some parts into kernel modules (hit M instead of Y).</li>
</ul>
</li>
<li>Save the config in a file called &#8220;.config&#8221; (without the quotes) and then compile. Note this will take some time:<br />
<code>    make<br />
    make modules_install<br />
</code></li>
<li>When the kernel has finished compiling<br />
<code>    cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.22.9-nextg<br />
    vi /etc/lilo.conf<br />
</code></p>
<ul>
<li>You need to change the line<br />
<code>    default=SmoothWall<br />
    to<br />
    default=SW-NextG<br />
</code></li>
<li>Add the following two lines at the end (note the second should be intended i.e. hit the tab key)<br />
<code>    image=/boot/vmlinuz-2.6.22.9-nextg<br />
      label=SW-NextG<br />
</code></li>
<li>Save and run: lilo</li>
</ul>
</li>
</ol>
<ul>
<li>You MUST run: lilo &#8211; <em>THIS IS IMPORTANT</em> &#8211; Don&#8217;t reboot until lilo runs and exits without any errors.</li>
<li>Reboot the computer: reboot</li>
<li>On boot up you should see your new kernel selected in the boot menu (i.e. LILO&#8217;s menu). If something goes wrong and the kernel does not boot properly, hit the reset button and choose the old kernel from the boot menu. Once booted reconfigure your new kernel to resolve the problem(s) and try again. Remember each time you change the kernel image or /etc/lilo.conf you should run: lilo.</li>
</ul>
<p><strong>Step 3: Device Testing</strong></p>
<ul>
<li>Once your new kernel is running login as root and run:<br />
<code>    dmesg | tail<br />
</code></li>
<li>Plug in your USB modem and re-run the above, all going well you should see something like<br />
<code>usb 1-2: new full speed USB device using uhci_hcd and address 2<br />
usb 1-2: configuration #1 chosen from 1 choice<br />
usbcore: registered new interface driver usbserial<br />
drivers/usb/serial/usb-serial.c: USB Serial support registered for generic<br />
usbcore: registered new interface driver usbserial_generic<br />
drivers/usb/serial/usb-serial.c: USB Serial Driver core<br />
drivers/usb/serial/usb-serial.c: USB Serial support registered for airprime<br />
airprime 1-2:1.0: airprime converter detected<br />
usb 1-2: airprime converter now attached to ttyUSB0<br />
usb 1-2: airprime converter now attached to ttyUSB1<br />
usb 1-2: airprime converter now attached to ttyUSB2<br />
airprime 1-2:1.1: airprime converter detected<br />
usb 1-2: airprime converter now attached to ttyUSB3<br />
usb 1-2: airprime converter now attached to ttyUSB4<br />
usb 1-2: airprime converter now attached to ttyUSB5<br />
airprime 1-2:1.2: airprime converter detected<br />
usb 1-2: airprime converter now attached to ttyUSB6<br />
usb 1-2: airprime converter now attached to ttyUSB7<br />
usb 1-2: airprime converter now attached to ttyUSB8<br />
usbcore: registered new interface driver airprime<br />
</code></li>
<li>If you don&#8217;t get something like this make sure you patched properly and that you did select AirPrime when configuring the kernel. If still no luck after that then Google and email are your friends. I know, I know. That is indicative of Linux how-to material. However, I have, deliberately, left some big holes, big enough to drive a barn through, in the kernel compile section; there could be any number of reasons something went wrong.</li>
</ul>
<p><strong>Step 4: Patching SmoothWall Web Interface</strong></p>
<ul>
<li>SmoothWall doesn&#8217;t really know about /dev/ttyUSB* devices, so we need to add them manually so we can configure through the web interface.</li>
<li>There are two files I want to change: /httpd/cgi-bin/pppsetup.cgi and /usr/bin/smoothwall/writedhcp.pl. The first controls the PPP settings page. The second generates a DHCP config file. If you are not running DHCP Server on your SmoothWall computer then you can ignore the second file.</li>
<li><em>Note: Don&#8217;t actually write the +/- characters: + is add this line; &#8211; is remove/replace this line</em></li>
<li><code>vi /http/cgi-bin/pppsetup.cgi</code>
<ul>
<li>Search (hint: hit / and then type the search string) for ttyS3</li>
<li>Change this line:<br />
<code>- unless ($pppsettings{'COMPORT'} =~ /^(ttyS0|ttyS1|ttyS2|ttyS3|isdn1|isdn2|pppoe|adsl)$/) {<br />
+ unless ($pppsettings{'COMPORT'} =~ /^(ttyS0|ttyS1|ttyS2|ttyS3|ttyUSB3|isdn1|isdn2|pppoe|adsl)$/) {<br />
</code></li>
<li>Add a line after this:<br />
<code>selected{'COMPORT'}{'ttyS3'} = '';<br />
+ selected{'COMPORT'}{'ttyUSB3'} = '';<br />
</code></li>
<li>Add a line after this:<br />
<code>        &lt;option VALUE='ttyS3' $selected{'COMPORT'}{'ttyS3'}&gt;$tr{'modem on com4'}<br />
+         &lt;option VALUE='ttyUSB3' $selected{'COMPORT'}{'ttyUSB3'}&gt;NextG Wireless<br />
</code></li>
</ul>
</li>
<li><code>vi /usr/bin/smoothwall/writedhcp.pl</code>
<ul>
<li>Search for max-lease-time and add after this:<br />
<code>print FILE "\tmax-lease-time $maxleasetime;\n";<br />
+ print FILE "\tauthoritative;\n";<br />
</code></li>
</ul>
</li>
</ul>
<p>Reboot the computer again.</p>
<p><strong>Step 5: Configuring the Next G Dialer</strong></p>
<ol>
<li>Login to the web interface as admin again.</li>
<li>Under Services->Time check the Timezone and Time are correct.</li>
<li>Under the Maintenance menu select Passwords: Specify a password for the dial user. The dial user can connect / disconnect but not configure SmoothWall.</li>
<li>Create a new connecton: Networking->PPP<br />
<code>  Name: NextG<br />
  Interface: NextG Wireles<br />
  Number: *99#<br />
  Username: YOUR USERNAME<br />
  Password: YOUR PASSWORD<br />
  Method: PAP or CHAP<br />
</code></li>
<li><strong>Do a test dial.</strong></li>
<li><em>Fingers crossed after 5 seconds SmoothWall should come back saying you are connected.</em></li>
</ol>
<p><strong>All Done</strong><br />
You should now have a working SmoothWall Express Next G Gateway for your LAN. If something is not working I suggest adding the following to to /etc/ppp/options and then running tail -f /var/log/messages and watch what happens when you try and connect. I&#8217;ll try my best to respond to email queries but some problems can&#8217;t be solved without sitting down at the machine.<br />
<code># Add to /etc/ppp/options to increase log file output<br />
debug<br />
dump<br />
</code></p>
<p>I hope this has been helpful.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbevitt.com/2007/10/03/howto-nextg-over-lan-w-smoothwall/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Xorg 7.3 Hotplug Output &#8230; Finally</title>
		<link>http://andrewbevitt.com/2007/09/07/xorg-73-hotplug-output-finally/</link>
		<comments>http://andrewbevitt.com/2007/09/07/xorg-73-hotplug-output-finally/#comments</comments>
		<pubDate>Thu, 06 Sep 2007 23:36:41 +0000</pubDate>
		<dc:creator>AndyB</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[linux]]></category>

	<!-- AutoMeta Start -->
	<category>primary</category>
	<category>laptop</category>
	<category>computer</category>
	<category>home</category>
	<category>work</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://andrewbevitt.com/2007/09/07/xorg-73-hotplug-output-finally/</guid>
		<description><![CDATA[<br/><p>I use a laptop as my primary computer at both work and home &#8211; and I like using Linux as a Desktop OS. However the one thing that has bugged me for many years is the difficulties experienced when attaching an external monitor. Today with the <a href="http://arstechnica.com/journals/linux.ars/2007/09/05/xorg-releases-version-7-3-gets-hotplugging-support">release</a> of <a href="http://www.x.org/wiki/">Xorg 7.3</a> there is support [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I use a laptop as my primary computer at both work and home &#8211; and I like using Linux as a Desktop OS. However the one thing that has bugged me for many years is the difficulties experienced when attaching an external monitor. Today with the <a href="http://arstechnica.com/journals/linux.ars/2007/09/05/xorg-releases-version-7-3-gets-hotplugging-support">release</a> of <a href="http://www.x.org/wiki/">Xorg 7.3</a> there is support for hotplugging external monitors. Of course this is the first iteration of the support so, as they say, the proof will be in the pudding; but I have high hopes.</p>
<p>On a similar note the <a href="http://kde.org/announcements/announce-4.0-beta2.php">KDE 4.0-beta2</a> has been released. KDE 4.0 is looking to be very promising. All I need now is for yesterdays announcement about Linux ATI drivers and my on order hp8510p will look very nice <img src='http://andrewbevitt.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  &#8211; who needs functionality if your desktop looks pretty?</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbevitt.com/2007/09/07/xorg-73-hotplug-output-finally/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NextG Over LAN</title>
		<link>http://andrewbevitt.com/2007/07/18/nextg-over-lan/</link>
		<comments>http://andrewbevitt.com/2007/07/18/nextg-over-lan/#comments</comments>
		<pubDate>Wed, 18 Jul 2007 13:35:46 +0000</pubDate>
		<dc:creator>AndyB</dc:creator>
				<category><![CDATA[Everyday Life]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[NextG]]></category>

	<!-- AutoMeta Start -->
	<category>nextg</category>
	<category>modem</category>
	<category>comparing</category>
	<category>shiny</category>
	<category>computers</category>
	<category>wireless</category>
	<category>options</category>
	<category>spent</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://andrewbevitt.com/2007/07/18/nextg-over-lan/</guid>
		<description><![CDATA[<br/><p>I&#8217;ve spent the last week or so comparing options for how I could share the new shiny NextG connection between the various computers that Prue and I have. The wireless modem has a usb connection, so it doesn&#8217;t really work well for a LAN. However with a little patience you can easily configure a Linux [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I&#8217;ve spent the last week or so comparing options for how I could share the new shiny NextG connection between the various computers that Prue and I have. The wireless modem has a usb connection, so it doesn&#8217;t really work well for a LAN. However with a little patience you can easily configure a Linux gateway and firewall machine to dial up the modem and then perform NAT just like any ADSL router would. In fact this is how I shared ADSL way back in 2001 when routers were expensive. <span id="more-85"></span></p>
<p>Initially that is all I did, installed Ubuntu 7.04 and ran pppd manually, however that isn&#8217;t exactly a Prue friendly option. But it was a proof that one can connect Linux to the NextG network. I followed the instructions <a href="http://quozl.netrek.org/bp3-usb/">here</a>, essentially you:</p>
<ol>
<li>Patch the airprime driver in the kernel source and compile a new kernel.</li>
<li>Restart your machine and load the airprime module &#8211; I actually compiled it into the kernel and not as a module but feel free to do which ever way suits you.</li>
<li>Configure a ppp dialing profile called NextGWireless (you can choose any name you like). I used pppconfig. It is all fairly straight forward just make sure you choose CHAP authentication and use /dev/ttyUSB3 as the device. <em>PAP won&#8217;t finalise the connection and chat just doesn&#8217;t connect full stop.</em></li>
<li>Issue the command: pon NextGWireless dump nodetach</li>
<li>Your NextG connection should be up and running swap to another console login and test. Swap back to the original console and Ctrl+C the pon command to kill off the connection. Later you can connect with pon NextGWireless and then run poff to disconnect.</li>
</ol>
<p>That worked and the speeds were reasonable. But as mentioned Prue isn&#8217;t exactly a Linux shell junkie. So I decided to investigate some of the packages that are browser interface driven. I have looked at four different options:</p>
<ol>
<li>Webmin &#8211; talking to the original Ubuntu install.</li>
<li>eBox &#8211; a customised Debian distribution.</li>
<li>Smoothwall &#8211; gateway and firewall distribution.</li>
<li>IPCop &#8211; a fork of Smoothwall but essentially the same thing.</li>
</ol>
<p>I can&#8217;t really pass judgment on Webmin as this was the first package I tried and always intended to blow it away to try the others. So if you are familiar with Webmin (which I am not) then it may suit your needs. I also needed to be able to invoke the ppp session from the browser interface, it was not immediately clear if I could do that with Webmin, but I wouldn&#8217;t be surprised if you can.</p>
<p>Each of the others I have &#8220;tried&#8221; and at the end of the day I am running SmoothWall Express 3.0-degu-i386. <strong>Note: Smoothwall 3 is beta.</strong> I am also running the Developer edition because the kernel needs to be recompiled after patching the airprime driver. <em>I also needed to modify some of the Smoothwall interface code to recognise a USB modem.</em></p>
<p>IPCop was fairly promising &#8211; it and Smoothwall have a lot in common still &#8211; however IPCop only comes with a 2.4 version of the Linux kernel which supports neither the usbserial or airprime drivers nor were any compilers or development tools installed to build a 2.6 kernel. <em>And that is not even touching the issues with migrating from 2.4 to 2.6 &#8211; which from memory were pretty weird , but that is going back to when 2.5 was being developed.</em></p>
<p>eBox was promising, the interface is very schmick and the usbserial driver works out of the box. Unfortunately eBox had issues I could not resolve. Firstly you have to manually dial the connection from the shell &#8211; at this stage I was willing to teach Prue how to do that. And secondly airprime needed to be patched and the kernel recompiled, which I did, but I could not get it to boot properly. Besides being stuck using the usbserial driver (which limits connection speed to 60KB/s due to the data transfer architecture used) I had problems with the eBox firewall and proxy. <strong>I could not access GMail</strong> and other random sites for example slashdot worked but digg.com didn&#8217;t, works website was accessible but not the Linux server running ssh (even from a console on the eBox machine). I tried disabling all the content filtering and proxying and then nothing worked.</p>
<p>If I was on a cabled connection and needed to filter content eBox would have been superb, but for my needs it is still a little kludgey. I intend to check back with eBox in a few years as it definitely shows promise.</p>
<p>Onto Smoothwall. I tried version 2 &#8211; its a no goer only has a 2.4 kernel and upgrades were pretty much out of the question. Which left me with using the version 3 beta. Personally I don&#8217;t mind using beta software and in this case I wouldn&#8217;t really call it beta as in &#8220;unstable&#8221; but beta as in &#8220;still being feature refined&#8221;. Anyway, as I said earlier I downloaded the Developer edition of Smoothwall Express (it&#8217;s free as opposed to the other versions), installed, and rebooted. <em>Note: Choose GREEN (modem / ISDN is RED) as the network.</em></p>
<p>I already had a copy of the 2.6.22 kernel source code so I used WinSCP to copy the source tar ball to the new Smoothwall machine, logged in with ssh, performed the airprime patch, configured, compiled, updated lilo.conf, ran lilo (<strong>IMPORTANT: you must run lilo before rebooting when you update your lilo.conf file</strong>), and rebooted. Around 30 seconds later I had a working machine which recogised the wireless modem and I could dial using /dev/ttyUSB3 (as above).</p>
<p>Now the fun starts. Unfortunately after getting all of the above done I discovered that Smoothwall doesn&#8217;t really look for USB modems <img src='http://andrewbevitt.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  which almost made me cry, everything else worked wonderfully. Fortunately Smoothwall is more or less a GPL product and the web interface is perl cgi code. There are two modifications I made: 1) Updated pppsetup to allow for USB modems; and 2) Updated DHCP to be authoritative for the range.</p>
<p>Using the web interface enable ssh access and then ssh into the Smoothwall machine, remember to use port 222 when connecting.</p>
<p>1) Edit /httpd/cgi-bin/pppsetup.cgi &#8211; Everywhere you see ttyS3 put an identical line but use ttyUSB3. Except where you read $tr{&#8216;modem on com*&#8217;} replace that with: NextG Modem</p>
<p>2) Edit /usr/bin/smoothwall/writedhcp.pl &#8211; Add the line: <code>print FILE "\tauthoritative;\n";</code> after the line which prints out max-lease-time roughly line 130.</p>
<p>Now go back to your Smoothwall web interface and configure your connection to dial on the USB modem: Same settings as before and use PAP or CHAP as the authentication method. If you then go back to the control panel on the home page and hit connect it should dial and Smoothwall will manage the firewall changes and everything.</p>
<p>That&#8217;s all there is. Plug your Smoothwall box into a LAN switch and connect your other machines to it. Set the Smoothwall IP as the gateway address for your network and you should be able to access the internet from any machine. You can also enable the DHCP server on Smoothwall and it will tell machines automatically.</p>
<p>I know that the above is pretty raw, so if you are reading this and have questions please ask them. </p>
<p>I just completed a set of speed tests to include here<br />
Download: 1510kbps average, 1913kbps peak (which is faster than the old wired connection)<br />
Upload: 105kbps average, 175kbps peak (which is a little lower than the 384kbps specified but I don&#8217;t really mind, I&#8217;m not going to be uploading much since uploads are counted traffic)</p>
<p>Performance wise I&#8217;m happy and Prue has demonstrated herself capable of hitting the web interface, logging into Smoothwall as the dial user and clicking the connect button. So its a win win. And honestly I&#8217;ve enjoyed the new toy, it&#8217;s sad not having the cheap cabled competitive prices, but this is kind of fun too.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbevitt.com/2007/07/18/nextg-over-lan/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Postfix under Windows</title>
		<link>http://andrewbevitt.com/2007/06/28/postfix-under-windows/</link>
		<comments>http://andrewbevitt.com/2007/06/28/postfix-under-windows/#comments</comments>
		<pubDate>Thu, 28 Jun 2007 01:52:20 +0000</pubDate>
		<dc:creator>AndyB</dc:creator>
				<category><![CDATA[Work]]></category>
		<category><![CDATA[linux]]></category>

	<!-- AutoMeta Start -->
	<category>windows</category>
	<category>server</category>
	<category>servers</category>
	<category>version</category>
	<category>running</category>
	<category>personally</category>
	<category>work</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://andrewbevitt.com/2007/06/28/postfix-under-windows/</guid>
		<description><![CDATA[<br/><p>The servers here at work run a version of Windows Server. While personally I&#8217;m not a fan of running Windows as a server OS, working in a team, means working in a team. Anyway, there is considerable machine and network load with the current infrastructure, which we are fixing. New servers, reorganise the LAN a [...]]]></description>
			<content:encoded><![CDATA[<br/><p>The servers here at work run a version of Windows Server. While personally I&#8217;m not a fan of running Windows as a server OS, working in a team, means working in a team. Anyway, there is considerable machine and network load with the current infrastructure, which we are fixing. New servers, reorganise the LAN a bit, allocate resources across more machines. <em>All fairly generic.</em> This post is about <a href="http://www.postfix.org">postfix</a> though.</p>
<p>The current mail server has a per-user license cost and the spam and virus filtering is labour intensive. My preference would be to run Postfix with Spamassasin and ClamAV under Linux, as described (for starters): <a href="http://gentoo-wiki.com/HOWTO_Email:_A_Complete_Virtual_System">here</a> and <a href="http://www.howtoforge.com/perfect_setup_ubuntu_6.06">here</a>. Unfortunately, at least in this instance, postifx doesn&#8217;t run under Windows. We would like to get away from paying the licensing costs, so I decided to see if I could run postfix and a Windows server concrurrently.<br />
<span id="more-80"></span></p>
<p><strong>I should probably point out at this junction that I have no idea how high a mail load this option can really work for, nor do I feel like spaming myself to see. If you are running a mail server with thousands of customers then either learn to administer *nix, or, find a mail server that runs under Windows.</strong></p>
<p><a href="http://fabrice.bellard.free.fr/qemu/">QEMU</a> is a generic and open source machine emulator and virtualizer which will run linux as an emulated OS with near native speeds for the physical hardware. So, the plan is: <em>to setup qemu running under Windows and install a guest Linux version and then setup postfix on the guest.</em></p>
<ol>
<li>You can get QEMU for Windows from <a href="http://www.h7.dion.ne.jp/~qemu-win/">here</a>. You should also download the <a href="http://fabrice.bellard.free.fr/qemu/kqemu-1.3.0pre11.tar.gz">kqemu accelerator</a> (note this is a tar.gz file 7-zip or WinRAR are your friends). </li>
<li>Extract the QEMU zip file to some directory, I used C:\qemu but you can choose anything.</li>
<li>Extract the accelerator archive and find the kqemu.inf file; right-click it and select <strong>install</strong>. <em>Note: If you are running Vista (like me on the laptop where I set this up for testing) then this will not work. You need to do some other stuff: Download <a href="http://andrewbevitt.com/files/kqemu.inf">this inf file</a> and also get <a href="http://andrewbevitt.com/files/kqemu-regfix.reg">this registry fix</a>. Copy the inf file into the kqemu accelerator directory and do the right-click install. Then import the registry fix into your registry. Restart if you feel the need.</em> These fixes come from the <a href="http://qemu-forum.ipi.fi/">QEMU Forum</a>.</li>
<li>You need to start the kqemu accelerator service before running qemu: <em>net start kqemu</em> will do that. Once again Vista is different. The command is the same but it must be run from a console window acting as administrator. Right-click on the command prompt icon and select &#8220;Run as administrator&#8221;.</li>
<li><strong>QEMU is now ready to be used.</strong></li>
<li>Download any ISO image(s) you need to install the distribution of Linux you want to run.</li>
<li>Create a disk image: <em>qemu-img.exe create -f qcow2 postfix.img 5G</em> (create a 5G disk with the qcow2 qemu file system).</li>
<li>To start qemu change to the qemu directory and run: <em>qemu.exe -L . -cdrom C:\qemu\install.iso -boot d -hda postfix.img -net nic,vlan=1 -net user,vlan=1 -kernel-kqemu</em>.</li>
<li><strong>Work through the install of the selected distribution.</strong> You should also now work through the either of the two postfix virtual mail host setups linked above.</li>
<li>When you have finished installing and are ready to reboot: <em>qemu.exe -L . -hda postfix.img -kernel-kqemu -net nic,vlan=1 -net user,vlan=1 -tcp 25:10.0.2.15:25</em> &#8211; this will forward all incoming connections to the host on port 25 to port 25 on the guest. XP/Vista will ask you to confirm that you want to allow the port to be used make sure you allow it.</li>
</ol>
<p>That should be it. In all honesty the setup I will be deploying if this path is chosen will probably use SQLite running inside the virtual machine and storing the mail outside via a network share or similiar. Or since there are database servers running on the LAN pointing postfix to them across the network. Do not feel limited to the constraints of the virtual host mail setups.</p>
<p>If you try this please note that the network proxying done by qemu (at least the way described above) only supports TCP and UDP packets. So, for example, you will not be able to ping the outside world, but hey, it&#8217;s running under another host os where that will still work.</p>
<p>If you try this out yourself or have some extra ideas to improve performance feel free to leave a comment. If we decide to actually implement this for a live system I will do some benchmarking for performance and write more about it then.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbevitt.com/2007/06/28/postfix-under-windows/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

