<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>julian&#039;s techblog</title>
	<atom:link href="http://jultech.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jultech.wordpress.com</link>
	<description>howtos, tutorials and tech-porn</description>
	<lastBuildDate>Fri, 27 Jan 2012 15:09:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='jultech.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>julian&#039;s techblog</title>
		<link>http://jultech.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jultech.wordpress.com/osd.xml" title="julian&#039;s techblog" />
	<atom:link rel='hub' href='http://jultech.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Android MIUI Camera for other ROMs</title>
		<link>http://jultech.wordpress.com/2011/04/23/android-miui-camera-for-other-roms/</link>
		<comments>http://jultech.wordpress.com/2011/04/23/android-miui-camera-for-other-roms/#comments</comments>
		<pubDate>Sat, 23 Apr 2011 00:33:25 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jultech.wordpress.com/?p=127</guid>
		<description><![CDATA[Preamble As someone who loves tinkering with his gadgets and tries to get the most out of them, i&#8217;ve always been somewhat disappointed with camera applications available for the android platform. Usually, they either cost money (Vignette), or are crappy anyway (Camera360), just adding some colorization filters to the functionality that is already provided by [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jultech.wordpress.com&amp;blog=4443938&amp;post=127&amp;subd=jultech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Preamble</h2>
<p>As someone who loves tinkering with his gadgets and tries to get the most out of them, i&#8217;ve always been somewhat disappointed with camera applications available for the android platform. Usually, they either cost money (Vignette), or are crappy anyway (Camera360), just adding some colorization filters to the functionality that is already provided by the stock Android camera.</p>
<p>The HTC camera applications that ship with their Sense UI are usually better than anything you&#8217;ll find in the Android market, sadly though, they rely on proprietary libraries shipped with Sense, which itself heavily modifies the Android UI system. Bottom line: unless you&#8217;re running a Sense ROM on your HTC Device, you simply can&#8217;t use the stock HTC Sense camera application.</p>
<p>As lots of people prefer a stable non-Sense (ha ha!) ROM such as Cyanogenmod on their device, running the HTC application is out of the question, and usually you&#8217;ll find a lot of people discontent with the stock Android camera app&#8217;s functionality. It lacks proper focusing modes (like tap to focus), the UI looks like it was written for the Gameboy and usually, you don&#8217;t find a lot of options to adapt the application&#8217;s behavior like shutter sounds.</p>
<p><span id="more-127"></span></p>
<h2>Deliverance</h2>
<p>A pretty nice Android camera application is the MIUI Camera. MIUI is an all-in-one ROM developed by a group of chinese developers that ships with customized look &amp; feel and a lot of their own apps replacing the stock Android ones. The slight downside to this ROM is that localization hasn&#8217;t progressed to the point where you can just expect that the application will greet you with menus in your native language, the best you can hope for is english. Another point is that you can&#8217;t just download MIUI&#8217;s apps from the market, since the developers evidently want them used solely with the MIUI ROM.</p>
<p>Would be silly if that stopped us though, wouldn&#8217;t it?</p>
<h2>Extraction and Implantation</h2>
<p>Since there are no easily installable .apk files available for this application, we&#8217;ll have to install MIUI Camera manually. This requires a rooted phone as well as a file manager application that is capable of accessing and altering the file&#8217;s internal memory partition. I can recommend <a href="https://market.android.com/details?id=com.speedsoftware.rootexplorer" target="_blank">Root Explorer</a>.</p>
<p>The MIUI Camera application ships with the MIUI ROM, so that&#8217;s where to get it. English MIUI ROM files tend to get announced in the xda-developers forums (<a href="http://forum.xda-developers.com/showthread.php?t=970196" target="_blank">this</a> contains the link to a current HTC DHD ROM thread). Since it&#8217;s a bit of overkill to download the entire ROM (65MiB) for just the small application, i have extracted the current (ROM version 1.4.22 v2) system .apk and uploaded it:</p>
<p><a href="http://www.multiupload.com/0AG6TRE9HQ" target="_blank">MiuiCamera.apk (412KiB)</a> on Multiupload</p>
<p>Now let&#8217;s get going. Get the .apk onto your SD card and unmount it from your computer so it can be accessed by the phone.</p>
<ul>
<li>
<p style="display:inline!important;">Open up Root Explorer and navigate to /sdcard.</p>
</li>
<li>
<p style="display:inline!important;">Long-press the MiuiCamera.apk entry and select &#8220;Move&#8221;.</p>
</li>
<li>
<p style="display:inline!important;">Use the back-button to navigate to the root directory and then go to /system/app.</p>
</li>
<li>
<p style="display:inline!important;">Use the button in the top right corner to re-mount your system partition to read+write (&#8220;Mount R/W&#8221;).</p>
</li>
<li>
<p style="display:inline!important;">Hit the button in the bottom saying paste. This should move the MiuiCamera.apk file to the internal application storage.</p>
</li>
<li>
<p style="display:inline!important;">Long-press the MiuiCamera.apk file and select Permissions. They&#8217;ll need to be rw-r&#8211;r&#8211;, meaning you&#8217;ll have to select Read for User/Group/Others as well as Write for User and deselect everything else.</p>
</li>
<li>
<p style="display:inline!important;">Re-mount as read only (&#8220;Mount R/O&#8221;).</p>
</li>
</ul>
<div>At this point, you&#8217;ll have to reboot. The Miui Camera should now be listed in your app drawer.</div>
<h2>Possible (or probable) fallacies</h2>
<p>The apk listed above is taken from the HTC Desire HD version of the MIUI ROM, meaning it may not work with other devices quite as flawlessly. If indeed it does not, and you still want to give the application a try, find your device&#8217;s forums on xda-developers and look out for a MIUI ROM thread containing a download link. You&#8217;ll find the .apk in the &#8220;flashable&#8221; ROM zip file under system/app/MiuiCamera.apk. As soon as you have that file, the above process should lead you to a desirable result.</p>
<h2>Links</h2>
<ul>
<li>
<p style="display:inline!important;"><a href="http://www.miuiandroid.com/roms/">http://www.miuiandroid.com/roms/</a></p>
</li>
<li><a href="http://forum.xda-developers.com/" target="_blank">http://forum.xda-developers.com/</a></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jultech.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jultech.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jultech.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jultech.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jultech.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jultech.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jultech.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jultech.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jultech.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jultech.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jultech.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jultech.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jultech.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jultech.wordpress.com/127/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jultech.wordpress.com&amp;blog=4443938&amp;post=127&amp;subd=jultech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jultech.wordpress.com/2011/04/23/android-miui-camera-for-other-roms/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b2c60fb26b41ff4d6c6cd33fa851374e?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=R" medium="image">
			<media:title type="html">bog</media:title>
		</media:content>
	</item>
		<item>
		<title>Chrome extension to remotely add torrents to WebUIs</title>
		<link>http://jultech.wordpress.com/2011/03/21/chrome-extension-to-remotely-add-torrents-to-webuis/</link>
		<comments>http://jultech.wordpress.com/2011/03/21/chrome-extension-to-remotely-add-torrents-to-webuis/#comments</comments>
		<pubDate>Mon, 21 Mar 2011 22:56:20 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jultech.wordpress.com/?p=116</guid>
		<description><![CDATA[It has been an entire year since I&#8217;ve last posted an article, and what better opportunity than the one year anniversary of that last post could there possibly be to present the offspring of my latest surge in productivity? None, i tell you! About Chrome Google Chrome, the up and coming web browser draws people [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jultech.wordpress.com&amp;blog=4443938&amp;post=116&amp;subd=jultech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It has been an entire year since I&#8217;ve last posted an article, and what better opportunity than the one year anniversary of that last post could there possibly be to present the offspring of my latest surge in productivity? None, i tell you!</p>
<h2>About Chrome</h2>
<p>Google Chrome, the up and coming web browser draws people toward itself in very much the same way that moths are drawn to the corona of a watchtower, <a href="http://www.webpronews.com/net-applications-chromes-market-share-jumps-to-107-percent-2011-02" target="_blank">exceeding the 10% mark</a> in terms of total browser market share and thereby bringing the WebKit HTML rendering engine to almost double as many people as Apple&#8217;s Safari has been able to.</p>
<p>As a relatively new browser (2.5 years old), and similar to most popular applications that permit the development of plug-ins, it has always had a flourishing community of developers that try and augment its capabilities to the best of their abilities (to the extent that Chrome allows them), and today I&#8217;m taking the time to introduce one that in its current form isn&#8217;t yet known to the Chrome platform.</p>
<p><span id="more-116"></span></p>
<p>The idea came up when I switched to Chrome over from Firefox and tried finding an extension that implemented the functionality of <a href="https://addons.mozilla.org/en-US/firefox/addon/bittorrent-webui/" target="_blank">Bittorrent WebUI</a>. There were a couple of extensions, mostly for one Bittorrent client (e.g. uTorrent, Transmission) at a time, and all of them seemed to work in one particular way: They produced a context menu entry over links that would send the underlying link&#8217;s URI to a pre-configured web interface &#8211; a pretty trivial implementation.</p>
<p>And this works fine &#8211; however only in a pretty confined scope: Sites that require any sort of authentication won&#8217;t work, as the URI that is passed to the WebUI can neither contain cookies (except uTorrent&#8217;s WebUI), nor does HTTP Basic Authentication information get passed along. And while the latter is pretty uncommon for most sites, the former renders these extensions pointless to use for any register-to-download tracker.</p>
<p>Firefox&#8217; Bittorrent WebUI performed its task differently: If the linked file resulted in a file ending in &#8220;.torrent&#8221;, it downloaded said file into a temporary directory and then upload the file to a WebUI of one&#8217;s choosing. This made the life of people who have their torrent client on a machine other than 127.0.0.1 a lot easier, and i&#8217;ll say that it was one of my top 3 most favorite addons for Firefox.</p>
<p>As Chrome&#8217;s extension API (the sum of things you can do using the browser&#8217;s programming interface itself) is extremely limited, most extensions have to rely solely on things you can accomplish using only JavaScript.</p>
<p>But let&#8217;s get down and dirty.</p>
<h2>Remote Torrent Adder</h2>
<p>This extension allows you to add torrents from your Browser to your favorite Bittorrent client&#8217;s WebUI. This works in such a way that it utilizes the Browser&#8217;s authentication information transparently &#8211; it downloads the torrent file into memory and then uploads it to the WebUI, rather than just sending a URI that the client may not get anything useful from.</p>
<p>Since Chrome does not let any extension manipulate or look at downloaded files, the way in which this extension catches download links of .torrent files is that it scans every page&#8217;s links for specific patterns that would indicate that when you click them, you&#8217;re downloading a .torrent file. Due to the fact that there is a myriad of torrent trackers out there that employ any arbitrary link format, it doesn&#8217;t make sense to scour the web and write patterns for every page. Instead, this extension makes it possible to add your own &#8220;filters&#8221; to recognize potential links.</p>
<p>As of the time of the writing of this article, it supports the following Bittorrent clients&#8217; WebUIs:<br />
- uTorrent &amp; uTorrent server (&amp; uTorrent for Mac?) (using the built-in WebUIs)<br />
- Vuze (using the Swing WebUI &amp; HTML WebUI plugins)<br />
- Transmission (using the built-in WebUI)<br />
- Torrentflux<br />
- rtorrent (using the ruTorrent extension)</p>
<p>Support for further clients is usually comparably easy to implement, so if you&#8217;re missing your favorite client in that list, give me a shout and i&#8217;ll see what i can whip up.</p>
<p>The extension has two routes of facilitating the adding of torrents &#8211; you can either right click on a link to bring up a context menu and use the extension&#8217;s entry to send the torrent behind the link to the WebUI, or use the click interception function that prevents a link from being downloaded and instead carries out the same functionality as the context menu entry.</p>
<h2>Filters</h2>
<p>Since the click interception function is perhaps the most important aspect of this extension &#8211; it makes adding a torrent to the WebUI a one click operation as opposed to two or more &#8211; the possibility to add custom filters is an equally important part of the extension&#8217;s preferences.</p>
<p>For maximum adaptivity, this extension uses regular expressions to match download links. What follows is a brief explanation for the regexp newbie on how to get a working regular expression from a sample link:</p>
<p>Consider this link: &#8220;https://ssl.somesite.com/torrents.php?action=download&amp;id=12345678&amp;authkey=0a1b2c3d4e5f6g7h8i9j&#8221;</p>
<p>We don&#8217;t care about the protocol itself &#8211; merely the site&#8217;s domain name itself should be kept in the pattern, so we strip the protocol and subdomain.</p>
<p>We get: &#8220;somesite.com/torrents.php?action=download&amp;id=12345678&amp;authkey=0a1b2c3d4e5f6g7h8i9j&#8221;</p>
<p>The most interesting part after the domain name should be the name of the script that delivers the .torrent files for downloading, in this case it&#8217;s &#8220;torrents.php&#8221;, so we leave that in. The parameter &#8220;action=download&#8221; identifies exactly what we want &#8211; to download a torrent &#8211; so that too is one that we won&#8217;t touch. Next up is an ID &#8211; this is a number identifying the torrent on the tracker&#8217;s side. Since we want to download other torrents as well that don&#8217;t have this unique ID, we&#8217;ll replace it with a placeholder that will match any kind of ID. Since those are numbers only, we use \d+. This catches any and all strings of numbers, and nothing but numbers.</p>
<p>Therefore: &#8220;somesite.com/torrents.php?action=download&amp;id=\d+&amp;authkey=0a1b2c3d4e5f6g7h8i9j&#8221;</p>
<p>Now what we have left is the parameter containing the authkey. Since our pattern before that parameter already contains a lot of information that will prevent it from matching links it shouldn&#8217;t, we might as well just cut it off entirely. Alternatively, we could replace the value of authkey to accept a string containing anything, and this anything may be of arbitrary length.</p>
<p>Thus: &#8220;somesite.com/torrents.php?action=download&amp;id=\d+&#8221;</p>
<p>Alternatively: &#8221;somesite.com/torrents.php?action=download&amp;id=\d+&amp;authkey=.+?&#8221;</p>
<p>As a last step, we will have to make this pattern actually work: some of the characters that were part of the original url are characters that have a very specific meaning in regular expressions, those are for the most part &#8220;.&#8221; (dot), &#8220;/&#8221; (forward slash) and &#8220;?&#8221; (question mark). To render them inert, we place a &#8220;\&#8221; (backslash) in front of them &#8211; we &#8220;escape&#8221; them:</p>
<p>Finally: &#8221;somesite\.com\/torrents\.php\?action=download&amp;id=\d+&#8221;</p>
<p>This will match any link that follows the naming pattern of the original link.</p>
<h2>Juicy Bits</h2>
<p><a href="https://chrome.google.com/webstore/detail/oabphaconndgibllomdcjbfdghcmenci" target="_blank">Remote Torrent Adder</a> in the Chrome web store</p>
<p>Feel free to ask for patterns, as long as you provide sample links, as well as support for further bittorrent clients that have a WebUI.</p>
<h2>CHANGELOG</h2>
<p>for newer ones, please consult the <a href="http://code.google.com/p/remote-torrent-adder/wiki/Changelog">Google Code page</a></p>
<p>v1.0.21:<br />
- fixed SSL support for transmission<br />
- added support for the Vuze Remote plugin (self-signed SSL certificates must be imported/accepted manually!)</p>
<p>v1.0.20:<br />
- fixed bug introduced in previous release</p>
<p>v1.0.19:<br />
-  added support for bittorrent links behind html buttons &#8211; please report if this breaks anything (like regular buttons).</p>
<p>v1.0.18:<br />
-  added support for Buffalo&#8217;s Bittorrent WebUI</p>
<p>v1.0.17:<br />
- added support for  Vuze&#8217;s HTML WebUI plugin</p>
<p>v1.0.16:<br />
- bugfix for rutorrent</p>
<p>v1.0.15:<br />
- added default label and directory settings to the rutorrent client.</p>
<p>v1.0.14:<br />
- made options more aesthetically pleasing, added more information</p>
<p>v1.0.13:<br />
- fixed an issue that would silently make urls without &#8220;.torrent&#8221; in them fail to load</p>
<p>v1.0.12:<br />
- (hopefully) fixed rutorrent and torrentflux support</p>
<p>v1.0.11:<br />
- added SSL support for Torrentflux and ruTorrent web interfaces</p>
<p>v1.0.10:<br />
-  fix to support for newer versions of chrome (due to <a href="http://googlechromereleases.blogspot.com/2011/04/beta-channel-update_18.html">this</a>)</p>
<p>v1.0.9:<br />
- simplified uTorrent handling<br />
- added Torrentflux support (please test and report, people)</p>
<p>v1.0.8:<br />
- added ruTorrent support (no SSL (yet?))</p>
<p>v1.0.6-v1.0.7:<br />
- fixed an options display bug with the regex filters (thanks Curtis)</p>
<p>v1.0.5:<br />
- added an option to hide the new address bar indicator<br />
- prettied up the options page</p>
<p>v1.0.4:<br />
- added an icon to the address bar to indicate that torrent links have been found</p>
<p>v1.0.0-v1.0.3:<br />
- a bit of code cleanup and resource bug fixing</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jultech.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jultech.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jultech.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jultech.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jultech.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jultech.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jultech.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jultech.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jultech.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jultech.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jultech.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jultech.wordpress.com/116/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jultech.wordpress.com/116/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jultech.wordpress.com/116/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jultech.wordpress.com&amp;blog=4443938&amp;post=116&amp;subd=jultech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jultech.wordpress.com/2011/03/21/chrome-extension-to-remotely-add-torrents-to-webuis/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b2c60fb26b41ff4d6c6cd33fa851374e?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=R" medium="image">
			<media:title type="html">bog</media:title>
		</media:content>
	</item>
		<item>
		<title>Netgear WNR3500L, Tomato und T-Home Entertain über VDSL</title>
		<link>http://jultech.wordpress.com/2010/03/21/netgear-wnr3500l-tomato-und-t-home-entertain-ueber-vdsl/</link>
		<comments>http://jultech.wordpress.com/2010/03/21/netgear-wnr3500l-tomato-und-t-home-entertain-ueber-vdsl/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 16:15:12 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[multimedia]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Entertain]]></category>
		<category><![CDATA[iptv]]></category>
		<category><![CDATA[t-home]]></category>
		<category><![CDATA[tomato]]></category>
		<category><![CDATA[vdsl]]></category>
		<category><![CDATA[WNR3500L]]></category>

		<guid isPermaLink="false">http://jultech.wordpress.com/?p=93</guid>
		<description><![CDATA[So. Lange (über ein Jahr) ists her, dass mich mein VDSL-Anschluss in ungeahnte Bandbreitensphären befördert hat. Für das erste halbe Jahr hatte ich &#8216;nen WRT54GL mit Tomato dran laufen &#8211; da lief Entertain nicht. Nach besagtem halben Jahr stellte ich &#8216;nen zweiten WRT54G hin &#8211; per Switch zusammen mit dem WRT54GL ans Modem (Speedport 300hs) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jultech.wordpress.com&amp;blog=4443938&amp;post=93&amp;subd=jultech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So. Lange (über ein Jahr) ists her, dass mich mein VDSL-Anschluss in ungeahnte Bandbreitensphären befördert hat. Für das erste halbe Jahr hatte ich &#8216;nen WRT54GL mit Tomato dran laufen &#8211; da lief Entertain nicht. Nach besagtem halben Jahr stellte ich &#8216;nen zweiten WRT54G hin &#8211; per Switch zusammen mit dem WRT54GL ans Modem (Speedport 300hs) angeschlossen &#8211; und hatte dann auch nach einiger Konfigurationsarbeit den Media-Receiver am Laufen. Nach viel Arbeit hab ich in diesem Jahr nun endlich eine Lösung für Tomato-Liebhaber, die einen in jeder Facette glücklich machen dürfte.</p>
<p>Das Ganze benötigt immer noch einiges an Konfiguration, aber läuft stabil und beinahe alles funktioniert.</p>
<p><span id="more-93"></span></p>
<h2><strong>Das Gerät</strong></h2>
<p>Kern dieses Tutorials ist der vergleichsweise neue WNR3500L von Netgear. Als kleiner Anriss zu den Hardwaredetails: 533MHz CPU, 64MB RAM, 8MB Flash, GBit Switch, 802.11n Wifi, ein USB-Port. Für läppische <a href="http://geizhals.at/deutschland/a470247.html" target="_blank">70 Euro inklusive Versand</a> ist er zu haben.</p>
<h2><strong>Das Flashen</strong></h2>
<p>Zunächst muss man sich der grässlichen Netgear-Firmware entledigen. Das funktioniert über ein Firmware-Upgrade zu DD-WRT. Die Firmware findet sich beispielsweise <a href="http://dd-wrt.com/routerdb/de/download/Netgear/WNR3500L/-/dd-wrt.v24-13309_NEWD-2_K2.6_mini-WNR3500L.chk/2304">hier</a>, in Zukunft ist der Link möglicherweise tot und man sollte <a href="http://dd-wrt.com/site/support/router-database" target="_self">hier</a> einfach &#8220;WNR3500L&#8221; eingeben und sich dann die &#8220;special file for initial flashing&#8221; besorgen.</p>
<p>Befinden wir uns nun unter DD-WRT, so sollten wir zunächst mal einen <a href="http://www.dd-wrt.com/wiki/index.php/DD-WRT_Doku_%28DE%29#Der_Hard-Reset_oder_30.2F30.2F30-Reset" target="_blank">NVRAM-Reset</a> durchführen.</p>
<p>Ist der Reset durch, so können wir mit dem Bespielen von Tomato beginnen. Das dazu nötige Flash-Image finden wir auch in Zukunft sicherlich <a href="http://www.linksysinfo.org/forums/showthread.php?t=63587" target="_blank">hier</a>, in naher Zukunft aber auch <a href="http://sourceforge.net/projects/tomatousb/files/Experimental%20%28beta%29" target="_blank">hier</a> unter &#8220;K26-MIPSR2&#8243;. Zur Auswahl: Jede der vier Versionen wird auf dem WNR3500L laufen. Die Unterschiede kann man, soweit die Dateinamen sie nicht ohnehin erklären, <a href="http://www.linksysinfo.org/forums/showpost.php?p=336896&amp;postcount=1" target="_blank">hier</a> nachlesen.</p>
<p>Unter DD-WRT begibt man sich nach Administration -&gt; Firmware-Upgrade und flasht den WNR3500L mit der Tomato-Firmware. Das Ganze kann eine ganze Weile dauern &#8211; am besten einfach mal so um die 5 Minuten zurücklehnen, bevor man irgendwas macht. Danach empfiehlt es sich, erneut einen NVRAM-Reset durchzuführen.</p>
<h2><strong>VDSL-Konfiguration unter Tomato</strong></h2>
<p>Läuft Tomato nun auf dem WNR, so gibt man zunächst mal seine Zugangsdaten unter Basic -&gt; Network ein, sobald man PPPoE als Type ausgewählt hat, und speichert ab. Unter Administration -&gt; Admin Access gehen wir sicher, dass der Telnet-Daemon aktiviert und am Laufen ist.</p>
<p>Dann öffnen wir eine Telnet-Session zum Router. Unter Windows geht das über Windowstaste+R (=Ausführen), &#8220;cmd&#8221; zum Öffnen einer Eingabeaufforderung und dortiger Eingabe von</p>
<blockquote>
<pre>telnet 192.168.1.1</pre>
</blockquote>
<p>Durch Legitimation mit &#8220;root&#8221; als Benutzername und &#8220;admin&#8221; als Passwort gelangen wir nun in die Eingabeaufforderung des Routers. Dort sind für den VDSL-Zugang folgende Befehle auszuführen:</p>
<blockquote>
<pre>nvram set vlan7hwname=et0
nvram set vlan7ports="0t 8"
nvram set wan_ifname=vlan7
nvram set wan_ifnameX=vlan7
nvram set wan_ifnames=vlan7
nvram commit
</pre>
</blockquote>
<p>Nach einem Reboot (Strom raus, Strom rein) dürfte nun die Internet-Einwahl auch schon direkt funktionieren. Was uns auch schon zum kompliziertesten Teil bringt&#8230;</p>
<h2>IPTV-Konfiguration</h2>
<p>Hier fließen diverse Problematiken (Broadcast/WLAN, RFC3442 dhcp options, igmpproxy) zusammen, und die hier vorgestellte Lösung ist die beste mir bekannte. Sie beinhaltet folgende Schritte:</p>
<ol>
<li>Isolation des Media Receivers durch Auftrennung des Switches des WNRs in einen 3-Port-Bereich für Computer und einen einzelnen Port, an den der Media Receiver angeschlossen wird</li>
<li>Konfiguration des vlan8 Interfaces inklusive DHCP/classless static routes</li>
<li>Konfiguration des igmpproxy</li>
<li>Zusätzliche Firewall-Regeln</li>
</ol>
<p>Der Reihe nach also:</p>
<h3>1. Isolation des Media Receivers auf Port 4 (den untersten) des Switches</h3>
<p>Weiterhin per Telnet an den Router:</p>
<blockquote>
<pre>nvram set vlan1hwname=et0
nvram set vlan1ports="4 3 2 1 8*"
nvram set vlan9hwname=et0
nvram set vlan9ports="1 8*"
nvram commit</pre>
</blockquote>
<p>Weiter im Web-Interface unter Advanced -&gt; DHCP / DNS. Dort in die Custom Configuration-Box Folgendes eintragen:</p>
<blockquote>
<pre>interface=vlan9
dhcp-range=iptv,192.168.2.50,192.168.2.100,255.255.255.0,1440m
dhcp-option=iptv,3,192.168.2.1
dhcp-option=iptv,6,192.168.2.1
</pre>
</blockquote>
<p>Dann abspeichern. Dabei ist darauf zu achten, dass die vorletzte Stelle der IP <strong>nicht</strong> gleich der sein darf, die unter Basic -&gt; Network unter LAN angegeben ist.</p>
<p>Weiterhin sind unter Administration -&gt; Scripts -&gt; Firewall folgende Zeilen einzutragen:</p>
<blockquote>
<pre># multicast vlan interface: device configuration
ifconfig vlan9 up
ifconfig vlan9 192.168.2.1

# multicast vlan interface: iptables rules
iptables -I INPUT -i vlan9 -j ACCEPT
iptables -I OUTPUT -o vlan9 -j ACCEPT
iptables -A FORWARD -i vlan9 -o br0 -j ACCEPT
iptables -A FORWARD -i br0 -o vlan9 -j ACCEPT
iptables -A FORWARD -i vlan9 -j ACCEPT</pre>
</blockquote>
<p>Damit wird Routing zwischen dem LAN- und dem Media Receiver-Subnetz ermöglicht, sowie der Zugang des letzteren zum Internet.</p>
<p>Nun muss dem Media Receiver unter Basic -&gt; Static DHCP eine statische IP im 192.168.2.x-Subnetz angedichtet werden. Dazu ist die sechsstellige MAC-Adresse dessen LAN-Adapters nötig, die man unter Status -&gt; Device List angezeigt bekommt, wenn man den Media Receiver an den Router anschließt.</p>
<p>Abschließend sollte man den Router mit an Port 4 angeschlossenem Media Receiver rebooten um sicher zu gehen, dass der Media Receiver auch eine IP im korrekten Subnetz (.2.x) bekommt (abermals unter Status -&gt; Device List).</p>
<h3>2. Konfiguration des vlan8 Interfaces</h3>
<p>Abermals per Telnet:</p>
<blockquote>
<pre>nvram set vlan8hwname=et0
nvram set vlan8ports="0t 8"
nvram commit
</pre>
</blockquote>
<p>Danach nochmal rebooten. Sobald das Web-Interface des Routers wieder da ist, ist unter Administration -&gt; Scripts -&gt; Firewall <strong>unter </strong>die schon vorhandenen Zeilen Folgendes einzutragen:</p>
<blockquote>
<pre># prepare iptv interface
if [ ! "UP" == "$(ip addr | grep -i vlan8 | awk '{split($0,a,",");print a[3];}')" ] ; then
 ifconfig vlan8 up
fi

# get ip, restart wan if it works
if [ ! -e /var/run/iptv.pid  ] ; then
 udhcpc -i vlan8 -s dhcpc-event -p /var/run/iptv.pid
 service wan restart
fi</pre>
</blockquote>
<p>Hier wird das IPTV-Interface aktiviert und danach mit einer dynamischen IP nebst per DHCP verteilten statischen Routen zur IPTV-Infrastruktur versorgt. Es ist zwar eher unsauber, soetwas ins Firewall-Script zu schreiben, aber letzteres repräsentiert den einzigen Hook, der zu einem Zeitpunkt aufgerufen wird, zu dem alle benötigten Interfaces bereit sind, Befehle entgegen zu nehmen.</p>
<p>Auch hier schadet ein Reboot nicht.</p>
<h3>3. Konfiguration des igmpproxy</h3>
<p>Im Web-Interface unter Admin -&gt; JFFS den Haken bei Enable setzen und auf Format / Erase&#8230; klicken. Das erstellt eine permanente Partition auf dem Flash-Chip, die wir nun mit Daten beschreiben können.</p>
<p>Sobald der Formatierungsvorgang fertig ist, öffnen wir abermals eine Telnet-Session. Dort besorgen wir uns den igmpproxy mitsamt funktionierender Konfiguration für T-Home:</p>
<blockquote>
<pre>cd /jffs
wget http://84.23.68.39/tomato/igmpproxy2
wget http://84.23.68.39/tomato/igmp.conf
chmod +x igmpproxy2
</pre>
</blockquote>
<p>Die Konfigurationsdatei ist stark auf dieses Tutorial angepasst. Solltet ihr also Änderungen durchgeführt haben, so solltet ihr analog dazu auch den Inhalt dieser Datei anpassen.</p>
<p>Weiter im Web-Interface: Unter Advanced -&gt; Firewall den Haken bei Allow Multicast wegmachen.</p>
<p>Dann nach Administration -&gt; Scripts. Dort unter Init folgende Zeilen einfügen:</p>
<blockquote>
<pre>sleep 120
/jffs/igmpproxy2 /jffs/igmp.conf &amp;
</pre>
</blockquote>
<p>Dies startet 2 Minuten nachdem der Router hochgefahren ist  den  IGMP-Nachrichten weiterleitenden igmpproxy.</p>
<h3>4. Zusätzliche Firewall-Regeln</h3>
<p>Unter Administration -&gt; Scripts -&gt; Firewall <strong>unter</strong> die vorhandenen Zeilen Folgendes einfügen:</p>
<blockquote>
<pre># iptv rules
iptables -I INPUT -d 224.0.0.0/4 -j ACCEPT
iptables -I FORWARD -d 224.0.0.0/4 -j ACCEPT
iptables -t nat -A POSTROUTING  -o vlan8 -j MASQUERADE
iptables -A FORWARD -s 217.0.119.0/24 -i vlan8 -j ACCEPT
iptables -A FORWARD -s 193.158.35.0/23 -i vlan8 -j ACCEPT
iptables -A FORWARD -s 87.141.147.0/24 -i vlan8 -j ACCEPT
iptables -A FORWARD -s 217.6.167.0/24 -i vlan8 -j ACCEPT</pre>
</blockquote>
<p>Dann abspeichern. Das sind Firewall-Regeln, die dem Media Receiver den IPTV- sowie Internetzugang ermöglichen.</p>
<p>Nach einem Reboot sollte dann mit in Port 4 eingestecktem Media Receiver nach ein wenig Wartezeit (ich würde schon mal so 3-4 Minuten veranschlagen.. Aber ist ja nicht schlimm, denn wer rebootet seinen Router auch ständig?) das Fernsehen sowie das Internet auch schon problemlos laufen. Die restliche Konfiguration des Routers könnt ihr nach eurem Ermessen ab hier durchführen.</p>
<h2>Optionales</h2>
<p>Als Appendix hier noch ein paar kleine Spielereien, die den Genuss der Kombination noch ein wenig erhöhen dürften:</p>
<h3>SNMP-Daemon zum Netzwerk-Monitoring</h3>
<p>Während der eingebaute Bandbreiten-Graph von Tomato schon ganz toll ist, will ein mancher möglicherweise etwas zentraler Statistiken anlegen; beispielsweise mit Hilfe von <a href="http://oss.oetiker.ch/mrtg" target="_blank">MRTG</a> oder dem darauf basierenden <a href="http://www.cacti.net/" target="_blank">Cacti</a>. Dazu gibt es den kleinen und performanten <a href="http://members.aon.at/linuxfreak/linux/mini_snmpd.html" target="_blank">mini_snmpd</a>. Per Telnet-Session:</p>
<blockquote>
<pre>cd /jffs
wget http://84.23.68.39/tomato/mini_snmpd
chmod +x mini_snmpd
</pre>
</blockquote>
<p>Dann im Web-Interface unter Administration -&gt; Scripts -&gt; Init nach Möglichkeit noch vor der sleep-Zeile folgende Zeile hinzufügen:</p>
<blockquote>
<pre>/jffs/mini_snmpd -i ppp0,vlan8
</pre>
</blockquote>
<p>Wie genau die dazugehörigen OIDs zu beschaffen sind, habe ich in <a href="http://www.linksysinfo.org/forums/showpost.php?p=358812&amp;postcount=75" target="_blank">diesem Forenposting</a> beschrieben. Bei ppp0 handelt es sich um den Traffic der Internet-Verbindung, bei vlan8 um den des IPTV-Interfaces.</p>
<h3>IPTV vom PC aus via VLC</h3>
<p>Während das mit dem Speedport noch funktioniert hat, geht das mit der Konfiguration von hier aufgrund des abgetrennten IPTV-Subnetzes nicht mehr. Wir verwenden dazu stattdessen die Software <a href="http://sourceforge.net/projects/udpxy/" target="_blank">udpxy</a>. Abermals per Telnet-Session:</p>
<blockquote>
<pre>cd /jffs
wget http://84.23.68.39/tomato/udpxy
chmod +x udpxy</pre>
</blockquote>
<p>Dann im Web-Interface unter Administration -&gt; Scripts -&gt; Init, nach Möglichkeit genau nach der igmpproxy-Zeile Folgendes anfügen:</p>
<blockquote>
<pre>/jffs/udpxy -S -a br0 -p 4022 -m vlan8
</pre>
</blockquote>
<p>Damit wird der udpxy als Daemon gestartet und hört auf Port 4022 der Router-IP auf Anfragen, um UDP-Streams zu HTTP-Streams zu übersetzen. Die Statusseite unter http://192.168.1.1:4022/status verrät auch direkt, wie die bislang für VLC verwendeten rtp-Adressen umgewandelt werden müssen. Eine angepasste Playliste für die Router-IP 192.168.1.1 und den besagten Port habe ich <a href="http://84.23.68.39/tomato/T-Home_vlc09x_udpxy.m3u" target="_blank">hier</a> hochgeladen.</p>
<p>Fix noch rebooten und alles sollte laufen.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jultech.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jultech.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jultech.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jultech.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jultech.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jultech.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jultech.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jultech.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jultech.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jultech.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jultech.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jultech.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jultech.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jultech.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jultech.wordpress.com&amp;blog=4443938&amp;post=93&amp;subd=jultech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jultech.wordpress.com/2010/03/21/netgear-wnr3500l-tomato-und-t-home-entertain-ueber-vdsl/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
<enclosure url="http://84.23.68.39/tomato/T-Home_vlc09x_udpxy.m3u" length="2977" type="audio/x-mpegurl" />
	
		<media:content url="http://1.gravatar.com/avatar/b2c60fb26b41ff4d6c6cd33fa851374e?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=R" medium="image">
			<media:title type="html">bog</media:title>
		</media:content>
	</item>
		<item>
		<title>WRT54GL, Tomato und VDSL</title>
		<link>http://jultech.wordpress.com/2009/03/31/wrt54gl-tomato-und-vdsl/</link>
		<comments>http://jultech.wordpress.com/2009/03/31/wrt54gl-tomato-und-vdsl/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 11:56:17 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[tomato]]></category>
		<category><![CDATA[vdsl]]></category>
		<category><![CDATA[wrt54g]]></category>

		<guid isPermaLink="false">http://jultech.wordpress.com/?p=81</guid>
		<description><![CDATA[Hier die versprochene Kurzanleitung. (jetzt noch kuerzer fuer Tomato 1.25!) zunaechst mal den WRT wie gewohnt auf PPPoE konfigurieren. Fuer die weiteren Schritte muss entweder Telnet oder SSH (Administration -&#62; Admin Access) aktiviert sein. Als Telnet-/SSH-Client bietet sich unter Windows PuTTY an. Man loggt sich also auf den WRT ein und gibt folgende Befehle ein: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jultech.wordpress.com&amp;blog=4443938&amp;post=81&amp;subd=jultech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hier die versprochene Kurzanleitung. (jetzt noch kuerzer fuer Tomato 1.25!)</p>
<p>zunaechst mal den WRT wie gewohnt auf PPPoE konfigurieren. Fuer die weiteren Schritte muss entweder Telnet oder SSH (<strong>Administration</strong> -&gt; <strong>Admin Access</strong>) aktiviert sein. Als Telnet-/SSH-Client bietet sich unter Windows <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">PuTTY</a> an.</p>
<p>Man loggt sich also auf den WRT ein und gibt folgende Befehle ein:</p>
<blockquote><p>nvram set vlan7hwname=et0<br />
nvram set vlan7ports=&#8221;4t 5&#8243;<br />
nvram set wan_ifnameX=vlan7<br />
nvram commit</p></blockquote>
<p>Man beachte, dass es sich hinter &#8220;et&#8221; um eine NULL handelt. Durch den Commit wird das ganze abgespeichert. Der Rest laeuft ueber das Web-Interface ab. Unter <strong>Administration</strong> -&gt; <strong>Scripts</strong> legen wir im Init-Script folgende Zeilen ab:</p>
<blockquote><p>ifconfig vlan7 up<br />
service wan stop<br />
service wan restart</p></blockquote>
<p>Das Ganze noch abspeichern und den Router rebooten. Ab da sollte der Router sich dann kurz nach dem Hochbooten erfolgreich einwaehlen.</p>
<p>Wer die maximale Geschwindigkeit vermisst (ein WRT54GL schafft mit dem Stock-Speed von 200Mhz nur knappe 35Mbit/s), kann zusaetzlich seinen Router einen Tick (naja, 25%!) uebertakten. Hier wieder per Telnet/SSH:</p>
<blockquote><p>nvram set clkfreq=250<br />
nvram commit</p></blockquote>
<p>und rebooten &#8211; ohne QoS bekommt man beispielsweise per Bittorrent dann einigermassen stabile 5,5MByte/s.</p>
<p>Angemerkt sei weiterhin, dass es sich hier immernoch nicht um die perfekte Loesung handelt. Man muss zwar nicht mehr selbst Hand anlegen, damit er sich einwaehlt; es handelt sich bei den Befehlen im Init-Script allerdings um einen moeglicherweise zeitverschlingenden Workaround, der mit einer neuen Tomato-Version sicherlich schoener zu loesen ist. Zu gegebenem Zeitpunkt werd ich diesen Artikel dann anpassen.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jultech.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jultech.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jultech.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jultech.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jultech.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jultech.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jultech.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jultech.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jultech.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jultech.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jultech.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jultech.wordpress.com/81/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jultech.wordpress.com/81/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jultech.wordpress.com/81/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jultech.wordpress.com&amp;blog=4443938&amp;post=81&amp;subd=jultech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jultech.wordpress.com/2009/03/31/wrt54gl-tomato-und-vdsl/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b2c60fb26b41ff4d6c6cd33fa851374e?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=R" medium="image">
			<media:title type="html">bog</media:title>
		</media:content>
	</item>
		<item>
		<title>Tomato und VDSL</title>
		<link>http://jultech.wordpress.com/2009/03/03/tomato-und-vdsl/</link>
		<comments>http://jultech.wordpress.com/2009/03/03/tomato-und-vdsl/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 14:35:32 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[iptv]]></category>
		<category><![CDATA[t-home]]></category>
		<category><![CDATA[tomato]]></category>
		<category><![CDATA[vdsl]]></category>
		<category><![CDATA[wrt54g]]></category>

		<guid isPermaLink="false">http://jultech.wordpress.com/?p=61</guid>
		<description><![CDATA[Update! Ich war mal so frei und hab eine selbststaendig laufende Loesung aufgeschrieben. Schaut&#8217;s euch hier an: Klick! Dieser Artikel handelt von einer technischen Umsetzung, die so wirklich nur in Deutschland bislang Anwendung findet &#8211; daher verfasse ich diesen Artikel auf deutsch. Seit knapp zwei Jahren bietet unsere allseits heissgeliebte Telekom unter dem Namen T-Home [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jultech.wordpress.com&amp;blog=4443938&amp;post=61&amp;subd=jultech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Update! </strong>Ich war mal so frei und hab eine selbststaendig laufende Loesung aufgeschrieben. Schaut&#8217;s euch hier an: <a href="http://jultech.wordpress.com/2009/03/31/wrt54gl-tomato-und-vdsl/" target="_self">Klick!</a></p>
<p>Dieser Artikel handelt von einer technischen Umsetzung, die so wirklich nur in Deutschland bislang Anwendung findet &#8211; daher verfasse ich diesen Artikel auf deutsch.</p>
<p>Seit knapp zwei Jahren bietet unsere allseits heissgeliebte Telekom unter dem Namen T-Home ihre Entertain-Tarife an, die wahlweise mit VDSL (25/5 oder 50/10 MBit) geschaltet werden koennen. Da, wie der Name bereits verraet, ein IPTV-Paket dabei ist, verwendet die Telekom das sogenannte VLAN-Tagging, um die gewoehnliche Internetleitung (Surfen, Email, P2P, etc) von der Leitung zu trennen, die die IPTV-Inhalte an die mitgelieferte Settop-Box zuliefert.</p>
<p>Die derzeit standardmaessig von der Telekom ausgelieferte Modem-Router-Loesung Speedport w721v beherrscht dieses VLAN-Tagging sowie die Aufspaltung der beiden Netze auch problemlos. Waere ja dreist wenn anders. Allerdings ist sie gravierenderweise nicht in der Lage, die vollen 50 MBit an Durchsatz zu erreichen. Nichtmal im PPPoE-Passthrough Modus; d.h. wenn man den Speedport als reines Modem verwendet und das Routen eine andere Kiste &#8211; beispielsweise einen WRT54G(L/S) uebernehmen laesst. Das einzig praktische an diesem Speedport ist, dass er im Modem-Modus das VLAN-tagging uebernimmt. Somit funktionierte bislang VDSL mit meinem WRT54GL mit Tomato-Firmware ganz prima &#8211; mit dem Abstrich der etwas traurigen Downstream-Leistung.</p>
<p>Da es allerdings den Speedport 300HS, der frueher durch die Telekom fuer VDSL als Modem-Loesung vor einem Router-only Speedport w700v eingesetzt wurde, auf eBay fuer 10 Euro inklusive Versand gibt, denkt man sich doch, dass man seine Situation eventuell doch verbessern koennte. Noch dazu gibt es genuegend Meldungen, dass der 300HS die volle 50MBit-Bandbreite schafft.</p>
<p>Da <a href="http://www.polarcloud.com/tomato" target="_blank">Tomato</a> eine Funktion fuer&#8217;s VLAN-Tagging, das wie zuvor erwaehnt fuer den Aufbau der PPPoE-Verbindung noetig ist, ab Werk nicht beherrscht (DD-WRT tut das z.B. in den neuesten Releases, aber wer mag schon DD-WRT ; ), ist der Weg dahin nun Inhalt dieses Beitrags.<span id="more-61"></span></p>
<h2>Zunaechst ein paar Details:</h2>
<p>Das Modem verbindet per Telefonleitung den Router mit dem DSLAM. Fuer eine Einwahl ueber das PPPoE-Protokoll durch den Router wird ein VLAN-Tag mit der VID7 (VLAN-ID) erwartet. Sonst passiert erstmal gar nichts.</p>
<p>WRT54G(L/S)s bestehen aus drei (fuer diese Erklaerung relevanten) <a href="http://garycourt.com/wp-content/images/WRT54_sw2_internal_architecture.png" target="_blank">Komponenten</a>: dem WLAN-Modul, dem Switch und der CPU. Switch und WLAN-Modul sind mit der CPU verbunden, die beispielsweise NAT, QoS, Port Forwarding und sonst auch groesstenteils alles, was algorithmische Rechenleistung verlangt, uebernimmt. Das WLAN-Modul koennen wir fuer dieses Tutorial ausser acht lassen, da unrelevant. Das interessante ist nun der Switch. Rein physisch handelt es sich dabei um einen 6-Port Switch. Dieser unterteilt sich in vier LAN-Ports, einen WAN-Port, an den das Modem angeschlossen wird, und einen internen Port, der direkt mit der CPU verloetet ist. Um die Sicherheit, die der Natur eines NAT-betreibenden Routers inne liegt zu gewaehrleisten, sind besagte LAN-Ports und der WAN Port von einander durch schon erwaehnte VLANs getrennt. Dabei handelt es sich grob gesagt um eine Softwareloesung, um in einem physikalisch zusammenhaengenden Netzwerk mehrere, von einander getrennte virtuelle Netzwerke zu erschaffen. Die meisten WRT54G(L/S)-Firmwares loesen dies ueber abspalten verschiedener Ports. Standardmaessig sind dabei die LAN-Ports in einem VLAN (vlan0) zusammen mit dem internen, zur CPU verbindenden Switch-Port, und ein weiteres virtuelles Netzwerk (vlan1) wird durch die Verbindung zwischen WAN-Port und dem internen Switch-Port aufgespannt. Damit man nun aus dem LAN ein Paket ins Internet schicken kann, wird ein eben solches Paket zwischen den beiden VLANs geforwarded. Gut, soviel dazu.</p>
<p>Tomato&#8217;s VLAN1 wird standardmaessig zum Einwaehlen verwendet. Wenn man sowas auf einem Desktop-Linux wie beispielsweise Ubuntu macht, verwendet man ueblicherweise eth0 oder Aehnliches, eben ein Netzwerkinterface, an dem das Modem angeschlossen ist, aber hier ist das eben anders. Soviel nur am Rande.</p>
<p>Tomato selbst beherrscht VLAN-Tagging. Allerdings ist eine fuer die T-Home VDSL Leitungen noetige Konfiguration weder im Web-Interface (WebIF) vorhanden, noch laesst sie sich ueber selbiges erreichen. Somit wird alles VLAN-relevante in diesem Artikel ueber die Kommandozeile &#8211; also ueber SSH oder Telnet erfolgen. Beide koennt ihr im WebIF unter <strong>Administration</strong> -&gt; <strong>Admin Access </strong>einschalten. Fuer die Terminalverbindung eignet sich nun unter Windows <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">PuTTY</a> am besten. Linux-Benutzer werden sich in Sachen Terminalclients sicher auch auskennen.</p>
<h2>Gut, legen wir los.</h2>
<p>Zunaechst mal sollte PPPoE-technisch alles im WebIF vorkonfiguriert sein; sprich die Einwahldaten sollten korrekt angegeben sein.</p>
<p>Als naechstes loggen wir uns per SSH oder Telnet auf den Router ein. Dort schauen wir uns zunaechst mal die aktuelle VLAN1-Verteilung an:</p>
<blockquote><p># nvram get vlan1ports<br />
4 5</p></blockquote>
<p>So beispielsweise koennte die Ausgabe aussehen. Port Nummer 5 wird auf jeden Fall als zweiter Port dort stehen, die erste Portnummer ist je nach WRT54G(L/S)-Revision <a href="http://www.dd-wrt.com/wiki/index.php/Switched_Ports#The_Port_Numbering_Explained" target="_blank">unterschiedlich</a>. Wie das bei anderen von Tomato unterstuetzten Geraeten, bspw. den Buffalo- oder Asus-Routern aussieht, weiss ich leider nicht.</p>
<p>Wir erstellen jetzt jedenfalls zwei neue VLAN-NVRAM-Variablen, die den WRT beim Neustart dann dazu veranlassen, ein neues VLAN zu erstellen. Analog zur obigen Ausgabe:</p>
<blockquote><p># nvram set vlan7hwname=et0<br />
# nvram set vlan7ports=&#8221;4t 5&#8243;<br />
# nvram set manual_boot_nv=1<br />
# nvram commit<br />
Commit&#8230; done.<br />
#</p></blockquote>
<p>Zeilenweise erklaert: Dem VLAN mit der VID7 wird das et0-Device (der Switch) zugeordnet; danach werden der WAN- und der interne CPU-Switchport dem VLAN zugewiesen. Dabei wird der WAN-Port als &#8220;tagged&#8221; deklariert; ihn verlassen die Pakete getaggt &#8211; eben so wie es der VDSL-DSLAM erwartet. Zeile drei dient dazu, das Init-Script der Firmware davon abzuhalten, die VLAN-Konfiguration zu aendern. Laut diversen Foreneintraegen ist das nur ab Revision 4.0 des WRT54G und bei den WRT54GLs noetig, aber selbst bei meinem WRT54GL war das unnoetig, da es nach Reboots dahingehend keine Probleme gab. Kann also testweise mal rausgelassen werden. Zeile vier speichert das Ganze dann in den Flashspeicher.</p>
<p>Nach einem Reboot koennen wir dann wieder durchs Terminal nachschauen, ob das vlan7-interface angelegt wurde:</p>
<blockquote><p># cat /proc/net/vlan/vlan7</p></blockquote>
<p>Alternativ:</p>
<blockquote><p># ifconfig vlan7</p></blockquote>
<p>tritt bei einem der Befehle ein Fehler auf, geht nochmal einen Schritt zurueck und ueberprueft, was ihr vorher getippt habt. Bekommt ihr eine passende Ausgabe, dann stimmt soweit alles.</p>
<p>Als naechstes, und das wird zur aktuellen Firmware-Revision 1.23 nach jedem Reboot noetig sein, aktivieren wir das vlan-interface und tragen es als wan-interface ein.</p>
<blockquote><p># ifconfig vlan7 up<br />
# nvram set wan_ifname=vlan7</p></blockquote>
<p>Danach reicht ein simples</p>
<blockquote><p># service wan restart</p></blockquote>
<p>und der Router verhaelt sich, als waeren wir an einer gewoehnlichen PPPoE-Verbindung. Alles fertig.</p>
<h2>Abschliessende Worte</h2>
<p>Die WRT54G(L/S) erreichen bei Speedtests mit der hier beschriebenen Methode zwar einen durchaus hoeheren Durchsatz als der w721v alleine, schaffen aber leider nicht den vollen Durchsatz von 50Mbit/s im Downstream. Dazu bietet sich an, den Router zu uebertakten. Das Ganze laesst sich wie beispielsweise <a href="http://wiki.openwrt.org/OpenWrtDocs/Customizing/Hardware/Overclocking" target="_blank">hier beschrieben</a> durchfuehren &#8211; als Testwerte kann man mal bei 216Mhz anfangen und sich dann langsam aufwaerts bis 250Mhz wagen &#8211; mehr wuerde ich ohne Kuehlmodifikation nicht versuchen.</p>
<p>Mit erwaehnten 250Mhz hatte zumindest mein WRT54GL v1.1 dann einen Durchsatz von 5,6Mbyte/s, was auch so ziemlich dem Maximum entspricht. Mit aktiviertem QoS fiel der Wert leider um 1Mbyte/s geringer aus, ein Router mit schnellerer CPU waere also durchaus eine Anschaffung wert. Leider gibt es derzeit keine signifikant leistungsstaerkeren CPUs in Routern, die von Tomato unterstuetzt werden. Somit erachte ich diese Loesung einfach mal als die bestmoegliche.</p>
<p>Als letzte Notiz moechte ich noch hinzufuegen, dass ich diesen Artikel in praegnanterer Kurzform (ist ja ein halbes Buch geworden&#8230;) neu erstellen werde, sobald Tomato 1.24 released wurde. Momentan arbeite ich mit einer Beta der 1.24-Firmware, in welcher sich die Umstellung der NVRAM-Variable nach jedem Bootvorgang des Routers sparen laesst &#8211; weil sich naemlich dort die wan_ifname-Variable nicht jedesmal auf vlan1 zuruecksetzt (oder man dies zumindest umgehen kann). Vielen Dank hierfuer geht an Jonathan Zarate, Urheber und Entwickler der auf HyperWRT basierenden Tomato-Firmware.</p>
<p>Vielleicht kriege ich bis dahin auch die IPTV-Scheisse hin.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jultech.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jultech.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jultech.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jultech.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jultech.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jultech.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jultech.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jultech.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jultech.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jultech.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jultech.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jultech.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jultech.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jultech.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jultech.wordpress.com&amp;blog=4443938&amp;post=61&amp;subd=jultech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jultech.wordpress.com/2009/03/03/tomato-und-vdsl/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b2c60fb26b41ff4d6c6cd33fa851374e?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=R" medium="image">
			<media:title type="html">bog</media:title>
		</media:content>
	</item>
		<item>
		<title>Guide to a clean and powerful Codec System</title>
		<link>http://jultech.wordpress.com/2008/09/15/guide-to-a-clean-and-powerful-codec-system/</link>
		<comments>http://jultech.wordpress.com/2008/09/15/guide-to-a-clean-and-powerful-codec-system/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 18:25:42 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[multimedia]]></category>
		<category><![CDATA[codec pack]]></category>
		<category><![CDATA[codecs]]></category>
		<category><![CDATA[ffdshow]]></category>
		<category><![CDATA[media player classic]]></category>
		<category><![CDATA[media player classic home cinema]]></category>
		<category><![CDATA[mpc-hc]]></category>
		<category><![CDATA[videos]]></category>

		<guid isPermaLink="false">http://jultech.wordpress.com/?p=50</guid>
		<description><![CDATA[Many will know the turmoil: After installing a codec pack like say, K-Lite or Nimo&#8217;s Codec pack (for the oldschoolers), your player sometimes crashes when opening a movie file, your explorer dies off when you highlight a movie file, sometimes there&#8217;s flickering when playing back a movie, an entirely green screen when playing back a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jultech.wordpress.com&amp;blog=4443938&amp;post=50&amp;subd=jultech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Many will know the turmoil: After installing a codec pack like say, K-Lite or Nimo&#8217;s Codec pack (for the oldschoolers), your player sometimes crashes when opening a movie file, your explorer dies off when you highlight a movie file, sometimes there&#8217;s flickering when playing back a movie, an entirely green screen when playing back a movie, or annoyances of the such. All of those are clear cases of a fucked up codec system.</p>
<p>Video playback operates by using Codecs, those are used to render video data via Microsoft&#8217;s DirectShow system. How these Codecs are loaded is referenced in the so-called &#8220;Merit System&#8221;. When you install multiple codec packs, or even multiple codecs that can render the same kind of video data, it is no longer clear which codec is going to be used when you play back a video file. Additionally, many codecs that are installed by some of the many codec packs in existence are beta versions; highly unstable and hence often prone to lead to applicational failure.</p>
<p>This guide will tell you how clean your merit system to the point where it is as tidy as the one on a fresh windows install, and afterwards i&#8217;ll point out how to set up a powerful and yet (in terms of software) minimalistic multimedia codec system.</p>
<p><span id="more-50"></span></p>
<p><strong>The Cleanup</strong></p>
<p>We&#8217;ll need a piece of Software for this job: Zoom Player. It&#8217;s a powerful player that has a shitload of features, but might bring too big a change in usability from your usual media player; hence you&#8217;re free to delete it after the first few steps.</p>
<ol>
<li>Get <a title="Zoom Player Download Site" href="http://www.inmatrix.com/files/zoomplayer_download.shtml" target="_blank">Zoom Player.</a></li>
<li>Start it, then hit Ctrl+O to open up the Options Dialog.</li>
<li>Switch to Advanced Mode using the button in the bottom left area of the Dialog.</li>
<li>Go to System -&gt; Filter Management and hit the &#8220;Registered Filter Manager&#8221;-Button in the bottom right.</li>
<li>In the window that opens up, select all the entries and hit &#8220;Unregister Filter(s)&#8221;. If Zoom Player fails to unregister one of the filters, it means that it&#8217;s currently in use. If you have time, reboot your windows to safe mode and start over. If you don&#8217;t, just try to delete around the used filters by selecting everything codecs from further down the list; if it fails to just unregister all of them, the topmost entry(/-ies) are the ones it could not remove.</li>
<li>If all of the filters are gone, hit Close, then OK, and then close down Zoom Player. At this point, you may uninstall the program if you no longer have a need for it.</li>
<li>Now that your merit system is empty, you&#8217;ll have to restore windows&#8217; basic capabilities. You do that by executing this .bat file: <a href="http://www.inmatrix.com/articles/files/regreset.zip" target="_self">download</a>. It will re-register the original windows filters that are still inside windows&#8217; system32 folder.</li>
</ol>
<p><strong>The Setup</strong></p>
<p>Now that your codec system is in a maiden state, let&#8217;s go about installing codecs and filters. The idea behind a clean, yet powerful media system is to limit the amount of registered filters to a bare minimum. We&#8217;ll do this by merely installing one filter for the parsing of container files (avi, mkv, mp4 and more), one filter for displaying subtitles and only one filter to handle all the codecs (xvid, divx, h264, mpeg2 and so on).</p>
<ol>
<li>Get <a href="http://haali.cs.msu.ru/mkv/" target="_blank">Haali Media Splitter</a>. Install it.</li>
<li>Get <a href="http://sourceforge.net/project/showfiles.php?group_id=205650&amp;package_id=246121" target="_blank">VSFilter</a>. Install it!</li>
<li>Get <a href="http://ffdshow-tryout.sourceforge.net/" target="_blank">ffdshow-tryouts</a>. Install it.</li>
</ol>
<p>This is it. I have selected the urls of the most recent encodes of these programs. Except for Haali Media Splitter, they have predecessors that are no longer developed. With the setup you just configured, you should be set for all the media files you might encounter, with the exception of a few.</p>
<p><strong>The Optionals</strong></p>
<p>Videos that you of yet can&#8217;t playback include, among mostly very rare, proprietary formats, Apple Quicktime formats. Especially .mov-files are still relevant in our modern internet times, they are for instance used on <a href="http://www.apple.com/trailers/" target="_blank">Apple&#8217;s Movie Trailer page</a>. To emphasize, this is stuff you CAN get, but don&#8217;t have to. I&#8217;d recommend it anyways.</p>
<ul>
<li><a href="http://www.free-codecs.com/download/quicktime_alternative.htm" target="_blank">Quicktime Alternative</a>. This contains the filters and codecs that let .mov-containers work with the ordinary DirectShow system.  Not required, but good for watching those trailers. I can&#8217;t really think of any other use, everything else is .avi or .mkv.</li>
<li><a href="http://sourceforge.net/project/showfiles.php?group_id=170561" target="_blank">Media Player Classic &#8211; Home Cinema</a>. The player i like the very most. Windows Media Player has too low of a functionality and a crappy overview. Zoom Player i never got into, it looks quite complicated and like with VLC, the handling is not as good as MPC-HC. There are also beta builds, but they&#8217;re not organized on any page.</li>
<li><a href="http://ac3filter.net/projects/ac3filter" target="_blank">AC3Filter</a>. Gives you a tad more configuration options than ffdshow&#8217;s audio functionality. It&#8217;s not needed, but if you&#8217;re an audiophile and feel that ac3filter improves your audio experience, shoot.</li>
</ul>
<p>Well, i&#8217;d say that&#8217;s about it. Maybe one small note to leave you with: If you like a player with low functionality and next to no focus to usability, a player that goes around the merit system and instead uses its integrated filters and codecs, just use <a href="http://www.videolan.org/" target="_blank">Videolan Client</a>.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jultech.wordpress.com/50/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jultech.wordpress.com/50/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jultech.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jultech.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jultech.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jultech.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jultech.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jultech.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jultech.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jultech.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jultech.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jultech.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jultech.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jultech.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jultech.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jultech.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jultech.wordpress.com&amp;blog=4443938&amp;post=50&amp;subd=jultech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jultech.wordpress.com/2008/09/15/guide-to-a-clean-and-powerful-codec-system/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b2c60fb26b41ff4d6c6cd33fa851374e?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=R" medium="image">
			<media:title type="html">bog</media:title>
		</media:content>
	</item>
		<item>
		<title>WRT54G/Tomato 1.21++ Reconnect-Batchfile</title>
		<link>http://jultech.wordpress.com/2008/08/30/wrt54g-tomato-reconnect-batchfile/</link>
		<comments>http://jultech.wordpress.com/2008/08/30/wrt54g-tomato-reconnect-batchfile/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 13:59:36 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[p2p]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[reconnect]]></category>
		<category><![CDATA[tomato]]></category>
		<category><![CDATA[wrt54g]]></category>

		<guid isPermaLink="false">http://jultech.wordpress.com/?p=20</guid>
		<description><![CDATA[UPDATE! I&#8217;ve updated the script to work for Tomato 1.25 (and hopefully upwards) &#8211; links below updated. Some of you pirating people are downloading stuff from Rapidshare. Rapidshare, among other providers of free online storage and downloads, employ a policy that lets the user download a certain amount of data and then forces him to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jultech.wordpress.com&amp;blog=4443938&amp;post=20&amp;subd=jultech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE! </strong>I&#8217;ve updated the script to work for Tomato 1.25 (and hopefully upwards) &#8211; links below updated.</p>
<p>Some of you pirating people are downloading stuff from Rapidshare. Rapidshare, among other providers of free online storage and downloads, employ a policy that lets the user download a certain amount of data and then forces him to wait for a couple of hours before being able to again download something.</p>
<p>People (who are on dynamic ip connections) usually circumvent this by restarting (also &#8216;resetting&#8217;) their router. Some are clever enough to utilize tools for that task that log into your router and reset the connection.</p>
<p>People using Tomato however have been unable to use some of the Software written for that task, because as of Tomato 1.14 (<a href="http://www.polarcloud.com/tomato_114" target="_blank">changelog</a>), in which the author fixed a cross site scripting vulnerability, just calling a URL on the Web-Interface won&#8217;t do it anymore.</p>
<p>I have written a php-script started by a batchfile that will let you reconnect your Tomato-running router with one click and no other tools than the ones provided.</p>
<p><span id="more-20"></span></p>
<p>The thing that Jon, the author of the Tomato and previously Tofu Firmware did was the following: He introduced a POST-variable into every form of the Web-Interface that would be transmitted upon clicking a button. As the content of this variable is created randomly after the first bootup of your router, a perpetrator using javascript to access your router&#8217;s WebIf would have no way of executing anything, as he doesn&#8217;t know that particular, 19 character long code.</p>
<p>You only do get to see this code when you log into your router&#8217;s WebIf &#8211; for which you need your router&#8217;s password &#8211; and view the source code. Since you probably want to save yourself the trouble of everytime hitting a shitload of buttons to reconnect your router, i wrote a script that retrieves that aforementioned POST-variable by logging into your router&#8217;s WebIf and afterwards submitting the commands for disconnection of the WAN-port and consecutive reconnection of the latter.</p>
<p>A short explanation on the files contained in the package:</p>
<ul>
<li><em>routerreconnect.php</em><br />
the script that i wrote and does all the work &#8211; <strong>edit this for your webif-password and router ip</strong></li>
<li><em>routerreconnect.bat</em><br />
the batch-file that calls the script</li>
<li><em>exec</em> &#8211; a folder containing files required for the script to work
<ul>
<li><em>php.exe</em>, <em>php.ini</em>, <em>php5ts.dll</em><br />
a very rudimentary distribution of php5(.2.6) &#8211; the ini file is the recommended version with curl-support edited into it &#8211; <span style="color:#c0c0c0;">PHP License 3.0.1</span></li>
<li><em>php_curl.dll</em><br />
the curl php module required to send the commands to the router &#8211; <span style="color:#c0c0c0;">PHP License 3.0.1</span></li>
<li><span style="color:#c0c0c0;"><span style="color:#000000;"><em>ssleay32.dll</em>, <em>libeay32.dll &#8211; </em></span>Apache-style licence </span><span style="color:#c0c0c0;"><span style="color:#000000;"><br />
openssl files that are required for the curl extension to run (we&#8217;re not accessing ssl sites, but go on and try to disable that function in the module!)</span></span></li>
</ul>
</li>
</ul>
<p>I have tested this combination on computers that run neither php, nor openssl and it should work just fine on yours as well. This script has been tested with Tomato 1.19 and 1.21 (the latest one at the time of this posting) and worked well with both of them. As the WebIf doesn&#8217;t return any data after triggering its reconnection-function, it&#8217;s hard to debug if something goes wrong, hence i didn&#8217;t include any real status messages.</p>
<p>Anyway, here&#8217;s the download: <a href="http://rapidshare.com/files/260094909/router_reconnect_for_tomato_1.25.zip.html" target="_blank">router_reconnect_for_tomato_1.25.zip</a> (2,92MiB from Rapidshare)<br />
Mirrors: <a href="http://www.megaupload.com/?d=T4TJ9H0E" target="_blank">Megaupload</a></p>
<p>I&#8217;m not guaranteeing anything, but since the script shouldn&#8217;t break anything either, just try it, alright?</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jultech.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jultech.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jultech.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jultech.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jultech.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jultech.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jultech.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jultech.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jultech.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jultech.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jultech.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jultech.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jultech.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jultech.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jultech.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jultech.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jultech.wordpress.com&amp;blog=4443938&amp;post=20&amp;subd=jultech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jultech.wordpress.com/2008/08/30/wrt54g-tomato-reconnect-batchfile/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b2c60fb26b41ff4d6c6cd33fa851374e?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=R" medium="image">
			<media:title type="html">bog</media:title>
		</media:content>
	</item>
		<item>
		<title>Shared MySQL data directories for Linux and Windows</title>
		<link>http://jultech.wordpress.com/2007/04/21/shared-mysql-data-directories-for-linux-and-windows/</link>
		<comments>http://jultech.wordpress.com/2007/04/21/shared-mysql-data-directories-for-linux-and-windows/#comments</comments>
		<pubDate>Sat, 21 Apr 2007 10:47:24 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://bogy.mine.nu/wordpress/index.php/2007/04/21/shared-mysql-data-directories-for-linux-and-windows/</guid>
		<description><![CDATA[Okay, so you have your own little Apache with MySQL running on your home box and are experimenting with one, or regularly using the both of these operating systems. As the contents of your website probably don&#8217;t, or shouldn&#8217;t change at all, it is usually quite logical to share those contents between operating systems. Since [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jultech.wordpress.com&amp;blog=4443938&amp;post=9&amp;subd=jultech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Okay, so you have your own little Apache with MySQL running on your home box and are experimenting with one, or regularly using the both of these operating systems. As the contents of your website probably don&#8217;t, or <em>shouldn&#8217;t</em> change at all, it is usually quite logical to share those contents between operating systems.<br />
Since I&#8217;ve found no such tutorial via google, I&#8217;m going to go ahead and write one.</p>
<p><span id="more-9"></span></p>
<p>The prerequisites are simple: You need to have Apache and MySQL installed both under Windows and Linux. Since configuring those two is already a bitch on one OS and only gets more annoying if you have to do it twice, I&#8217;ve resorted to using LAMPP and XAMPP, which you can get from <a href="http://www.apachefriends.org" target="_blank">apachefriends.org</a> for both Windows and Linux. It&#8217;s more or less preconfigured and ready to go after you install it. This will obviously work with any other custom compiled or installed version of MySQL and Apache though &#8211; the only difference is the need for more configuration. Since LAMPP/XAMPP&#8217;s htdocs and mysql data-directories differ from the ones of retail installations, i will go ahead and just mention both of the paths on Windows and Linux.</p>
<p>Okay now, this is still theoretical: you will need to decide which one of your OSs will be the actual host of your web content data. You can use either of them, but only one at a time. Both alternatives have their downsides, as you will have to trust one of the operating systems to not screw up the other&#8217;s file system. With the recent stability of ntfs-3g, I&#8217;s say the risks are equally balanced.</p>
<p>I myself use Windows a lot more than Linux and hence went with using Windows as a host.</p>
<p><strong>The Windows-as-host-way</strong><br />
What we will have to do first is take a look at where our data resides. With XAMPP, the default directory of your installation should be <em>C:\Program Files\XAMPP\</em>. Hence the directories:</p>
<blockquote><p># Windows XAMPP MySQL data directory:<br />
<em>C:\Program Files\XAMPP\mysql\data</em><br />
# Windows XAMPP Apache htdocs directory:<br />
<em>C:\Program Files\XAMPP\htdocs</em></p></blockquote>
<p>As for the directories of retail installations of MySQL and Apache:</p>
<blockquote><p># Windows retail MySQL data directory:<br />
<em>C:\mysql\data</em><br />
# Windows retail Apache htdocs directory:<br />
<em>C:\Program Files\Apache Group\Apache2\htodcs</em></p></blockquote>
<p>Note that paths will obviously differ if you choose to install either of the packages in another directory.</p>
<p>Now that we have our paths written down, we don&#8217;t need to occupy ourselves with Windows any longer. Boot into Linux.<br />
Since we have decided to put our data into the hands of Windows, we will need Linux to be able to access <strong>and write to</strong> Windows&#8217; partition. Depending on which file system you use, you will most probably either need write access to a FAT32 or an NTFS partition. For fat, Linux has had stable write support for ages. NTFS however only became safely writable as of last year, when <a href="http://www.ntfs-3g.org/" target="_blank">NTFS-3G</a> became stable. I&#8217;d recommend using that package, as I have yet to experience any problems with it. How you install it will depend on what Linux distribution you are using, and i believe you&#8217;re better off searching google for <a href="http://www.google.de/search?q=ntfs-3g+gentoo" target="_blank">&#8220;&lt;your distro&gt; ntfs-3g&#8221;</a> than me trying to explain every angle of that here. Obviously, to continue, you will need to get this working. Also, make sure that Apache and MySQL have the actual writing rights for those partitions. You can accomplish that by putting an uid= argument in your fstab file that has the Apache user&#8217;s uid as a parameter. Same goes for MySQL. Figure it out.</p>
<p>Alright, all set? Then let&#8217;s do this.<br />
In order to make our MySQL/Apache server use the data/htdocs directory of the Windows MySQL/Apache installation, we need to replace its own data directory with a symlink to the Windows MySQL-data/Apache-htdocs directory. First, we&#8217;ll need the directories under Linux. They are, for LAMPP:</p>
<blockquote><p># Linux LAMPP MySQL data directory:<br />
<em>/opt/lampp/var/mysql</em><br />
# Linux LAMPP Apache htdocs directory:<br />
<em>/opt/lampp/htdocs</em></p></blockquote>
<p>Note that those directories *might* (as in: i have no clue) vary from distribution to distribution, depending on where they put their opt files.<br />
Again, with retail installations of Apache or MySQL, these directories would look like this:</p>
<blockquote><p># Linux retail MySQL data directory:<br />
<em>/usr/local/mysql/data</em><br />
# Linux retail Apache htdocs directory:<br />
<em>/var/www/localhost/htdocs</em></p></blockquote>
<p>Now what we do is the following: We rename (backup) the existing folders on our Linux partition and then create symlinks to the directories inside the mountpoints of our Windows partitions. In my LAMPP/XAMPP case, I do it like that:</p>
<blockquote><p>~ # mv /opt/lampp/var/mysql /opt/lampp/var/mysql.BACKUP<br />
~ # ln -s /mnt/windows/Program\ Files/XAMPP/mysql/data/ /opt/lampp/var/mysql<br />
<em># ^ MySQL is linked.</em><br />
~ # mv /opt/lampp/htdocs /opt/lampp/htdocs.BACKUP<br />
~ # ln -s /mnt/windows/Program\ Files/XAMPP/htdocs /opt/lampp/htdocs<br />
<em># ^ Apache htdocs is linked.</em></p></blockquote>
<p>Now we&#8217;re all set. Good to go. Ready to rumble. You will just have to restart your lampp-service or Apache and MySQL separately and they should be using Windows&#8217; data.</p>
<p><strong>The Linux-as-host-way</strong><br />
This is basically the same, just the other way around. What we will need to access Linux&#8217; file system is, in case you&#8217;re using an ext*-fs, this: <a href="http://www.fs-driver.org/" target="_blank">http://www.fs-driver.org/</a>. Toy a bit around with it and make it work. In my case, I assigned my Linux partition the drive letter &#8220;L&#8221;.<br />
Also, since Windows does not support symlinks out of the box, although NTFS (3.0 and above &#8211; which is shipped with Win2k) does support <a href="http://en.wikipedia.org/wiki/NTFS_junction_point" target="_blank">junction points</a>, we use <a href="http://www.microsoft.com/technet/sysinternals/utilities/Junction.mspx" target="_blank">this tool</a> by Sysinternals to create the junction points. Bear in mind that these junction points should not be deleted via the Windows Explorer, as it will also delete the target directory on our Linux partition.<br />
Again, in my LAMPP/XAMPP case, I&#8217;m executing these commands in a start/run/&#8221;cmd&#8221; window (see the Windows-as-host-way paragraph on what the directories would be):</p>
<blockquote><p>C:\&gt; move &#8220;C:\Program Files\XAMPP\htdocs&#8221; &#8220;C:\Program Files\XAMPP\htdocs.BACKUP&#8221;<br />
C:\&gt; junction &#8220;C:\Program Files\XAMPP\htdocs&#8221; L:\opt\lampp\htdocs<br />
<em># ^ Apache htdocs directory is linked.</em><br />
C:\&gt; move C:\mysql\data C:\mysql\data.BACKUP<br />
C:\&gt; junction C:\mysql\data L:\opt\lampp\var\mysql<br />
<em># ^ MySQL data directory is linked.</em></p></blockquote>
<p>Restart your MySQL and Apache services and you should be good to go.</p>
<p>I guess that&#8217;s it. I hope someone is going to find this useful. Leave any comments if you wish.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jultech.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jultech.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jultech.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jultech.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jultech.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jultech.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jultech.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jultech.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jultech.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jultech.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jultech.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jultech.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jultech.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jultech.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jultech.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jultech.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jultech.wordpress.com&amp;blog=4443938&amp;post=9&amp;subd=jultech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jultech.wordpress.com/2007/04/21/shared-mysql-data-directories-for-linux-and-windows/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b2c60fb26b41ff4d6c6cd33fa851374e?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=R" medium="image">
			<media:title type="html">bog</media:title>
		</media:content>
	</item>
		<item>
		<title>WRT54GL and bandwidth control</title>
		<link>http://jultech.wordpress.com/2007/02/19/wrt54gl-and-bandwidth-control/</link>
		<comments>http://jultech.wordpress.com/2007/02/19/wrt54gl-and-bandwidth-control/#comments</comments>
		<pubDate>Mon, 19 Feb 2007 16:14:39 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[bandwidth]]></category>
		<category><![CDATA[QoS]]></category>
		<category><![CDATA[script generator]]></category>
		<category><![CDATA[wrt54g]]></category>

		<guid isPermaLink="false">http://bogy.mine.nu/wordpress/index.php/2007/02/19/wrt54gl-and-bandwidth-control/</guid>
		<description><![CDATA[Hey guys, I thought I&#8217;d just share a nice and yet powerful tool that I&#8217;ve used for quite some time to restrict certain IPs in my network to certain speeds at the WAN interface of my WRT54GL router. It has been written by robsonn from the HyperWRT forums. This tool creates scripts using the tc-tool [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jultech.wordpress.com&amp;blog=4443938&amp;post=8&amp;subd=jultech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hey guys,<br />
I thought I&#8217;d just share a nice and yet powerful tool that I&#8217;ve used for quite some time to restrict certain IPs in my network to certain speeds at the WAN interface of my WRT54GL router. It has been written by robsonn from the <a href="http://www.hyperwrt.org/forum/viewtopic.php?id=2002" target="_blank">HyperWRT forums</a>.</p>
<p><span id="more-8"></span></p>
<p>This tool creates scripts using the tc-tool in order to shape bandwidth and allocate preset speeds to different users. Allocation works via MAC- as well as IP-addresses. You can limit both down- and upstream, depending on the firmware you use for your WRT54* device. I am for instance giving my sister&#8217;s pc via static dhcp a fixed ip, which in turn i give 8000kbit down- and a rough 192kbit upstream. at 16000/1024kbit, that leaves me with enough freedom of bandwidth for when I host a game of Warcraft III, play any other games or the likes.</p>
<p>It&#8217;s a nice addition to QoS.</p>
<p>Here&#8217;s a download link that I mirrored on my server. If it doesn&#8217;t work, try the link from the first paragraph. That one&#8217;s probably always going to be more up-to-date.</p>
<p><a href="http://bogy.mine.nu/generator.zip" target="_blank">wrt54 script generator</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jultech.wordpress.com/8/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jultech.wordpress.com/8/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jultech.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jultech.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jultech.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jultech.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jultech.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jultech.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jultech.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jultech.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jultech.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jultech.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jultech.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jultech.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jultech.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jultech.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jultech.wordpress.com&amp;blog=4443938&amp;post=8&amp;subd=jultech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jultech.wordpress.com/2007/02/19/wrt54gl-and-bandwidth-control/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b2c60fb26b41ff4d6c6cd33fa851374e?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=R" medium="image">
			<media:title type="html">bog</media:title>
		</media:content>
	</item>
		<item>
		<title>WRT54GL, Tomato firmware and bandwidth monitoring via SNMP</title>
		<link>http://jultech.wordpress.com/2007/01/22/wrt54gl-tomato-firmware-and-bandwidth-monitoring-via-snmp/</link>
		<comments>http://jultech.wordpress.com/2007/01/22/wrt54gl-tomato-firmware-and-bandwidth-monitoring-via-snmp/#comments</comments>
		<pubDate>Mon, 22 Jan 2007 01:24:28 +0000</pubDate>
		<dc:creator>Julian</dc:creator>
				<category><![CDATA[Networking]]></category>
		<category><![CDATA[bandwidth monitoring]]></category>
		<category><![CDATA[snmp]]></category>
		<category><![CDATA[tomato]]></category>
		<category><![CDATA[wrt54g]]></category>

		<guid isPermaLink="false">http://bogy.mine.nu/wordpress/index.php/2007/01/22/wrt54gl-tomato-firmware-and-bandwidth-monitoring-via-snmp-2/</guid>
		<description><![CDATA[SNMP is quite interesting if you like to control the bandwidth usage of your roomies &#8211; or family members. I for one have used it in the past to monitor my sister&#8217;s bandwidth usage. After all, this is my internet connection, and noone elses. Since I&#8217;ve switched to the Tomato firmware, however, I haven&#8217;t been [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jultech.wordpress.com&amp;blog=4443938&amp;post=7&amp;subd=jultech&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://de.wikipedia.org/wiki/Simple_Network_Management_Protocol" target="_blank">SNMP</a> is quite interesting if you like to control the bandwidth usage of your roomies &#8211; or family members. I for one have used it in the past to monitor my sister&#8217;s bandwidth usage. After all, this is my internet connection, and noone elses.</p>
<p><span id="more-7"></span></p>
<p>Since I&#8217;ve switched to the <a href="http://www.polarcloud.com/tomato" target="_blank">Tomato firmware</a>, however, I haven&#8217;t been able to keep track of bandwidth movement other than via the built-in bandwidth meter on the webif. Tomato is quite a bit more lightweight than DD-WRT, which has an SNMP server integrated, and hence, in order to use SNMP with Tomato, you&#8217;ll have to add it somehow. This is what I am going to explain here in a couple of steps. I&#8217;m going to assume that you already have Tomato installed and configured. This might work for other firmwares that don&#8217;t have SNMP integrated already, but I don&#8217;t know.</p>
<ol>
<li>First, you&#8217;ll have to create a network share on a box inside your LAN that runs 24/7. Either 24/7, or at least whenever you boot up your WRT device. You can do this on either a Windows box and create a user that has exclusive rights to mount network shares, or you can do this on a Linux box using Samba and creating a smbshare. You could also do this by using the empty space on the flash chip, i however wouldn&#8217;t recommend that you do so &#8211; since repeatedly writing to that chip will wear its quality down.</li>
<li>Mount the network share. Go to your Tomato configuration, go to <strong>Administration</strong>, then <strong>CIFS Client</strong>. Enable one of the shares and enter its details. <strong>UNC</strong> is the path of the share. This is something like &#8220;\\ip-address-of-the-computer-that-contains-the-share\share-name&#8221;. As <strong>username</strong> and <strong>password</strong>, you will need to input what a noted in 1. &#8211; a user that you created solely for the purpose of accessing windows network shares. How you do the latter is a matter that I leave to google to explain to you. The rest of the settings can be left free. Hit <strong>Save</strong>. Maybe reboot. Can&#8217;t be of any harm.</li>
<li>SSH to your router and create a directory on the newly-mounted network share. Call it &#8220;sbin&#8221;:<br />
<blockquote><p># cd /cifs1<br />
# mkdir sbin</p></blockquote>
</li>
<li>Download the following file onto your WRT. It&#8217;s a static build of an SNMP daemon with all of the libraries built-in, hence its size (732520 bytes). Also check that its md5sum reads as &#8220;ae0d622648efdb8dceb7b3b5a63e23ac&#8221;:<br />
<blockquote><p># wget http://bok.xs4all.nl/downloads/snmpd.zip<br />
Connecting to bok.xs4all.nl[213.84.72.169]:80<br />
# unzip snmpd.zip &amp;&amp; rm snmpd.zip<br />
Archive:  snmpd.zip<br />
inflating: snmpd<br />
# md5sum snmpd<br />
ae0d622648efdb8dceb7b3b5a63e23ac snmpd</p></blockquote>
</li>
<li>Next, you&#8217;ll have to create a configuration file for snmpd. You can do this by just opening an instance of <span style="text-decoration:line-through;">notepad</span> wordpad on your Windows box, copying these contents and saving it in the directory where snmpd resides as <strong>snmpd.conf</strong>:<br />
<blockquote><p>com2sec  ro  default    public<br />
com2sec  rw  localhost  private</p>
<p>group  public   v1   ro<br />
group  public   v2c  ro<br />
group  public   usm  ro<br />
group  private  v1   rw<br />
group  private  v2c  rw<br />
group  private  usm  rw</p>
<p>view  all  included  .1</p>
<p>access  public   &#8220;&#8221;  any  noauth  exact  all  none  none<br />
access  private  &#8220;&#8221;  any  noauth  exact  all  all   all</p></blockquote>
<p>I got this config from the <a href="http://www.dd-wrt.com/dd-wrtv2/down.php?path=downloads%2Fpackages%2F&amp;download=snmpd-static_5.1.2-2.1_mipsel.ipk" target="_blank">ipkg-package of the DD-WRT distribution</a>.</li>
<li>Now start that thing using the configuration file you just created. I&#8217;ve added the -s switch to have it log into the syslog located at /var/log/messages. This flag isn&#8217;t mandatory though, if everything works, you can leave it out:<br />
<blockquote><p># /cifs1/sbin/snmpd -s -c /cifs1/sbin/snmpd.conf &amp;</p></blockquote>
</li>
<li>The snmp daemon should be running now. Check the syslog for the following line. if it is not accompanied by any additional lines, you should be good to go:<br />
<blockquote><p># cat /var/log/messages | grep -i snmpd<br />
Jan 21 20:54:43  daemon.info snmpd[361]: NET-SNMP version 5.0.9</p></blockquote>
</li>
<li>If you want the daemon to run every time the router boots up, go to <strong>Administration</strong> -&gt; <strong>Scripts</strong> -&gt; <strong>Init</strong>, then add these lines:<br />
<blockquote><p># snmp daemon<br />
sleep 30<br />
/cifs1/sbin/snmpd -s -c /cifs1/sbin/snmpd.conf &amp;</p></blockquote>
</li>
<li>Now let&#8217;s look how we can visualize this. I&#8217;m using <a href="http://leonidvm.chat.ru/" target="_blank">SNMPTrafficGrapher </a>(STG from now on) for Windows, it&#8217;s quite old and apparently development has stopped, but hey, whatever. I haven&#8217;t found a more convenient application yet. In order to get the correct OIDs for STG, you have to use <a href="http://www.paessler.com/download/freeware/snmptester" target="_blank">SNMPTester</a> to get all available OIDs from your box. Fire up the application, punch in the IP address of your router and use SNMP version <strong>V2c</strong>. Also select <strong>Scan Available Interfaces</strong>. Hit <strong>3. Run Test</strong>. It&#8217;ll spit out a whole bunch of lines, whereof only the last eight or so are important and should look something like this (on a WRT54GL):<br />
<blockquote><p>Found interfaces:<br />
1,lo,,Software Loopback,Connected,10000 kb/s,1 (lo)<br />
2,eth0,,Ethernet,Connected,10000 kb/s,2 (eth0)<br />
3,eth1,,Ethernet,Connected,10000 kb/s,3 (eth1)<br />
4,vlan0,,Ethernet,Connected,10000 kb/s,4 (vlan0)<br />
5,vlan1,,Ethernet,Connected,10000 kb/s,5 (vlan1)<br />
6,br0,,Ethernet,Connected,10000 kb/s,6 (br0)<br />
7,ppp0,,PPP,Not Connected,0 kb/s,7 (ppp0)</p></blockquote>
</li>
<li>Back to STG: hit F9 for its settings. Set the router ip as <strong>Target Address</strong>, <strong>Community</strong> to &#8220;public&#8221; and the following values to <strong>&#8220;Green&#8221; OID</strong> and <strong>&#8220;Blue&#8221; OID1</strong>:<br />
<blockquote><p>1.3.6.1.2.1.2.2.1.16.x<br />
1.3.6.1.2.1.2.2.1.10.x</p></blockquote>
<p>with x being the number before the interface listed with &#8220;br0&#8243; in the list we just got. In my case, it was 6. Also set your Update Period to 1000ms, which translates to 1s update intervals. Take a look at the rest of the settings and adapt them to your likings, then hit OK and go to File -&gt; Save to save that configuration somewhere. From now on, you should always start STG with the configuration file you have just saved. Cause some traffic. STG should now show a blue line displaying your downstream- and a green one showing your upstream-traffic.</li>
</ol>
<p>Alright, all done. I hope this helps some people.</p>
<p>Sources:</p>
<p><a href="http://www.linksysinfo.org/forums/showthread.php?t=51064" target="_blank">http://www.linksysinfo.org/forums/showthread.php?t=51064</a><br />
- <em>initial howto from bokh and my way of solving my issue</em></p>
<p><a href="http://cacti.net/" target="_blank">http://cacti.net/</a> &amp; <a href="http://oss.oetiker.ch/mrtg/" target="_blank">http://oss.oetiker.ch/mrtg/</a><br />
- <em>two linux solutions to SNMP monitoring</em></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jultech.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jultech.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jultech.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jultech.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jultech.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jultech.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jultech.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jultech.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jultech.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jultech.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jultech.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jultech.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jultech.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jultech.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jultech.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jultech.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jultech.wordpress.com&amp;blog=4443938&amp;post=7&amp;subd=jultech&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jultech.wordpress.com/2007/01/22/wrt54gl-tomato-firmware-and-bandwidth-monitoring-via-snmp/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b2c60fb26b41ff4d6c6cd33fa851374e?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=R" medium="image">
			<media:title type="html">bog</media:title>
		</media:content>
	</item>
	</channel>
</rss>
