<?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>adam.golebiowski.eu/blog &#187; Linux</title>
	<atom:link href="http://adam.golebiowski.eu/blog/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://adam.golebiowski.eu/blog</link>
	<description>here be dragons</description>
	<lastBuildDate>Wed, 09 Sep 2009 16:56:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Pingwinaria 2009</title>
		<link>http://adam.golebiowski.eu/blog/2009/03/14/pingwinaria-2009/</link>
		<comments>http://adam.golebiowski.eu/blog/2009/03/14/pingwinaria-2009/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 21:59:46 +0000</pubDate>
		<dc:creator>adamg</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PLUG]]></category>

		<guid isPermaLink="false">http://adam.golebiowski.eu/blog/?p=47</guid>
		<description><![CDATA[Bunkry, Wii (siatkówka, samochodziki) miodzik, wifi, stołówka, rozmowy do trzeciej nad ranem &#8230; Jednym słowem zajebiście]]></description>
			<content:encoded><![CDATA[<p>Bunkry, Wii (siatkówka, samochodziki) miodzik, wifi, stołówka, rozmowy do trzeciej nad ranem &#8230;</p>
<p>Jednym słowem zajebiście <img src='http://adam.golebiowski.eu/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://adam.golebiowski.eu/blog/2009/03/14/pingwinaria-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ethernet bridging with OpenVPN on vserver-enabled host</title>
		<link>http://adam.golebiowski.eu/blog/2009/02/03/ethernet-bridging-with-openvpn-on-vserver-enabled-host/</link>
		<comments>http://adam.golebiowski.eu/blog/2009/02/03/ethernet-bridging-with-openvpn-on-vserver-enabled-host/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 21:58:13 +0000</pubDate>
		<dc:creator>adamg</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PLD]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[english]]></category>

		<guid isPermaLink="false">http://adam.golebiowski.eu/blog/?p=30</guid>
		<description><![CDATA[Intro Openvpn&#8217;s ethernet bridging howto comes with simple setup scripts that you can use to bridge internal interface (e.g. eth0) with virtual one (e.g. tap0). Since standard system tools in PLD do not let you create tap interfaces, you have to care about creating one on your own. Hopefully you can use openvpn&#8217;s &#8211;mktun command [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;"><strong>Intro</strong></p>
<p>Openvpn&#8217;s <a href="http://openvpn.net/index.php/documentation/miscellaneous/ethernet-bridging.html">ethernet bridging howto</a> comes with simple setup scripts that you can use to bridge internal interface (e.g. eth0) with virtual one (e.g. tap0). Since standard system tools in PLD do not let you create tap interfaces, you have to care about creating one on your own. Hopefully you can use openvpn&#8217;s &#8211;mktun command line switch or handy little tool called tunctl to create one.</p>
<p>This has one drawback &#8212; you can&#8217;t easily use it with standard PLD interface config files (/etc/sysconfig/interfaces/ifcfg-foo). Of course you could set up the interface from rc.local, but things are getting more complicated if you are using vserver on the same machine that is supposed to act as a openvpn server.</p>
<p>The problem is &#8211; after you start your vserver guest systems, they have their virtual networking set up and bound to ethX (or whatever device you set them up to). If you&#8217;d try to set bridge at this time, you&#8217;d run into trouble. Not only this could cause problems with services on host system, but what&#8217;s worse &#8211; your vserver guest systems would loose network connectivity.</p>
<p>You could try to write your own init script and run it somewhere between networking and vserver. Slightly better, but still not perfect. Luckily, there&#8217;s a better approach.</p>
<p>Obiously the scenario I described above only matters if one of your vservers uses ethernet card that you plan to be a part of bridge interface. In case of ethernet bridging, this means at least one of your vserver (as it was in my case) vservers provides service to LAN.</p>
<p><strong>Ethernet bridging with OpenVPN on vserver-enabled host &#8211; PLD way </strong></p>
<p>In my configuration, I needed to connect two networks over Internet. I need to bridge them becase of various proprietary stuff that cannot be reconfigured. For the sake of this howto, we will name the gw machines in both locations hq and branch, each of them having two NICs, eth0 (external &#8211; internet), and eth1 (internal &#8212; lan).</p>
<p>hq eth0: &lt;irrelevant&gt;<br />
hq eth1: 10.0.0.1/8</p>
<p>branch office eth0: &lt;irrelevant&gt;<br />
branch office eth1: 10.0.10.1/8</p>
<p>There are also a few other ip addresses assigned on both hq&#8217;s interfaces &#8212; these are used by vserver guest systems.</p>
<p>Before we begin, make sure you have all necessary tools:<br />
# poldek -Qiv  bridge-utils openvpn easy-rsa umlinux-tools</p>
<p>What we need is to prepare /etc/sysconfig/interfaces/ifcfg-br0 with slightly modified content:</p>
<blockquote>
<pre># ifcfg-br0
TAP=$(tunctl -b -t tap0)
DEVICE=br0
IPADDR1=10.0.0.1/8
ONBOOT=yes
BRIDGE_DEVS="eth1 $TAP"
SPANNING_TREE=no
# eof</pre>
</blockquote>
<p>Alternatively you could use openvpn binary to set up tap device: <em>&#8222;openvpn &#8211;mktun &#8211;dev tap0&#8243;</em> &#8211; it&#8217;s up to you. Note that if you choose to use openvpn binary, you will need to</p>
<p><strong>What&#8217;s next</strong></p>
<p>Once it is done, you can follow the official <a href="http://openvpn.net/index.php/documentation/miscellaneous/ethernet-bridging.html">ethernet bridging howto</a> &#8211; just skip the bridge-start / bridge-stop scripts. Here&#8217;s a sample configuration for hq machine (openvpn server):</p>
<blockquote>
<pre># hq's openvpn config
local 1.2.3.4 # hq public ip address
port 1194
proto tcp
dev tap0
ca /etc/easy-rsa/keys/ca.crt
cert /etc/easy-rsa/keys/hq.crt
key /etc/easy-rsa/keys/hq.key  # This file should be kept secret
dh /etc/easy-rsa/keys/dh1024.pem
server-bridge 10.0.0.1 255.0.0.0 10.0.10.3 10.0.10.100
push "route 10.0.0.0 255.0.0.0"
ifconfig-pool-persist /etc/openvpn/ipp-hq.txt
keepalive 10 120
comp-lzo
persist-key
persist-tun
status /var/log/openvpn-hq-status.log
log /var/log/openvpn-hq-log
verb 5
# eof</pre>
</blockquote>
<p>You will also need to reconfigure vserver to bind to bridge interface (e.g. br0) &#8212; just edit <em>/etc/vservers/$vserver/interface/$num/dev</em> file.</p>
]]></content:encoded>
			<wfw:commentRss>http://adam.golebiowski.eu/blog/2009/02/03/ethernet-bridging-with-openvpn-on-vserver-enabled-host/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mommy, why is there a server in the house?</title>
		<link>http://adam.golebiowski.eu/blog/2008/07/22/mommy-why-is-there-a-server-in-the-house/</link>
		<comments>http://adam.golebiowski.eu/blog/2008/07/22/mommy-why-is-there-a-server-in-the-house/#comments</comments>
		<pubDate>Mon, 21 Jul 2008 22:50:52 +0000</pubDate>
		<dc:creator>adamg</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PLD]]></category>
		<category><![CDATA[english]]></category>

		<guid isPermaLink="false">http://adam.golebiowski.eu/blog/?p=21</guid>
		<description><![CDATA[So why is there a server in our house? Because it&#8217;s fun. Few months ago (before I saw this, honestly!) dad and I agreed that having a family file server was a good idea. What conviced us what the mess we were having with family photos &#8211; some of them were on my father&#8217;s computer, [...]]]></description>
			<content:encoded><![CDATA[<p>So why is there a server in our house?  Because it&#8217;s fun.</p>
<p>Few months ago (before I saw <a href="http://gizmodo.com/342499/microsofts-brainwashing-childrens-book-mommy-where-do-servers-come-from">this</a>, honestly!) dad and I agreed that having a family file server was a good idea. What conviced us what the mess we were having with family photos &#8211; some of them were on my father&#8217;s computer, some on mine. We also wanted to get rid of duplicate data (apps, few isos, etc.) between our computers.  What was surprising to me, my mom was also enthusiastic about the idea.  Before we stared, we decided that our server has to:</p>
<ul>
<li>be quiet (preferably fanless),</li>
<li>be economic / ecologic (small power consumption),</li>
<li>have a lot of space (in RAID-1 setup, if possible),</li>
<li>cost no more than 1000 PLN (ca 300 €),</li>
</ul>
<p style="text-align: left;">After doing some research, I decided to buy one of VIA&#8217;s EPIA motherboards &#8211; which are small (mini-itx), fanless (!), and consume relatively low power (ca. 15 W) comparing to their full-size competitors. From my rough calculations whole system would consume no more that 30-40W of energy, beside the already mentioned motherboard (with integrated CPU, NIC and VGA), there would be a 1TB SATA disk. With 40W of power conspution, estimated cost of running it 24/7 was:</p>
<p style="text-align: center;">24 (hours) * 30 (days) * 0.04 kW (power consumption) * 0.3 PLN (estimated price of 1kWh of energy) ~= 10 PLN</p>
<p style="text-align: left;">As low as 10 PLN (about 3 €) a month. Boy I wish I could pay that &#8222;much&#8221; on a gas station &#8230;</p>
<p>It took about three weeks before I bought all the required parts:</p>
<ul>
<li>EPIA SP-8000EG FANLESS motherboard,</li>
<li>a <a href="http://www.allegro.pl/item385095653_obudowa_d_153_via_epia_mini_itx.html">D-153</a> chasis (designed for VIA&#8217;s EPIA motherboards),</li>
<li>1TB Samsung HD103UJ SATA HDD,</li>
<li>1GB DDR RAM,</li>
</ul>
<p>Total cost: 1003 PLN (incl. VAT), which is about 300 €. Once assembled it looks like this:</p>
<p><a href="http://adam.golebiowski.eu/blog/wp-content/uploads/2008/07/epiath_1.jpg"><img class="alignnone size-medium wp-image-22" title="epiath_1" src="http://adam.golebiowski.eu/blog/wp-content/uploads/2008/07/epiath_1-300x219.jpg" alt="" width="300" height="219" /> </a><a href="http://adam.golebiowski.eu/blog/wp-content/uploads/2008/07/epiath_2.jpg"><img class="alignnone size-medium wp-image-23" title="epiath_2" src="http://adam.golebiowski.eu/blog/wp-content/uploads/2008/07/epiath_2-300x225.jpg" alt="" width="300" height="225" /></a><a href="http://adam.golebiowski.eu/blog/wp-content/uploads/2008/07/epiath_1.jpg"></a></p>
<p>Maybe it&#8217;s not beautiful, but it doesn&#8217;t have to be.<br />
Now to the more technical part, it is powered by <a href="http://www.pld-linux.org/">PLD</a> Th:</p>
<p><em>[root@epiath ~]# cat /proc/cpuinfo<br />
processor       : 0<br />
vendor_id       : CentaurHauls<br />
cpu family      : 6<br />
model           : 9<br />
model name      : VIA Nehemiah<br />
stepping        : 8<br />
cpu MHz         : 800.047<br />
cache size      : 64 KB<br />
fdiv_bug        : no<br />
hlt_bug         : no<br />
f00f_bug        : no<br />
coma_bug        : no<br />
fpu             : yes<br />
fpu_exception   : yes<br />
cpuid level     : 1<br />
wp              : yes<br />
flags           : fpu vme de pse tsc msr cx8 sep mtrr pge cmov pat mmx fxsr sse up rng rng_en ace ace_en<br />
bogomips        : 1602.68<br />
clflush size    : 32[root@epiath ~]#</p>
<p></em></p>
<p>And it was so quiet&#8230;  image a system where the most nosiest component is its hdd (about 27dB). Unfortunately, it failed as a fanless system, the hdd warmed up to more than 45°C. We decided to insert small, 8x8cm fan inside the chasis. It helped a lot &#8211; the hdd temperature dropped almost isntantly to less than 35°C, and as I am writing thist post, hddtemp reports 28°C. At the price of lower temperature, we got a bit louder system and a slightly higher power consumption.</p>
<p>Epiath (I probably suck at naming my systems) is a new project &#8211; it went &#8222;live&#8221; about three weeks ago, and is still not finished, there are few thins I still plan to do:</p>
<ul>
<li>remote access (OpenVPN), so that my brother could share his photos as well,</li>
<li>track new files (with find), and announce them with mail sent on a daily basis,</li>
<li>develop a search engine &#8211; search throuch file names at a minimum, perhaps we could make use of beagle to scan through contents as well (any experience with that anyone?),</li>
<li>NFS access &#8211; or is it more convenient to use SMB, even for a Linux user?</li>
</ul>
<p>So far, I am quite happy we decided to build our home server &#8211; even though it did cost a bit (you don&#8217;t spend 300  € everyday, do you?).</p>
]]></content:encoded>
			<wfw:commentRss>http://adam.golebiowski.eu/blog/2008/07/22/mommy-why-is-there-a-server-in-the-house/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Pingwinaria: jednym słowem.</title>
		<link>http://adam.golebiowski.eu/blog/2008/04/21/pingwinaria-jednym-slowem/</link>
		<comments>http://adam.golebiowski.eu/blog/2008/04/21/pingwinaria-jednym-slowem/#comments</comments>
		<pubDate>Sun, 20 Apr 2008 22:02:32 +0000</pubDate>
		<dc:creator>adamg</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PLUG]]></category>

		<guid isPermaLink="false">http://adam.golebiowski.eu/blog/2008/04/21/pingwinaria-jednym-slowem/</guid>
		<description><![CDATA[Wiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii!]]></description>
			<content:encoded><![CDATA[<p>Wiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii!</p>
]]></content:encoded>
			<wfw:commentRss>http://adam.golebiowski.eu/blog/2008/04/21/pingwinaria-jednym-slowem/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
