<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/2.4.5" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Ryan Phillips</title>
		<link>http://blogs.gentoo.org/rphillips</link>
		<description></description>
		<language>en-US</language>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=2.4.5"/>
		<ttl>60</ttl>
				<item>
			<title>Vim 7 Released</title>
			<link>http://blogs.gentoo.org/rphillips/2006/05/08/vim_7_released</link>
			<pubDate>Mon, 08 May 2006 18:16:38 +0000</pubDate>			<dc:creator>Ryan Phillips</dc:creator>
			<category domain="main">Gentoo</category>			<guid isPermaLink="false">734@http://blogs.gentoo.org/</guid>
						<description>&lt;p&gt;Vim 7 has been released with a ton of bug fixes, and some new and exciting features.  The unstable 7.0 packages have been committed to the Portage tree for your enjoyment.&lt;/p&gt;

&lt;p&gt;Linux.com has a &lt;a href=&quot;http://www.linux.com/article.pl?sid=06/05/01/2235242&quot;&gt;nice article&lt;/a&gt; on some of the new features.  You can expect to find a tabbed interface (:help tabe), spell checking (:help spell), and code completion (:help compl-omni-filetypes).&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.gentoo.org/rphillips/2006/05/08/vim_7_released&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Vim 7 has been released with a ton of bug fixes, and some new and exciting features.  The unstable 7.0 packages have been committed to the Portage tree for your enjoyment.</p>

<p>Linux.com has a <a href="http://www.linux.com/article.pl?sid=06/05/01/2235242">nice article</a> on some of the new features.  You can expect to find a tabbed interface (:help tabe), spell checking (:help spell), and code completion (:help compl-omni-filetypes).</p><div class="item_footer"><p><small><a href="http://blogs.gentoo.org/rphillips/2006/05/08/vim_7_released">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.gentoo.org/rphillips/2006/05/08/vim_7_released#comments</comments>
		</item>
				<item>
			<title>Gentoo and Wake-on-Lan Support</title>
			<link>http://blogs.gentoo.org/rphillips/2005/12/21/gentoo_and_wake_on_lan_support</link>
			<pubDate>Wed, 21 Dec 2005 18:36:17 +0000</pubDate>			<dc:creator>Ryan Phillips</dc:creator>
			<category domain="main">Gentoo</category>			<guid isPermaLink="false">513@http://blogs.gentoo.org/</guid>
						<description>&lt;p&gt;With my &lt;a href=&quot;http://bugs.gentoo.org/show_bug.cgi?id=113880&quot;&gt;request&lt;/a&gt;, Uberlord (Roy Marples) has been gracious enough to tweak the rc-scripts to support Wake-on-Lan.  Check the upcoming and unstable: baselayout-1.12.0_pre13 and please test if you need the support.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.gentoo.org/rphillips/2005/12/21/gentoo_and_wake_on_lan_support&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>With my <a href="http://bugs.gentoo.org/show_bug.cgi?id=113880">request</a>, Uberlord (Roy Marples) has been gracious enough to tweak the rc-scripts to support Wake-on-Lan.  Check the upcoming and unstable: baselayout-1.12.0_pre13 and please test if you need the support.</p><div class="item_footer"><p><small><a href="http://blogs.gentoo.org/rphillips/2005/12/21/gentoo_and_wake_on_lan_support">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.gentoo.org/rphillips/2005/12/21/gentoo_and_wake_on_lan_support#comments</comments>
		</item>
				<item>
			<title>Very Late Assignments with LD</title>
			<link>http://blogs.gentoo.org/rphillips/2005/08/26/very_late_assignments_with_ld</link>
			<pubDate>Fri, 26 Aug 2005 22:27:09 +0000</pubDate>			<dc:creator>Ryan Phillips</dc:creator>
			<category domain="main">Gentoo</category>			<guid isPermaLink="false">306@http://blogs.gentoo.org/</guid>
						<description>&lt;p&gt;The other day I found a really slick way of adding arbitrary data to an .o (object) file with 'ld'.  It is probably easiest to show the setup, then explain it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;test.data&lt;/strong&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
Hello, World&lt;br /&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;extra.h&lt;/strong&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
extern const char _binary_test_data_start[];&lt;br /&gt;
extern const char _binary_test_data_end[];&lt;br /&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;extra.c&lt;/strong&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
#include &quot;extra.h&quot;&lt;br /&gt;
/* this C file when compiled to an object will include the data found in test.data */&lt;br /&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;main.c&lt;/strong&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
#include &quot;extra.h&quot;&lt;/p&gt;

&lt;p&gt;void print_str(const char *ptr, int length);&lt;/p&gt;

int main()&lt;br /&gt;
{&lt;br /&gt;
    int size = _binary_test_data_end - _binary_test_data_start;&lt;br /&gt;
    print_str(_binary_test_data_start, size);&lt;br /&gt;
    return 0; &lt;br /&gt;
}&lt;br /&gt;
&lt;/code&gt;&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Compilation Steps&lt;/strong&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
# gcc extra.c -c&lt;br /&gt;
# ld -b binary -r -o extra.o test.data&lt;br /&gt;
# gcc extra.o main.c -o out&lt;br /&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;note: print_str prints character by character to a specified length&lt;br /&gt;
note2: _binary_test_data_size is exported, but I haven't been able to figure out how to use it yet.&lt;/p&gt;

&lt;p&gt;LD creates a new ELF segment within the extra.o object file.  readelf and objdump will give quite a bit of useful information regarding the segments  that will eventually get linked into the executable &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;# objdump -t extra.o&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;
extra.o:     file format elf32-i386

SYMBOL TABLE:
00000000 l    d  .data	00000000 
00000000 l    d  *ABS*	00000000 
00000000 l    d  *ABS*	00000000 
00000000 l    d  *ABS*	00000000 
0000000c g       .data	00000000 _binary_test_data_end
0000000c g       *ABS*	00000000 _binary_test_data_size
00000000 g       .data	00000000 _binary_test_data_start
&lt;/pre&gt;

&lt;p&gt;The start of the test.data file will be located in the variable '_binary_test_data_start' and similary the end will be '_binary_test_data_end'.&lt;/p&gt;

&lt;p&gt;This might be useful for embedding cryptographic signatures, or maybe game data files.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.gentoo.org/rphillips/2005/08/26/very_late_assignments_with_ld&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>The other day I found a really slick way of adding arbitrary data to an .o (object) file with 'ld'.  It is probably easiest to show the setup, then explain it.</p>

<p><strong>test.data</strong><br />
<code><br />
Hello, World<br />
</code></p>

<p><strong>extra.h</strong><br />
<code><br />
extern const char _binary_test_data_start[];<br />
extern const char _binary_test_data_end[];<br />
</code></p>

<p><strong>extra.c</strong><br />
<code><br />
#include "extra.h"<br />
/* this C file when compiled to an object will include the data found in test.data */<br />
</code></p>

<p><strong>main.c</strong><br />
<code><br />
#include "extra.h"</p>

<p>void print_str(const char *ptr, int length);</p>

int main()<br />
{<br />
    int size = _binary_test_data_end - _binary_test_data_start;<br />
    print_str(_binary_test_data_start, size);<br />
    return 0; <br />
}<br />
</code><p></p>

<p><strong>Compilation Steps</strong><br />
<code><br />
# gcc extra.c -c<br />
# ld -b binary -r -o extra.o test.data<br />
# gcc extra.o main.c -o out<br />
</code></p>

<p>note: print_str prints character by character to a specified length<br />
note2: _binary_test_data_size is exported, but I haven't been able to figure out how to use it yet.</p>

<p>LD creates a new ELF segment within the extra.o object file.  readelf and objdump will give quite a bit of useful information regarding the segments  that will eventually get linked into the executable </p>

<p><strong># objdump -t extra.o</strong></p>
<pre>
extra.o:     file format elf32-i386

SYMBOL TABLE:
00000000 l    d  .data	00000000 
00000000 l    d  *ABS*	00000000 
00000000 l    d  *ABS*	00000000 
00000000 l    d  *ABS*	00000000 
0000000c g       .data	00000000 _binary_test_data_end
0000000c g       *ABS*	00000000 _binary_test_data_size
00000000 g       .data	00000000 _binary_test_data_start
</pre>

<p>The start of the test.data file will be located in the variable '_binary_test_data_start' and similary the end will be '_binary_test_data_end'.</p>

<p>This might be useful for embedding cryptographic signatures, or maybe game data files.</p><div class="item_footer"><p><small><a href="http://blogs.gentoo.org/rphillips/2005/08/26/very_late_assignments_with_ld">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.gentoo.org/rphillips/2005/08/26/very_late_assignments_with_ld#comments</comments>
		</item>
				<item>
			<title>New GPG Keys</title>
			<link>http://blogs.gentoo.org/rphillips/2005/08/03/new_gpg_keys</link>
			<pubDate>Wed, 03 Aug 2005 22:37:13 +0000</pubDate>			<dc:creator>Ryan Phillips</dc:creator>
			<category domain="main">Gentoo</category>			<guid isPermaLink="false">269@http://blogs.gentoo.org/</guid>
						<description>&lt;p&gt;After 4 years of the same GPG key I thought it was about time to create a new one.&lt;/p&gt;

&lt;p&gt;Key ID: &lt;a href=&quot;http://pgp.mit.edu:11371/pks/lookup?search=0x0AE9C4BF&amp;amp;op=index&quot;&gt;0x0AE9C4BF&lt;/a&gt;&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.gentoo.org/rphillips/2005/08/03/new_gpg_keys&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>After 4 years of the same GPG key I thought it was about time to create a new one.</p>

<p>Key ID: <a href="http://pgp.mit.edu:11371/pks/lookup?search=0x0AE9C4BF&amp;op=index">0x0AE9C4BF</a></p><div class="item_footer"><p><small><a href="http://blogs.gentoo.org/rphillips/2005/08/03/new_gpg_keys">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.gentoo.org/rphillips/2005/08/03/new_gpg_keys#comments</comments>
		</item>
				<item>
			<title>New vim7 snapshots</title>
			<link>http://blogs.gentoo.org/rphillips/2005/06/23/new_vim7_snapshots</link>
			<pubDate>Thu, 23 Jun 2005 05:28:24 +0000</pubDate>			<dc:creator>Ryan Phillips</dc:creator>
			<category domain="main">Gentoo</category>			<guid isPermaLink="false">185@http://blogs.gentoo.org/</guid>
						<description>&lt;p&gt;I have completed Nikolai's &lt;a href=&quot;http://bugs.gentoo.org/show_bug.cgi?id=96786&quot;&gt;request&lt;/a&gt; for new Vim 7 ebuilds (snapshot 20050622).  As usual report bugs to the &lt;a href=&quot;http://bugs.gentoo.org/&quot;&gt;Gentoo Bugzilla&lt;/a&gt;.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.gentoo.org/rphillips/2005/06/23/new_vim7_snapshots&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>I have completed Nikolai's <a href="http://bugs.gentoo.org/show_bug.cgi?id=96786">request</a> for new Vim 7 ebuilds (snapshot 20050622).  As usual report bugs to the <a href="http://bugs.gentoo.org/">Gentoo Bugzilla</a>.</p><div class="item_footer"><p><small><a href="http://blogs.gentoo.org/rphillips/2005/06/23/new_vim7_snapshots">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.gentoo.org/rphillips/2005/06/23/new_vim7_snapshots#comments</comments>
		</item>
				<item>
			<title>Inspiron 9300</title>
			<link>http://blogs.gentoo.org/rphillips/2005/06/15/inspiron_9300</link>
			<pubDate>Wed, 15 Jun 2005 17:52:28 +0000</pubDate>			<dc:creator>Ryan Phillips</dc:creator>
			<category domain="main">Gentoo</category>			<guid isPermaLink="false">167@http://blogs.gentoo.org/</guid>
						<description>&lt;p&gt;My work loaned my a Dell Inspiron 9300. The Gentoo install was straight forward starting with an i686 stage3.  Remember to compile in SATA support into the kernel.  Everything works fine with it except no DMA on the SATA harddrive and CDRW/DVD drive.  This problem appears to be well known.  Has anyone come across a fix?&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.gentoo.org/rphillips/2005/06/15/inspiron_9300&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>My work loaned my a Dell Inspiron 9300. The Gentoo install was straight forward starting with an i686 stage3.  Remember to compile in SATA support into the kernel.  Everything works fine with it except no DMA on the SATA harddrive and CDRW/DVD drive.  This problem appears to be well known.  Has anyone come across a fix?</p><div class="item_footer"><p><small><a href="http://blogs.gentoo.org/rphillips/2005/06/15/inspiron_9300">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.gentoo.org/rphillips/2005/06/15/inspiron_9300#comments</comments>
		</item>
				<item>
			<title>OpenVPN 2.0 Bridge Setup</title>
			<link>http://blogs.gentoo.org/rphillips/2005/05/13/openvpn_setup</link>
			<pubDate>Fri, 13 May 2005 16:42:43 +0000</pubDate>			<dc:creator>Ryan Phillips</dc:creator>
			<category domain="main">Gentoo</category>			<guid isPermaLink="false">133@http://blogs.gentoo.org/</guid>
						<description>&lt;p&gt;With the latest release of &lt;a href=&quot;http://www.openvpn.org/&quot;&gt;OpenVPN&lt;/a&gt; and wanting to VPN into my home network, I sat down to figure out the 'Gentoo Way'.&lt;/p&gt;

&lt;p&gt;Thanks to Bret Towe (Magnade) on Freenode for some help on the bridging and configuration.&lt;/p&gt;

&lt;p&gt;The &lt;a href=&quot;http://forums.gentoo.org/&quot;&gt;Gentoo Forums&lt;/a&gt; was my starting point; notably &lt;a href=&quot;http://forums.gentoo.org/viewtopic-t-233080-highlight-openvpn.html&quot;&gt;this&lt;/a&gt; post.&lt;/p&gt;

&lt;p&gt;I decided on using OpenVPN's &lt;a href=&quot;http://openvpn.net/bridge.html&quot;&gt;bridging&lt;/a&gt; capabilities instead of the Howto's route based solution.  A bridge allows for multiple interfaces (eth, ppp, etc) to be combined into one network all sharing the same subnet.  There are advantages and disadvantages while using any approach.  Using a bridge the main ethernet devices are placed into promiscuous mode.  The disadvantage is on a large network the CPU would likely burn more cycles trying to figure out if packets are being directed to the server.  Since I have only two computers on my home network I don't see this becoming a problem.  I find the setup with bridging a bit easier by not worrying about routes.&lt;/p&gt;

&lt;p&gt;h4. Network Layout&lt;/p&gt;

&lt;p&gt;My home network is on a typical 192.168.0.x subdomain.  I kept this as is, because the networks I typically connect to will normally not be in the same subnet.  The OpenVPN manual suggests changing your secured LAN subnet to something a bit more private (172.16.0.0 or 10.0.0.0).&lt;/p&gt;

&lt;p&gt;h3. *Server Configuration*&lt;/p&gt;

&lt;p&gt;h4. Kernel &lt;/p&gt;

&lt;p&gt;I am using the 2.6.11-gentoo-r6 kernel.  _make menuconfig_ and search the kernel config menus using the / key for _bridge_.  Enable CONFIG_BRIDGE, CONFIG_TUN and CONFIG_BRIDGE_NETFILTER.  If you configure these as modules make sure to modprobe them and autoload them at boot.&lt;/p&gt;

&lt;p&gt;_emerge bridge-utils_ to get the bridge utilities on your system.&lt;/p&gt;

&lt;p&gt;h4. Bridge Configuration the Gentoo Way&lt;/p&gt;

&lt;p&gt;My main ethernet card is eth0 and is 192.168.0.4 on the network as a static IP.  The gateway is 192.168.0.1.  *Don't try this from a remote shell.*  You must be present at the machine.&lt;/p&gt;
&lt;pre&gt;
  # /etc/init.d/net.eth0 stop
  # rc-update del net.eth0 default
  # cd /etc/init.d/ ; cp net.eth0 net.br0 ; rc-update add net.br0 default
&lt;/pre&gt;

&lt;p&gt;Edit /etc/conf.d/net:&lt;/p&gt;
&lt;pre&gt;
iface_br0=&quot;192.168.0.4 broadcast 192.168.0.255 netmask 255.255.255.0&quot;
gateway=&quot;br0/192.168.0.1&quot;
&lt;/pre&gt;

&lt;p&gt;Edit /etc/conf.d/bridge:&lt;/p&gt;
&lt;pre&gt;
bridge=&quot;br0&quot;
bridge_br0_devices=&quot;eth0 tap0&quot;
&lt;/pre&gt;

&lt;p&gt;The tap0 device will be created by OpenVPN.&lt;/p&gt;

&lt;p&gt;Change the depend in /etc/init.d/bridge to depend on OpenVPN:&lt;/p&gt;
&lt;pre&gt;
depend() {
    need openvpn
    use modules openvpn
}
&lt;/pre&gt;

&lt;p&gt;Change the depend in /etc/init.d/net.br0 to depend on bridge:&lt;/p&gt;
&lt;pre&gt;
depend() {
    use hotplug pcmcia bridge
}
&lt;/pre&gt;

&lt;p&gt;Edit /etc/openvpn/home-server/local.conf:&lt;/p&gt;
&lt;pre&gt;
port 1194 # or any other port you want to use
dev tap0
tls-server
ca ca.crt
cert gateway.crt
key gateway.key
dh dh1024.pem
tls-auth ta.key 0
mode server
server-bridge 192.168.0.4 255.255.255.0 192.168.0.128 192.168.0.254
comp-lzo
status openvpn-status.log
verb 5
&lt;/pre&gt;

&lt;p&gt;Follow the instructions from the Howto to generate the TLS keys.  The server-bridge line will assign IP addresses to the clients between .128 to .254, so disable this range from the DHCP server.&lt;/p&gt;

&lt;p&gt;h3. Client Configuration&lt;/p&gt;

&lt;p&gt;The client needs TLS keys to negotiate the session. Refer to the forum Howto on how to do this. TAP must be enabled on the clients for this to work.&lt;/p&gt;

&lt;p&gt;Edit /etc/openvpn/home/local.conf:&lt;/p&gt;
&lt;pre&gt;
port 1194
dev tap
remote the.remote.server.ip.or.hostname
tls-client
ca ca.crt
cert client1.crt
key client1.key
tls-auth ta.key 1
verb 3
comp-lzo
pull
&lt;/pre&gt;

&lt;p&gt;The _pull_ directive will retrieve the IP and routing information from the server.&lt;/p&gt;

&lt;p&gt;Bring up the interfaces (openvpn, bridge, net.br0) on the server.  Check your log files!  Then try your client.  A port may need to be opened on your router/firewall - in this case - port 1194.&lt;/p&gt;

&lt;p&gt;Everyone's network topology is different; use this guide as ... well... just a guide.  Until next time...&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://blogs.gentoo.org/rphillips/2005/05/13/openvpn_setup&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>With the latest release of <a href="http://www.openvpn.org/">OpenVPN</a> and wanting to VPN into my home network, I sat down to figure out the 'Gentoo Way'.</p>

<p>Thanks to Bret Towe (Magnade) on Freenode for some help on the bridging and configuration.</p>

<p>The <a href="http://forums.gentoo.org/">Gentoo Forums</a> was my starting point; notably <a href="http://forums.gentoo.org/viewtopic-t-233080-highlight-openvpn.html">this</a> post.</p>

<p>I decided on using OpenVPN's <a href="http://openvpn.net/bridge.html">bridging</a> capabilities instead of the Howto's route based solution.  A bridge allows for multiple interfaces (eth, ppp, etc) to be combined into one network all sharing the same subnet.  There are advantages and disadvantages while using any approach.  Using a bridge the main ethernet devices are placed into promiscuous mode.  The disadvantage is on a large network the CPU would likely burn more cycles trying to figure out if packets are being directed to the server.  Since I have only two computers on my home network I don't see this becoming a problem.  I find the setup with bridging a bit easier by not worrying about routes.</p>

<p>h4. Network Layout</p>

<p>My home network is on a typical 192.168.0.x subdomain.  I kept this as is, because the networks I typically connect to will normally not be in the same subnet.  The OpenVPN manual suggests changing your secured LAN subnet to something a bit more private (172.16.0.0 or 10.0.0.0).</p>

<p>h3. *Server Configuration*</p>

<p>h4. Kernel </p>

<p>I am using the 2.6.11-gentoo-r6 kernel.  _make menuconfig_ and search the kernel config menus using the / key for _bridge_.  Enable CONFIG_BRIDGE, CONFIG_TUN and CONFIG_BRIDGE_NETFILTER.  If you configure these as modules make sure to modprobe them and autoload them at boot.</p>

<p>_emerge bridge-utils_ to get the bridge utilities on your system.</p>

<p>h4. Bridge Configuration the Gentoo Way</p>

<p>My main ethernet card is eth0 and is 192.168.0.4 on the network as a static IP.  The gateway is 192.168.0.1.  *Don't try this from a remote shell.*  You must be present at the machine.</p>
<pre>
  # /etc/init.d/net.eth0 stop
  # rc-update del net.eth0 default
  # cd /etc/init.d/ ; cp net.eth0 net.br0 ; rc-update add net.br0 default
</pre>

<p>Edit /etc/conf.d/net:</p>
<pre>
iface_br0="192.168.0.4 broadcast 192.168.0.255 netmask 255.255.255.0"
gateway="br0/192.168.0.1"
</pre>

<p>Edit /etc/conf.d/bridge:</p>
<pre>
bridge="br0"
bridge_br0_devices="eth0 tap0"
</pre>

<p>The tap0 device will be created by OpenVPN.</p>

<p>Change the depend in /etc/init.d/bridge to depend on OpenVPN:</p>
<pre>
depend() {
    need openvpn
    use modules openvpn
}
</pre>

<p>Change the depend in /etc/init.d/net.br0 to depend on bridge:</p>
<pre>
depend() {
    use hotplug pcmcia bridge
}
</pre>

<p>Edit /etc/openvpn/home-server/local.conf:</p>
<pre>
port 1194 # or any other port you want to use
dev tap0
tls-server
ca ca.crt
cert gateway.crt
key gateway.key
dh dh1024.pem
tls-auth ta.key 0
mode server
server-bridge 192.168.0.4 255.255.255.0 192.168.0.128 192.168.0.254
comp-lzo
status openvpn-status.log
verb 5
</pre>

<p>Follow the instructions from the Howto to generate the TLS keys.  The server-bridge line will assign IP addresses to the clients between .128 to .254, so disable this range from the DHCP server.</p>

<p>h3. Client Configuration</p>

<p>The client needs TLS keys to negotiate the session. Refer to the forum Howto on how to do this. TAP must be enabled on the clients for this to work.</p>

<p>Edit /etc/openvpn/home/local.conf:</p>
<pre>
port 1194
dev tap
remote the.remote.server.ip.or.hostname
tls-client
ca ca.crt
cert client1.crt
key client1.key
tls-auth ta.key 1
verb 3
comp-lzo
pull
</pre>

<p>The _pull_ directive will retrieve the IP and routing information from the server.</p>

<p>Bring up the interfaces (openvpn, bridge, net.br0) on the server.  Check your log files!  Then try your client.  A port may need to be opened on your router/firewall - in this case - port 1194.</p>

<p>Everyone's network topology is different; use this guide as ... well... just a guide.  Until next time...</p><div class="item_footer"><p><small><a href="http://blogs.gentoo.org/rphillips/2005/05/13/openvpn_setup">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://blogs.gentoo.org/rphillips/2005/05/13/openvpn_setup#comments</comments>
		</item>
			</channel>
</rss>
