<?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>BenV&#039;s notes &#187; ipv6</title>
	<atom:link href="http://notes.benv.junerules.com/tag/ipv6/feed/" rel="self" type="application/rss+xml" />
	<link>http://notes.benv.junerules.com</link>
	<description>Rants and notes</description>
	<lastBuildDate>Wed, 28 Jul 2010 13:36:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Torrent stuff</title>
		<link>http://notes.benv.junerules.com/all/software/torrent-stuff/</link>
		<comments>http://notes.benv.junerules.com/all/software/torrent-stuff/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 16:10:04 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[bittorrent]]></category>
		<category><![CDATA[deluge]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=549</guid>
		<description><![CDATA[Every now and then I like to leech something, and it happens to be that using bittorrent has a lot to offer in terms of availability and usability. However, as usual I have my demands. My demands for a torrent program are basically: It has to run on Slackware It has to run as a [...]]]></description>
			<content:encoded><![CDATA[<p>Every now and then I like to leech something, and it happens to be that using bittorrent has a lot to offer in terms of availability and usability. However, as usual I have my demands. My demands for a torrent program are basically:</p>
<ul>
<li>It has to run on Slackware</li>
<li>It has to run as a daemon (in daemontools if possible)</li>
<li>There has to be an easy way to control and view the status, like a web based GUI.</li>
</ul>
<p><span id="more-549"></span><br />
A few years ago I used <span style="color:#FF00FF">mldonkey</span> for it. Worked fine, but their torrent support was getting worse and worse. (basically they didn&#8217;t update their product for ages, and when they did it didn&#8217;t improve much). It had a web interface that worked nicely though, and it was easy to control. Another cute thing was that it also supported other protocols that I still used back then like Edonkey.</p>
<p>However, at some point I got fed up with it and searched for a better product. Especially since I didn&#8217;t care about the other protocols anymore I could search for a pure torrent client. Many of them only support running as a client with some kind of fancy GUI&#8230; not good for running on our server. But then I found <a href="http://libtorrent.rakshasa.no/" title="Rtorrent">Rtorrent</a>.<br />
While it was a bitch to run on my server since it demanded to run in a terminal (and therefore refused to run under daemontools) &#8212; a problem I made bearable by running it in screen under a new user that was accessible through ssh keys &#8212; it worked very nicely. I had it running with a web interface called <a href="http://www.wtorrent-project.org/trac/">wtorrent</a>.<br />
But then yesterday I got very needy and demanded that it used IPv6 to connect to others. Sadly it fails to do that. Don&#8217;t know if it&#8217;s a configuration problem or simply <a href="http://libtorrent.rakshasa.no/ticket/1111">because the author doesn&#8217;t have enough time to fix it</a>. I tried the latest development builds and compiling it with <span style="color:#FFFF00">&#8211;enable-ipv6</span>, but it doesn&#8217;t seem to listen. In other words: time for a new client.</p>
<p>So after some searching I ran into <a href="http://dev.deluge-torrent.org/wiki/Screenshots" title="Deluge">Deluge</a>. It seems to fulfill all my requirements, so I decided to give it a shot. A few bonus points are immediately earned because Deluge uses the more commonly used <a href="http://www.rasterbar.com/products/libtorrent/">libtorrent</a>, not to be confused by the other libtorrent that rtorrent uses. The bonus points are because the rasterbar libtorrent has plugin support among things and in general is a bit more up to date on the whole torrent protocol as far as I can tell. (makes you wonder why rtorrent doesn&#8217;t use it).<br />
Time for installation!<br />
Slackbuild had no problems chewing through libtorrent and spitting out a nice slackware package. However, Deluge is built in python so some manual work to get a package from it. (I seriously need to get some time to work on slackbuild to support this stuff).</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">root<span style="color: #000000; font-weight: bold;">@</span>Uil:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>deluge-1.2.0_rc3<span style="color: #666666; font-style: italic;"># mkdir pkg</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>Uil:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>deluge-1.2.0_rc3<span style="color: #666666; font-style: italic;"># python setup.py install --root `pwd`/pkg -O2</span><br />
&nbsp;<span style="color: #000000; font-weight: bold;">*</span>blabla compile blabla<span style="color: #000000; font-weight: bold;">*</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>Uil:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>deluge-1.2.0_rc3<span style="color: #666666; font-style: italic;"># cd pkg/ &amp;&amp; makepkg /usr/src/packages/deluge-1.2.0rc3-i386-1.tgz</span></div></div>
<p>Voila, a nice package. After installing it, and creating a new user for it, it was time to see if it would work in daemontools.<br />
However, I didn&#8217;t check any dependencies so trying to run the deluge program failed:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Traceback <span style="color: #7a0874; font-weight: bold;">&#40;</span>most recent call <span style="color: #c20cb9; font-weight: bold;">last</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>:<br />
&nbsp; &nbsp;File <span style="color: #ff0000;">&quot;/usr/bin/deluged&quot;</span>, line <span style="color: #000000;">8</span>, <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">&lt;</span>module<span style="color: #000000; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; &nbsp;load_entry_point<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #ff0000;">'deluge==1.2.0-rc3'</span>, <span style="color: #ff0000;">'console_scripts'</span>, <span style="color: #ff0000;">'deluged'</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp;File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/pkg_resources.py&quot;</span>, line <span style="color: #000000;">277</span>, <span style="color: #000000; font-weight: bold;">in</span> load_entry_point<br />
&nbsp; &nbsp; &nbsp;<span style="color: #7a0874; font-weight: bold;">return</span> get_distribution<span style="color: #7a0874; font-weight: bold;">&#40;</span>dist<span style="color: #7a0874; font-weight: bold;">&#41;</span>.load_entry_point<span style="color: #7a0874; font-weight: bold;">&#40;</span>group, name<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp;File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/pkg_resources.py&quot;</span>, line <span style="color: #000000;">2180</span>, <span style="color: #000000; font-weight: bold;">in</span> load_entry_point<br />
&nbsp; &nbsp; &nbsp;<span style="color: #7a0874; font-weight: bold;">return</span> ep.load<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp;File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/pkg_resources.py&quot;</span>, line <span style="color: #000000;">1913</span>, <span style="color: #000000; font-weight: bold;">in</span> load<br />
&nbsp; &nbsp; &nbsp;entry = __import__<span style="color: #7a0874; font-weight: bold;">&#40;</span>self.module_name, globals<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>,globals<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #ff0000;">'__name__'</span><span style="color: #7a0874; font-weight: bold;">&#93;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
&nbsp; &nbsp;File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/deluge/main.py&quot;</span>, line <span style="color: #000000;">47</span>, <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">&lt;</span>module<span style="color: #000000; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; &nbsp;import deluge.common<br />
&nbsp; &nbsp;File <span style="color: #ff0000;">&quot;/usr/lib/python2.6/site-packages/deluge/common.py&quot;</span>, line <span style="color: #000000;">66</span>, <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">&lt;</span>module<span style="color: #000000; font-weight: bold;">&gt;</span><br />
&nbsp; &nbsp; &nbsp;import xdg, xdg.BaseDirectory<br />
&nbsp;ImportError: No module named xdg</div></div>
<p>Meh, xdg&#8230; fine. Fortunately python has <span style="color:#00FFFF">easy_install</span> as perl has cpan, so I installed a bunch of required things for it (like twisted, pyopenssl, chardet, mako). For xdg easy_install didn&#8217;t work though, so I handed it to easy_install using <a href="http://www.freedesktop.org/~lanius/pyxdg-0.18.tar.gz">this url</a>. After this it started up, even in daemontools! Another success.<br />
For those who are interested, my daemontools <span style="color:#00FF00">run</span> file looks like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span><br />
<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">1</span><br />
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #660033;">-e</span><br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>general_stores2<span style="color: #000000; font-weight: bold;">/</span>deluge<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$HOME</span><br />
<span style="color: #7a0874; font-weight: bold;">exec</span> setuidgid deluge <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>deluged <span style="color: #660033;">-d</span> <span style="color: #660033;">-c</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>etc <span style="color: #660033;">-i</span> eth_local <span style="color: #660033;">-L</span> info</div></div>
<p>You obviously need to adjust the paths and interface and whatnot to your own ideals <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
After starting it for the first time it created some configuration and state files and is now waiting for connections. Woohoo.</p>
<p>So now, how do we connect to it? Seems like the web interface isn&#8217;t running yet. This is because deluge uses a client/server model where the daemon does<br />
all the work, but it doesn&#8217;t deal with the interface side. So to run the web interface we have to start a separate deluge process. Let&#8217;s also put that in daemontools:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span><span style="color: #000000;">1</span><br />
<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">1</span><br />
<span style="color: #000000; font-weight: bold;">set</span> <span style="color: #660033;">-e</span><br />
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">HOME</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>general_stores2<span style="color: #000000; font-weight: bold;">/</span>deluge<br />
<span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$HOME</span><br />
<span style="color: #7a0874; font-weight: bold;">exec</span> setuidgid deluge <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>deluge <span style="color: #660033;">-c</span> <span style="color: #007800;">$HOME</span><span style="color: #000000; font-weight: bold;">/</span>etc <span style="color: #660033;">-L</span> info <span style="color: #660033;">-u</span> web</div></div>
<p>After firing this one up you can connect using your browser on port 8112. Default password is <span style="color:#FFFF00">deluge</span>. After logging in you get the connection manager which shows the running daemon that you started up earlier. (or at least, that&#8217;s what it did here):<br />
<div id="attachment_553" class="wp-caption alignnone" style="width: 310px"><a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/deluge-connection-manager.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/deluge-connection-manager.png" alt="Deluge Connection Manager" title="deluge connection manager" width="300" height="291" class="size-full wp-image-553" /></a><p class="wp-caption-text">Deluge Connection Manager</p></div><br />
So have fun! Don&#8217;t forget to check out the plugins:<br />
<a href="http://notes.benv.junerules.com/wp-content/uploads/2009/11/deluge-plugins.png"><img src="http://notes.benv.junerules.com/wp-content/uploads/2009/11/deluge-plugins-300x291.png" alt="deluge-plugins" title="deluge-plugins" width="300" height="291" class="alignnone size-medium wp-image-554" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/torrent-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slackware(64), Qmail and IPv6</title>
		<link>http://notes.benv.junerules.com/all/software/slackware64-qmail-and-ipv6/</link>
		<comments>http://notes.benv.junerules.com/all/software/slackware64-qmail-and-ipv6/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 13:34:46 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[djbdns]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[qmail]]></category>
		<category><![CDATA[slackware]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=485</guid>
		<description><![CDATA[Now that we have Xenbro up and running with a domain attached to it and a bunch of toy domU&#8217;s running, we soon ran into the need for a dns server and mailer. Needless to say I don&#8217;t like the default Sendmail and Bind junk very much (wonder why Slackware still ships it&#8230;), and my [...]]]></description>
			<content:encoded><![CDATA[<p>Now that we have Xenbro up and running with a domain attached to it and a bunch of toy domU&#8217;s running, we soon ran into the need for a dns server and mailer.<br />
Needless to say I don&#8217;t like the default Sendmail and Bind junk very much (wonder why Slackware still ships it&#8230;), and my experiences with Exim and Postfix aren&#8217;t all too great either.<br />
Sure, they work, but they&#8217;re too complex for my liking. I like to know what&#8217;s going on, so I still use my trusty old <a href="http://cr.yp.to/qmail.html">Qmail</a> and <a href="http://cr.yp.to/djbdns.html">Djbdns</a> for mail and dns.<br />
However, since those packages haven&#8217;t been updated in years, some newer features are missing. So I patch them 4 times over and stab them a bit so they work the way I like <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> <span id="more-485"></span></p>
<p>So what things are missing in the vanilla Qmail 1.03 package?</p>
<ul>
<li>IPv6 support</li>
<li>A ton of antispam features like SPF, DomainKeys, MFCHECK, etc</li>
<li>Authentication support</li>
<li>Filter support for stuff like Spamassassin, ClamAV, /dev/null</li>
<li>Virtual domains</li>
</ul>
<p>Probably more, but these are things I care about. Some of these points are not entirely true, for instance you could add filter support by mangling the <span style="color:#FF00FF">.qmail</span> files for all users, but these are things you want centralized so all things have to pass the filter, not for only a few accounts.<br />
In order to fix the missing features I use a few things.<br />
First of all: <a href="http://qmail.jms1.net/patches/combined-details.shtml">John M. Simpson&#8217;s combined patch</a>. This patch fixes more than half of the list. It&#8217;s a collection of smaller patches all rolled together in a nice patch that cleanly applies to qmail 1.0.3 as supplied by D.J. Bernstein. Thanks a lot to Mr Simpson! His pages also have a lot of notes and scripts on how to get qmail up and running, and how to run the services from daemontools. You might want to <a href="http://qmail.jms1.net/scripts/">check them out</a>.<br />
Next, I use <a href="http://www.inter7.com/index.php?page=vpopmail">vpopmail</a> to handle the virtual domains problem. Together with <a href="http://www.inter7.com/index.php?page=qmailadmin">qmailadmin</a> they make the virtual domains thing very easy.</p>
<p>Anyway, that is all old stuff. New stuff is having Qmail working correctly using <span style="color:#FFFF00">IPv6</span>.<br />
It&#8217;s easy to get it up and running, basically just compile qmail as usual and patch <a href="http://cr.yp.to/ucspi-tcp.html">ucspi-tcp</a> using <a href="http://www.fefe.de/ucspi/">Fefe&#8217;s IPv6 patch</a>. Make a few new qmail-smtp services for the IPv6 enabled addressses and go!<br />
While this does work for receiving mail, it fails for a few things in the combined patch &#8211; like SPF checking.<br />
You will run into stuff like:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">@</span>400000004acb39440ca58a8c qmail-smtpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">28952</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Received-SPF: unknown <span style="color: #7a0874; font-weight: bold;">&#40;</span>service.xenbro.nl: No IP address <span style="color: #000000; font-weight: bold;">in</span> conversation<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>Obviously this is a lie, but at least it&#8217;s dealt with gracefully. However, you want SPF checking for the IPv6 address!<br />
Fortunately, <a href="http://www.brandonturner.net/blog/2009/08/qmail-ipv6-jms1/">Brandon Turner</a> has patched this with a patch that applies to Qmail 1.0.3 when already patched with John&#8217;s patch. Enough patches for you? <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
After recompiling and restarting your services you will see that it works now. Thanks Brandon! <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">@</span>400000004acb4025340a0b5c qmail-smtpd<span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #000000;">31526</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>: Received-SPF: none <span style="color: #7a0874; font-weight: bold;">&#40;</span>service.xenbro.nl: domain at je.moeder.com does not designate permitted sender hosts<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>What does Slackware have to do with this?<br />
Nothing, I just like the way it runs the qmail services :-p</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/slackware64-qmail-and-ipv6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xen and routed IPv6</title>
		<link>http://notes.benv.junerules.com/all/software/xen-and-routed-ipv6/</link>
		<comments>http://notes.benv.junerules.com/all/software/xen-and-routed-ipv6/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 11:56:16 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=476</guid>
		<description><![CDATA[Xenbro has found its way into the Coloclue racks where it is now running with real IP addresses. The Coloclue network routes all IP space to the main IP address of the machine so that precious IP addresses are not &#8216;lost&#8217; to reserved network and broadcast addresses. This means that my /29 has 8 usable [...]]]></description>
			<content:encoded><![CDATA[<p>Xenbro has found its way into the Coloclue racks where it is now running with real IP addresses. The Coloclue network routes all IP space to the main IP address of the machine so that precious IP addresses are not &#8216;lost&#8217; to reserved network and broadcast addresses. This means that my /29 has 8 usable addresses in stead of only 6. In order to set this up you simply change the network-script and vif-script to the -route variants in <span style="color:#FF00FF">/etc/xen/xend-config.sxp</span> so it looks like this:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #7a0874; font-weight: bold;">&#40;</span>network-script network-route<span style="color: #7a0874; font-weight: bold;">&#41;</span><br />
<span style="color: #7a0874; font-weight: bold;">&#40;</span>vif-script &nbsp; &nbsp; vif-route<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>Easy. Make sure ip forwarding is enabled though (check <span style="color:#FFFF00">/proc/sys/net/ipv4/ip_forward</span>, it should be 1) , and for IPv6 forwarding you need to enable <span style="color:#FFFF00">/proc/sys/net/ipv6/conf/all/forwarding</span>. Note that you must enable it on the -all- directory, only enabling it on a single interface won&#8217;t do what you&#8217;d expect (this took me a while to figure out <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ).<br />
After requesting both a set of IPv4 and IPv6 addresses I stumbled upon Xen&#8217;s <span style="color:#00FFFF">/etc/xen/scripts/vif-route</span> script which doesn&#8217;t do anything with IPv6! Since I do want my IPv6 space routed to my domU (and probably to the others as well) I decided to molest the script a little. My modification assumes you provide both the IPv4 address and IPv6 range you want to use on the domU. Here&#8217;s the diff:<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=xen-3.4-vif-route-ipv6.diff" title="Downloaded 221 times">xen 3.4 vif-route patch to support IPv6</a> - Version  - SHA: e82dd95b8725c326121603fbd6168b3f88f5b881<br />
Note that my patch adds some extra logging as well, you can hack that out yourself if it annoys you.<br />
If patching is too difficult for you, here&#8217;s the patched vif-route script:<br />
<a href="http://notes.benv.junerules.com/wp-content/plugins/download-monitor/download.php?id=vif-route" title="Downloaded 219 times">Patched Xen 3.4.1 vif-route to support IPv6</a> - Version  - SHA: 29a28f4a8cff787233c1163435c86730fd5346fa</p>
<p>Don&#8217;t forget to put your IP addresses in your domU&#8217;s config file:</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># domU.cfg</span><br />
vif = <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">'mac=00:16:11:11:2b:11, ip=2345::1/64 192.168.2.100'</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span></div></div>
<p>After patching vif-route and enabling the script in xend-config.sxp you still have to set routes to the dom0 in your domU. Example for dom0 with 192.168.1.1 and 1234::1</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;"># IPv4</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>domU<span style="color: #666666; font-style: italic;"># ifconfig eth0 192.168.2.10 netmask 255.255.255.255 # Your domU's IPv4 address here</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>domU<span style="color: #666666; font-style: italic;"># ip ro add 192.168.1.1 dev eth0</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>domU<span style="color: #666666; font-style: italic;"># ip ro add default via 192.168.1.1</span><br />
<span style="color: #666666; font-style: italic;"># IPv6</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>domU<span style="color: #666666; font-style: italic;"># ip -6 addr add 2345::1/64 dev eth0 # Your domU's IPv6 range here</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>domU<span style="color: #666666; font-style: italic;"># ip -6 ro add 1234::1 dev eth0</span><br />
root<span style="color: #000000; font-weight: bold;">@</span>domU<span style="color: #666666; font-style: italic;"># ip -6 ro add default via 1234::1</span></div></div>
<p>Now it works (unless you did something stupid of course) <img src='http://notes.benv.junerules.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/xen-and-routed-ipv6/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Minor annoyance about linux</title>
		<link>http://notes.benv.junerules.com/all/software/minor-annoyance-about-linux/</link>
		<comments>http://notes.benv.junerules.com/all/software/minor-annoyance-about-linux/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 16:40:06 +0000</pubDate>
		<dc:creator>BenV</dc:creator>
				<category><![CDATA[Morons]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[ifconfig]]></category>
		<category><![CDATA[ipv4]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[proc]]></category>

		<guid isPermaLink="false">http://notes.benv.junerules.com/?p=309</guid>
		<description><![CDATA[So I&#8217;m working on a little info script (check out Infoscreen) so I can have a nice overview of my server when I look at console number one without having to log in etc. Simple question: &#8220;Where in /proc can I find a list of IP addresses with corresponding interfaces?&#8221; Simple answer: Try /proc/net/if_inet6! wouter@wouter-laptop:~:0&#62;cat [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;m working on a little info script (check out <a href="http://notes.benv.junerules.com/infoscreen/">Infoscreen</a>) so I can have a nice overview<br />
of my server when I look at console number one without having to log in etc.</p>
<p>Simple question:<br />
&#8220;Where in /proc can I find a list of IP addresses with corresponding interfaces?&#8221;</p>
<p>Simple answer:<br />
Try <code class="codecolorer text vibrant"><span class="text">/proc/net/if_inet6</span></code>!</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">wouter<span style="color: #000000; font-weight: bold;">@</span>wouter-laptop:~:<span style="color: #000000;">0</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>proc<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>if_inet6 <br />
00000000000000000000000000000001 01 <span style="color: #000000;">80</span> <span style="color: #000000;">10</span> <span style="color: #000000;">80</span> &nbsp; &nbsp; &nbsp; lo<br />
20010888148d0000022100fffe221352 04 <span style="color: #000000;">40</span> 00 00 &nbsp; &nbsp;wlan1<br />
fe80000000000000022100fffe221352 04 <span style="color: #000000;">40</span> <span style="color: #000000;">20</span> <span style="color: #000000;">80</span> &nbsp; &nbsp;wlan1</div></div>
<p>&#8230; that&#8217;s great&#8230;. but I really wanted the IPv4 addresses as well.<br />
&#8220;/proc/net/if_inet4&#8243; or &#8220;/proc/net/if_inet&#8221;? Noooooo&#8230;.</p>
<p>Conclusion: KANKER LINUX!</p>
<p>Obviously I can get the address by calling &#8216;<span style="color:#FF00FF">ip addr show</span>&#8216;, &#8216;<span style="color:#FF00FF">ifconfig</span>&#8216; or a heap of other solution involving calling <span style="color:#FF00FF">ioctl</span> on sockets or using the <span style="color:#FF00FF">netlink interface</span>&#8230; but seriously, blegh.</p>
<p>The most retarded thing is that pretty much every other statistic about my network devices is there&#8230; including active connections and whatnot, but ipv4 addresses? Nooooo&#8230;.. *RAAH*</p>
]]></content:encoded>
			<wfw:commentRss>http://notes.benv.junerules.com/all/software/minor-annoyance-about-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
