<?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:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>Mark Stahler - Blog &#187; DNS323</title>
	<atom:link href="http://blog.markstahler.ca/category/dns323/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.markstahler.ca</link>
	<description>Coding, Gaming, CrackBerry&#039;ing and everything else white and nerdy</description>
	<lastBuildDate>Mon, 30 Aug 2010 01:07:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>The Ultimate DNS-323 Setup: Part 1 &#8211; Router Configuration</title>
		<link>http://blog.markstahler.ca/2010/01/the-ultimate-dns-323-setup-router-configuration/</link>
		<comments>http://blog.markstahler.ca/2010/01/the-ultimate-dns-323-setup-router-configuration/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 19:00:45 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[DNS323]]></category>

		<guid isPermaLink="false">http://blog.markstahler.ca/?p=263</guid>
		<description><![CDATA[Before you begin messing around with a new home server it is important to understand a few things about how your home router operates. Your router is typically your only device with a direct connection to the internet. All your other devices connect to the internet through the router. Webpages on the internet cant really [...]]]></description>
			<content:encoded><![CDATA[<p>Before you begin messing around with a new home server it is important to understand a few things about how your home router operates.</p>
<p>Your router is typically your only device with a direct connection to the internet. All your other devices connect to the internet through the router. Webpages on the internet cant really tell the difference between your computer or someone else&#8217;s in your house. The router takes care of figuring out which of your networked computers requested what from the internet.</p>
<p><a rel="ibox" href="http://blog.markstahler.ca/wp-content/uploads/router-ips.jpg"><img class="aligncenter size-medium wp-image-267" title="Router - Internal and External IPs" src="http://blog.markstahler.ca/wp-content/uploads/router-ips-300x263.jpg" alt="" width="300" height="263" /></a></p>
<p><strong><span style="text-decoration: underline;">Static DHCP</span></strong></p>
<p>Each of you computers attached to the router is typically assigned an IP address from the router itself through a protocol called DHCP. These IP addresses are internal and only accessible on your local network. This is what allows you to just plug in your computers to your router and them work automagically. Your network settings are probably the same as this which is the default configuration for most operating systems. We will modify settings on the router so we dont have to change anything on any of your computers.</p>
<p><a rel="ibox" href="http://blog.markstahler.ca/wp-content/uploads/windows-dhcp.jpg"><img class="aligncenter size-medium wp-image-264" title="Typical Windows TCP/IP Settings" src="http://blog.markstahler.ca/wp-content/uploads/windows-dhcp-269x300.jpg" alt="" width="269" height="300" /></a></p>
<p><strong><span style="text-decoration: underline;">The Important Part of this Article:</span></strong> The problem with relying on DHCP to assign IP addresses to your devices is that some times the IP addresses assigned to a device will change. This is a problem for a device like the DNS-323 because we need to use the IP address for configuring BitTorrent software, using the IP address to connect to the DNS-323 etc.</p>
<p>The solution is a setting that can be found on decent routers (I own a Linksys WRT54-GL with Tomato Firmware) called Static DHCP. This allows you to create a setting on the router that will assign devices on your network an IP address that does not change. This is done by assigning a MAC address (the hardware identifier on network interfaces) to a specific IP address.  It&#8217;s allot less complicated then it may sound.</p>
<p><a rel="ibox" href="http://blog.markstahler.ca/wp-content/uploads/router-static-dhcp.jpg"><img class="aligncenter size-medium wp-image-268" title="Static DHCP Settings" src="http://blog.markstahler.ca/wp-content/uploads/router-static-dhcp-300x193.jpg" alt="" width="300" height="193" /></a></p>
<p>Finding the MAC addresses of your devices is not difficult. To find the MAC address of you DNS-323 you must connect to it from the web interface. The MAC address can be found on the Status page. Once you have it, go to the Static DHCP settings in your router settings (it will be different than above but try to find it) and link the DNS-323 MAC to an IP address on your network.</p>
<p><a rel="ibox" href="http://blog.markstahler.ca/wp-content/uploads/dlink-mac.jpg"><img class="aligncenter size-medium wp-image-265" title="Dlink DNS-323 Status Page" src="http://blog.markstahler.ca/wp-content/uploads/dlink-mac-300x280.jpg" alt="" width="300" height="280" /></a></p>
<p>Now you should be able to connect to your DNS-323 from an IP address that does not change every time the NAS is rebooted!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.markstahler.ca/2010/01/the-ultimate-dns-323-setup-router-configuration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[DNS-323 Ultimate Setup]]></series:name>
	</item>
		<item>
		<title>The Ultimate DNS-323 Setup: Part 4 &#8211; Mulitple Ways To Control Transmission Remotely</title>
		<link>http://blog.markstahler.ca/2010/01/the-ultimate-dns-323-setupmulitple-ways-to-control-transmission-remotely/</link>
		<comments>http://blog.markstahler.ca/2010/01/the-ultimate-dns-323-setupmulitple-ways-to-control-transmission-remotely/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 20:57:36 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[DNS323]]></category>

		<guid isPermaLink="false">http://blog.markstahler.ca/?p=251</guid>
		<description><![CDATA[Transmission Web Interface Transmission comes with a fantastic web interface built in. The web interface is sometimes referred to as Clutch, which was the name of the web interface project before it was included officially with Transmission. While transmission-daemon is running on the DNS-323, you can access the web interface by: http://&#60;DNS-323 IP&#62;:9091 or in [...]]]></description>
			<content:encoded><![CDATA[<p><strong><span style="text-decoration: underline;">Transmission Web Interface</span></strong></p>
<p>Transmission comes with a fantastic web interface built in. The web interface is sometimes referred to as Clutch, which was the name of the web interface project before it was included officially with Transmission.</p>
<p>While transmission-daemon is running on the DNS-323, you can access the web interface by:</p>
<p>http://&lt;DNS-323 IP&gt;:9091 or in my specific case http://192.168.1.5:9091. It is important that you assign you DNS-323 a static IP (easiest to do on the router) so this IP address does not change.</p>
<p><a rel="ibox" href="http://blog.markstahler.ca/wp-content/uploads/2010-01-24_160244.jpg"><img class="aligncenter size-medium wp-image-254" title="Transmission Web Interface (Clutch)" src="http://blog.markstahler.ca/wp-content/uploads/2010-01-24_160244-300x208.jpg" alt="" width="300" height="208" /></a></p>
<p><strong><span style="text-decoration: underline;">Transmission Remote .NET</span></strong></p>
<p>This interface is for Windows machines and is very similar to operating uTorrent. The webpage for this project can be found at <a href="http://code.google.com/p/transmission-remote-dotnet/">http://code.google.com/p/transmission-remote-dotnet/</a>.</p>
<p>From the settings menu, add the IP of the DNS-323 and you should see all the torrents running in the familiar interface.</p>
<p><a rel="ibox" href="http://blog.markstahler.ca/wp-content/uploads/2010-01-24_160346.jpg"><img class="aligncenter size-medium wp-image-255" title="Transmission Remote .NET" src="http://blog.markstahler.ca/wp-content/uploads/2010-01-24_160346-300x164.jpg" alt="" width="300" height="164" /></a></p>
<p><strong><span style="text-decoration: underline;">Transmission Console Interface</span></strong></p>
<p>There is a nice and easy to use console interface available for use with Transmission. The webpage for this project can be found at <a href="http://github.com/fagga/transmission-remote-cli">http://github.com/fagga/transmission-remote-cli</a>. Download it here http://github.com/fagga/transmission-remote-cli/raw/master/transmission-remote-cli.py.</p>
<p><a rel="ibox" href="http://blog.markstahler.ca/wp-content/uploads/2010-01-24_160506.jpg"><img class="aligncenter size-medium wp-image-256" title="Transmission Remote CLI by fagga" src="http://blog.markstahler.ca/wp-content/uploads/2010-01-24_160506-300x164.jpg" alt="" width="300" height="164" /></a></p>
<p>The Console Interface is a single Python script that can be run on a remote or local console. First you must install a few dependencies. Python and several modules are required. If you are installing the script to run on the DNS-323, these are the following Debian packages that are required:</p>
<p><em>apt-get install python<br />
apt-get install python-simplejson<br />
apt-get install python-geoip<br />
apt-get install python-ndas</em><em> </em></p>
<p>You can use the interface by typing:</p>
<p><em>python transmission-remote-cli.py –c &lt;DNS-323 IP&gt;</em></p>
<p>Keys to control torrents are pretty intuitive and the options are labeled within the program.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.markstahler.ca/2010/01/the-ultimate-dns-323-setupmulitple-ways-to-control-transmission-remotely/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[DNS-323 Ultimate Setup]]></series:name>
	</item>
		<item>
		<title>The Ultimate DNS-323 Setup: Part 3 &#8211; Transmission Installation &amp; Configuration</title>
		<link>http://blog.markstahler.ca/2010/01/the-ultimate-dns-323-setup-part-2-transmission-installation-configuration/</link>
		<comments>http://blog.markstahler.ca/2010/01/the-ultimate-dns-323-setup-part-2-transmission-installation-configuration/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 20:55:25 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[DNS323]]></category>

		<guid isPermaLink="false">http://blog.markstahler.ca/?p=249</guid>
		<description><![CDATA[Installation of Transmission BitTorrent Client From your desktop computer, visit http://www.transmissionbt.com/download.php. You are not looking for an official package; you are looking for the source code. Right click on the bz2 version and click ‘Copy Link Location’. SSH to your DNS-323 and using an unprivileged account, use wget to save the source code on the device (anywhere). Example: wget http://download.transmissionbt.com/files/transmission-2.04.tar.bz2 [...]]]></description>
			<content:encoded><![CDATA[<p><span style="text-decoration: underline;">Installation of Transmission BitTorrent Client</span></p>
<p>From your desktop computer, visit <a href="http://www.transmissionbt.com/download.php">http://www.transmissionbt.com/download.php</a>. You are not looking for an official package; you are looking for the source code. Right click on the bz2 version and click ‘Copy Link Location’. SSH to your DNS-323 and using an unprivileged account, use wget to save the source code on the device (anywhere).</p>
<p><span style="text-decoration: underline;">Example</span>: wget <a href="http://download.transmissionbt.com/files/transmission-2.04.tar.bz2">http://download.transmissionbt.com/files/transmission-2.04.tar.bz2</a></p>
<p><span style="text-decoration: underline;">Extract the source code</span>: tar -jxvf  transmission-2.04.tar.bz2</p>
<p><span style="text-decoration: underline;">Change dir to the source and build the program</span>:</p>
<p>cd transmission-2.04</p>
<p>./configure &#8211;enable-daemon</p>
<p>make</p>
<p>As root or by using sudo:</p>
<p>make install</p>
<p>Transmission should now be successfully installed.</p>
<p><span style="text-decoration: underline;">Configuring Transmission for Remote Control</span></p>
<p>To configure Transmission we will first launch it so it will create a default configuration. This includes a dirctory to store settings, torrent resume files, etc.</p>
<p>As a non-root user:</p>
<p>transmission-daemon –g /mnt/HD_a2/Volume_1/.transmission-daemon</p>
<p>Leave Transmission running for half a minute so it has time to start-up and create the files. To shutdown Transmission, from the command line:</p>
<p>pidof transmission-daemon | xargs  kill</p>
<p>Or if it’s easier to remember, use two commands:</p>
<p>pidof transmission-daemon<br />
kill &lt;number from pidof command&gt;</p>
<p>Now we can edit the default Transmission configuration. It is located in/mnt/HD_a2/Volume_1/.transmission-daemon/settings.json (or Volume_0 depending on which HDD bay your using)</p>
<p>You can view the configuration options available from<a href="http://trac.transmissionbt.com/wiki/ConfigurationParameters">http://trac.transmissionbt.com/wiki/ConfigurationParameters</a>. The options we are primarily interested in are those that will enable remote operation of Transmission.</p>
<p>In settings.json add/modify the following:</p>
<p>&#8220;rpc-enabled&#8221;: true,<br />
&#8220;rpc-bind-address&#8221;: &#8220;0.0.0.0&#8243;,<br />
&#8220;rpc-port&#8221;: 9091,<br />
&#8220;rpc-authentication-required&#8221;: false,<br />
&#8220;rpc-username&#8221;: &#8220;&#8221;,<br />
&#8220;rpc-password&#8221;: &#8220;&#8221;,<br />
&#8220;rpc-whitelist-enabled&#8221;: true,<br />
&#8220;rpc-whitelist&#8221;: &#8220;127.0.0.1,192.168.*.*&#8221;,<br />
The configuration above does not require a username and password but clients may only connect from a local network. To be able to connect and control your torrents from an internet connection, add a * to the whitelist, a username and password and you must port forward port 9091 on your router to forward to the IP of you DNS-323. If you add a password it will be encrypted in the settings file the next time Transmission is opened.</p>
<p><span style="text-decoration: underline;">Configuring Transmission to automatically download Torrents from a watch directory</span></p>
<p>Transmission has a built in feature (finally, it required a script before) to automatically add .torrent files to the Download queue when they are saved to a specific ‘watched directory’. This will allow you to download a .torrent file from your desktop web browser, save it to the watched folder and forget about it! Transmission will add the Torrent and start the download. These are the settings you need:</p>
<p>&#8220;watch-dir&#8221;: &#8220;/mnt/HD_b2/TorrentWatch&#8221;,<br />
&#8220;watch-dir-enabled&#8221;: true</p>
<p>Make sure you create the directory and that it is readable by the user you run Transmission as.</p>
<p>After you have added these settings to settings.json, save the file and start Transmission.</p>
<p>transmission-daemon –g /mnt/HD_a2/Volume_1/.transmission-daemon</p>
<p>You can now save .torrent files directly to the TorrentWatch folder and Transmission will soon after start downloading them. For convenience, you may find setting up a Firefox plugin like FavLoc useful which allows you to select the download location without having to browse through multiple directories.  Find it at <a href="https://addons.mozilla.org/en-US/firefox/addon/2140">https://addons.mozilla.org/en-US/firefox/addon/2140</a>. I set this up for my wife and it works great.</p>
<p><span style="text-decoration: underline;">Perform mass extraction of downloaded RAR archives (Experimental)</span></p>
<p>Just recently I spent a few hours and started to work on a script to automatically extract all my torrent downloads. Extraction on the DNS-323 is painfully slow due to its slow processor speed. Extracting many large files (TV shows, movies) manually is a long and boring process. I have made it one step simpler (and will continue to improve the process as time permits).</p>
<p>You may find the project page and monitor updates at <a href="http://bitbucket.org/markstahler/auto-extract-python/">http://bitbucket.org/markstahler/auto-extract-python/</a>. The latest version of the script can always be found <a href="http://bitbucket.org/markstahler/auto-extract-python/src/tip/auto-extract.py">http://bitbucket.org/markstahler/auto-extract-python/src/tip/auto-extract.py</a>.</p>
<p>Currently, the script takes one argument, a directory which contains archives you wish to extract. The script will recursively search for any .rar archives and extract them one at a time until they are all extracted. Each directory that contains an archive (only one archive per directory is supported) is marked with a hidden file named .unrared. This file will cause the script to ignore the archive within if that specific folder is scanned again. This means that you can safely run this script, pointing it to your main download directory whenever your downloads are fully complete. It will extract your downloads and you are able to move the extracted contents (.avi, .mkv or whatever) wherever you wish and the script will not re-extract them. This allows you to see the original downloaded files as long as you wish.</p>
<p>Sample usage:</p>
<p>python auto-extract.py /mnt/HD_a2/Volume_1/downloads</p>
<p>This will recurse my downloads directory unextracting every archive found. Default behavior is to overwrite files if a .unrared file is not present. You can safely run this on your downloads directory but be warned, it may take a very long time depending on what type of files you have. The script took several hours to complete on my DNS-323 extracting many seasons of TV shows in Xvid format.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.markstahler.ca/2010/01/the-ultimate-dns-323-setup-part-2-transmission-installation-configuration/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<series:name><![CDATA[DNS-323 Ultimate Setup]]></series:name>
	</item>
		<item>
		<title>The Ultimate DNS-323 Setup: Part 2 &#8211; Debian Installation</title>
		<link>http://blog.markstahler.ca/2010/01/the-ultimate-dns-323-setup-debian-installation/</link>
		<comments>http://blog.markstahler.ca/2010/01/the-ultimate-dns-323-setup-debian-installation/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 20:52:33 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[DNS323]]></category>

		<guid isPermaLink="false">http://blog.markstahler.ca/?p=244</guid>
		<description><![CDATA[By the end of this guide you will have -A fully stable and remotely operable BitTorrent client on your DNS-323. I will show you how to setup 1) A remote web interface and 2) A Windows desktop application that is very similar to uTorrent that can remotely control and monitor your torrents. -Have your DNS323 [...]]]></description>
			<content:encoded><![CDATA[<p><span mce_name="strong" mce_style="font-weight: bold;" style="font-weight: bold;" class="Apple-style-span"><u style="">By the end of this guide you will have</u></span></p>
<p>-A fully stable and remotely operable BitTorrent client on your DNS-323. I will show you how to setup 1) A remote web interface and 2) A Windows desktop application that is very similar to uTorrent that can remotely control and monitor your torrents.</p>
<p>-Have your DNS323 download torrent files for you with a single click and without using anything but the Firefox web browser.</p>
<p>-Have your DNS323 automatically extract RAR archives after they are downloaded.</p>
<p>-Store and maintain your torrent downloads on the DNS 323.</p>
<p>-Stream videos and movies from you DNS 323 to your Xbox 360 or Playstation 3 (or similarly compatible device).</p>
<p><span mce_name="strong" mce_style="font-weight: bold;" style="font-weight: bold;" class="Apple-style-span"><u style=""> </u></span></p>
<p><span mce_name="strong" mce_style="font-weight: bold;" style="font-weight: bold;" class="Apple-style-span"><u style="">Introduction:</u></span></p>
<p>This guide will walk you through the steps to turn you Dlink DNS 323 into a fully functional Linux server with the capability to download Torrents extremely easily (using the Transmission BitTorrent Client), remotely administer those torrents via a web interface (Transmissions built in Clutch interface) and a uTorrent like desktop app for Windows (Transmission Remote .NET).</p>
<p><span mce_name="strong" mce_style="font-weight: bold;" style="font-weight: bold;" class="Apple-style-span"><u style="">Required Skills and Software</u></span></p>
<p>-Set your home router to assign your DNS-323 a static IP</p>
<p><span mce_name="strong" mce_style="font-weight: bold;" style="font-weight: bold;" class="Apple-style-span"> </span>-Basic Linux command line skills</p>
<p>-SSH client (Putty on Windows or OSX comes with one, available from iTerm)</p>
<p><span mce_name="strong" mce_style="font-weight: bold;" style="font-weight: bold;" class="Apple-style-span"><u style=""> </u></span></p>
<p><span mce_name="strong" mce_style="font-weight: bold;" style="font-weight: bold;" class="Apple-style-span"><u style="">Debian Linux</u></span></p>
<p>To run an advanced setup like this, you must&nbsp;<a href="http://blog.markstahler.ca/2009/07/dlink-nas-323-debian-chroot-rtorrent-wtorrent/" mce_href="http://blog.markstahler.ca/2009/07/dlink-nas-323-debian-chroot-rtorrent-wtorrent/" target="undefined">install Debian</a> Linux on your DNS-323. Debian is a full operating system that will run in a self contained environment. It will note replace or overwrite anything from Dlink and you may remove it at anytime. You will still be able to access the Dlink web interface just as before.</p>
<p>The Debian installation takes 5-10 minutes as there is a fun-plug package that automates all of the work for you. Debian is installed in a chroot environment which means it is completely separated from the rest of the DNS-323 software.</p>
<p><span mce_name="strong" mce_style="font-weight: bold;" style="font-weight: bold;" class="Apple-style-span"><u style=""><br />
For Fonz’s Fun Plug Users Only (If you are using an unmodified DNS-323 skip to the next step)</u></span></p>
<p>If you (like I was&nbsp; originally) are currently running Fonz’s Fun Plug you will first have to remove it before you can install Debian. Fonz’s Fun Plug is a nice system but is not as powerful or as up to date as a full Debian Linux system.</p>
<p>To remove Fonz’s Fun Plug, delete the funplug directory in /mnt/HD_a2/fun_plug. It is possible it can be done via Windows Explorer (or whatever) if you changed its permissions/owner, otherwise do it from the command line. I will assume you know how to do it as you install it in the first palce.</p>
<p>(Please be careful using rm -rf, you can destroy a&nbsp;<a href="http://blog.markstahler.ca/2009/07/dlink-nas-323-debian-chroot-rtorrent-wtorrent/" mce_href="http://blog.markstahler.ca/2009/07/dlink-nas-323-debian-chroot-rtorrent-wtorrent/" target="undefined">Linux&nbsp;system</a> with one wrong delete)</p>
<p>rm -rf /mnt/HD_a2/fun_plug<br />
chmod -R 777 /mnt/HD_a2/ffp<br />
rm -rf /mnt/HD_a2/Nas_prog</p>
<p>Reboot the DNS-323 and delete the /mnt/HD_a2/ffp directory.</p>
<p><span mce_name="strong" mce_style="font-weight: bold;" style="font-weight: bold;" class="Apple-style-span"><u style="">Debian Installation</u></span></p>
<p>You are now ready to install Debian. This is very simple using the Debnas Fun Plug package. Fun Plug is a mechanism that comes with the DNS-323 that allows users to boot custom scripts. This allows us to boot to a chrooted operating system so easily. You can find the DNS-323 Debian Installer at <a href="http://sourceforge.net/projects/debnas/" mce_href="http://sourceforge.net/projects/debnas/">http://sourceforge.net/projects/debnas/.</a> At the time of this writing 0.5 is the latest version. Version 0.5 installs an older version of Debian which is unfortunate but Debian itself provides a way to easily update itself to the latest version available.</p>
<p>Download and extract the Debian Installer package to Volume_1 of the DNS-323. SSH to the DNS-323 an extract the DebNas package (<span mce_name="em" mce_style="font-style: italic;" style="font-style: italic;" class="Apple-style-span">tar -jxvf &nbsp;debnas-0.5.tar.bz2</span> or by using 7-zip from Windows Explorer). There should now be linux.tar and the fun_plug file in the Volume directory now.</p>
<p>Reboot the DNS-323 and Debian will install automatically. Installation will take several minutes. SSH will become enabled when the device eventually boots. Be patient, the DNS-323 is roughly the equivalent to a 10 year old computer. As awesome as it is, it’s slow as hell. SSH to the 323. The default login credentials are:</p>
<p>Username: root<br />
Password: 12345678</p>
<p>Root is the equivalent of Administrator on other types of systems. You can do a lot of damage using the root account if you don’t know what you’re doing. Create a new unprivileged account and change the root password. You can add a new user by using the useradd command. Don’t forget to change the root password with the passwd command. You can find a pretty good command line tutorial here http://www.ee.surrey.ac.uk/Teaching/Unix/.</p>
<p><span mce_name="strong" mce_style="font-weight: bold;" style="font-weight: bold;" class="Apple-style-span"><u style="">Upgrade Debian</u></span></p>
<p>Now you have a full Linux environment on the DNS-323 with all of Debian’s software packages at your disposal. Most Linux systems have a software manager that allows you to easily install common software. Debians system is among the best.</p>
<p>The first step is to upgrade to Debian Lenny, a more recent stable version of the operating system. As root, edit /etc/apt/sources.list.d/etch.list, replacing the word etch with lenny. I also changed the mirror url to a North American mirror rather than the German one by removing the de. in the url. You may also rename the filename from etch.list to lenny.list if you feel so inclined.</p>
<p>Now we need to update the repository packages listing and upgrade to lenny. You may have GPG issues which you can resolve by following the guide&nbsp;<a href="http://linux.com/community/blogs/Debian-Upgrading-to-Lenny-ERROR-no-public-key-available-for-the-following....html" mce_href="http://linux.com/community/blogs/Debian-Upgrading-to-Lenny-ERROR-no-public-key-available-for-the-following....html">here </a>:</p>
<p>apt-get update<br />
apt-get dist-upgrade</p>
<p>This will take a while to download and then upgrade. When it is done reboot Debian. I had to reboot using the command ‘reboot -f’. When Debian comes back up, it will be running Lenny. When it comes back up, update to make sure everything is current.</p>
<p><span mce_name="em" mce_style="font-style: italic;" style="font-style: italic;" class="Apple-style-span">apt-get update</span><br />
<span mce_name="em" mce_style="font-style: italic;" style="font-style: italic;" class="Apple-style-span">apt-get upgrade</span></p>
<p>This will likely take a very long time and require some interaction. It is a good idea to reboot the system (although likely unnecessary) after a system wide upgrade. Type reboot from the command line.</p>
<p><span mce_name="strong" mce_style="font-weight: bold;" style="font-weight: bold;" class="Apple-style-span"><u style="">Installing New Software</u></span></p>
<p>As mentioned previously, Debian has a fantastic software manager. Most of the software you need can be installed automatically for you. The only downside to this is often, software you like and use often is not updated to the latest version. The only thing we will install manually however is our BitTorrent client.</p>
<p>To install a software package use the following command. You may find many tutorials on the internet about using apt-get.</p>
<p><span mce_name="em" mce_style="font-style: italic;" style="font-style: italic;" class="Apple-style-span">apt-get install &lt;package name&gt;</span></p>
<p>The apt-get system supports dependencies as many Linux programs require other programs to operate properly. Apt-get has a dependency system and should resolve and install all the required packages for you.</p>
<p><span mce_name="strong" mce_style="font-weight: bold;" style="font-weight: bold;" class="Apple-style-span"><u style="">List of Packages to install</u></span></p>
<p>As root:</p>
<p><span mce_name="em" mce_style="font-style: italic;" style="font-style: italic;" class="Apple-style-span">apt-get install automake<br />
apt-get install build-essential<br />
apt-get install sudo<br />
apt-get install wget</span></p>
<p>These will install the tools we need to be able to install the latest versions of Transmission, straight from the developers website.</p>
<p>I would also suggest intstalling the Network Time Daemon. It will keep the time on you DNS-323 in sync with servers on the internet. For some reason the time on my DNS-323 always gets reset or is wrong without it.</p>
<p>apt-get install ntp<br />
/etc/init.d/ntpd start</p>
<p>(It has been a year since I installed my original DNS-323 system. I cannot remember the exact packages I installed to get everything to operate. If I am missing something essential from the list please comment below and I will add it. Thanks.)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.markstahler.ca/2010/01/the-ultimate-dns-323-setup-debian-installation/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<series:name><![CDATA[DNS-323 Ultimate Setup]]></series:name>
	</item>
		<item>
		<title>Dlink NAS DNS-323 + Debian chroot + rTorrent + wTorrent</title>
		<link>http://blog.markstahler.ca/2009/07/dlink-nas-323-debian-chroot-rtorrent-wtorrent/</link>
		<comments>http://blog.markstahler.ca/2009/07/dlink-nas-323-debian-chroot-rtorrent-wtorrent/#comments</comments>
		<pubDate>Sat, 04 Jul 2009 02:28:13 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[DNS323]]></category>

		<guid isPermaLink="false">http://www.markstahler.ca/?p=193</guid>
		<description><![CDATA[EDIT #2: I have written an expanded and up to date (Jan 2010) guide on the setup of a DNS-323 with Transmission. This has been written as a series of posts and can be found http://blog.markstahler.ca/series/dns-323-ultimate-setup/ EDIT: I no longer use the rTorrent + wTorrent combination, there were fatal bugs in rTorrent which caused it [...]]]></description>
			<content:encoded><![CDATA[<p>EDIT #2: I have written an expanded and up to date (Jan 2010) guide on the setup of a DNS-323 with Transmission. This has been written as a series of posts and can be found <a href="http://blog.markstahler.ca/series/dns-323-ultimate-setup/">http://blog.markstahler.ca/series/dns-323-ultimate-setup/</a></p>
<p><em>EDIT: I no longer use the rTorrent + wTorrent combination, there were fatal bugs in rTorrent which caused it to crash after a short period of time (5 hrs &#8211; several days??). I use Transmission + <a href="http://code.google.com/p/transmission-remote-dotnet/">.NET Remote</a> + Transmission Web Interface. If you want a guide for this one (using Debian and built from source; a Funplug installer is currently available <a href="http://forum.dsmg600.info/viewtopic.php?id=2719">here</a>), let me know in the comments.</em></p>
<p>This is a quick guide to getting rTorrent running on your 323 with the wTorrent web interface.</p>
<p>There are several ways that one could get this working in theory but this is the only method that worked properly. The fun_plug custom rtorrent package did not work properly at all nor did the ipkg one work with xmlrpc enabled (which is required for wTorrent).</p>
<p>To run rTorrent with wTorrent, you must install Debian Linux on your 323. This takes 5-10 minutes and there is a fun plug package that automates all of the work for you. Debian is installed in a chroot environment which means it is completely seperated and self contained from the rest of the 323 software.</p>
<p>If you (like I was) were running Fonz&#8217;s Fun Plug you will first have to remove it. This is done by deleting the funplug directory in /mnt/HD_a2/fun_plug. It is possible it can be done via Windows Explorer (or whatever) if you changed its permissions/owner, otherwise do it from the command line.</p>
<p>(Please be careful using rm -rf, you can destroy a Linux system with one wrong delete)</p>
<p>rm -rf /mnt/HD_a2/fun_plug<br />
chmod -R 777 /mnt/HD_a2/ffp<br />
rm -rf /mnt/HD_a2/Nas_prog</p>
<p>Reboot the NAS and delete the /mnt/HD_a2/ffp directory.</p>
<p>You are now ready to install Debian. This is very simple using the Debnas fun plug package. You can find it at <a href="http://sourceforge.net/projects/debnas/">http://sourceforge.net/projects/debnas/.</a> At the time of this writing 0.5 is the latest version.</p>
<p>Download and extract the package to Volume_1 of the 323 (tar -jxf in /mnt/HD_a2/). There should now be linux.tar and the fun_plug in the root of the drive now.</p>
<p>Reboot the 323 and Debian will install, this will take several minutes. SSH will be enabled when the device boots. SSH to the 323, the default root password is 12345678. Change the password immediately with the passwd command.</p>
<p>Now you have a full Linux environment on the 323 with all the repository packages at your disposal. The first step is to upgrade to Debian Lenny, a newer stable version of the operating system. Edit /etc/apt/sources.list.d/etch.list, replacing the word etch with lenny. I also changed the mirror url to a North American mirror rather than the German one by removing the de. in the url. You may also rename the filename from etch.list to lenny.list if you feel so inclined.</p>
<p>Now we need to update the repository packages listing and upgrade to lenny. You may have GPG issues which you can resolve by following the guide <a href="http://linux.com/community/blogs/Debian-Upgrading-to-Lenny-ERROR-no-public-key-available-for-the-following....html">here </a>:</p>
<p>apt-get update<br />
apt-get dist-upgrade</p>
<p>This will take a while to download and then upgrade. When it is done reboot Debian. I had to reboot using the command &#8216;reboot -f&#8217;. When Debian comes back up, it will be running Lenny. When it comes back up, update to make sure everything is current.</p>
<p>apt-get update<br />
apt-get upgrade</p>
<p>Now we have a reasonably current Linux system to play with. Time to install rTorrent, lighttpd, wTorrent and all the dependencies.</p>
<p>apt-get install &lt;package name&gt;</p>
<p>Apt-get should resolve and install all the package dependencies for you.</p>
<p>List of Packages:</p>
<p>rtorrent<br />
lighttpd<br />
screen<br />
php5<br />
php5-cgi<br />
php5-cli<br />
php5-sqlite<br />
php5-xmlrpc<br />
libxmlrpc-c3<br />
subversion<br />
// Packages I dont think are required but installed anyways<br />
automake<br />
build-essential<br />
libapache2-mod-scgi<br />
libapache2-mod-php5<br />
libapache2-mod-fastcgi</p>
<p>Dont worry about lighttp complaining that it cant be started because port 80 is in use, we will change it.</p>
<p>First we will modify the rTorrent settings. One thing that I do that you may also like is that I store my rtorrent settings on the NAS volume 1 and link it to /home/&lt;user&gt;/.rtorrent.rc</p>
<p>Add the following line to your .rtorrent.rc</p>
<p>scgi_port = localhost:5000</p>
<p>usually this line is already in the config and just needs to be uncommented. For this option to work, rTorrent needs to have RPC support built into the program. The rTorrent available from apt does but it is an older version.</p>
<p>Now edit /etc/lighttpd/lighttpd.conf</p>
<p>Under the server.modules section, add the following lines at the end before the ).</p>
<p>&#8220;mod_fastcgi&#8221;,<br />
&#8220;mod_scgi&#8221;</p>
<p>Change where the server stores webpages:</p>
<p>server.document-root       = &#8220;/mnt/HD_a2/www/pages/&#8221;</p>
<p>You also need to change the port the webserver runs on. 80 is used by the dlink admin page:<br />
server.port               = 8080</p>
<p>Add the following section to the config:</p>
<p>## php support<br />
fastcgi.server = ( &#8220;.php&#8221; =&gt; ((<br />
&#8220;bin-path&#8221;  =&gt; &#8220;/usr/bin/php-cgi&#8221;,<br />
&#8220;socket&#8221;    =&gt; &#8220;/tmp/php-cgi.socket&#8221;,<br />
&#8220;max-procs&#8221; =&gt; 2<br />
)<br />
)<br />
)</p>
<p>## enable communication between lighttp and rtorrent<br />
scgi.server = (<br />
&#8220;/RPC2&#8243; =&gt; # RT_DIR<br />
( &#8220;127.0.0.1&#8243; =&gt;<br />
(<br />
&#8220;host&#8221; =&gt; &#8220;127.0.0.1&#8243;, # Ip where rtorrent is listening<br />
&#8220;port&#8221; =&gt; 5000, # Port specified in .rtorrent.rc<br />
&#8220;check-local&#8221; =&gt; &#8220;disable&#8221;<br />
)<br />
)<br />
)</p>
<p>NOTE: You can change the other settings to your hearts content. I changed the directories for my logs etc, I leave this up to you.</p>
<p>Now lighttp and php are configured properly. Lets make the web home on your 323 volume.</p>
<p>mkdir /mnt/HD_a2/www<br />
mkdir /mnt/HD_a2/www/pages</p>
<p>echo &#8220;&lt;html&gt;&lt;body&gt;TEST&lt;?php phpinfo( ); ?&gt;&lt;/body&gt;&lt;/html&gt;&#8221; &gt; /mnt/HD_a2/www/pages/index.php</p>
<p>Start up the web server by:</p>
<p>/etc/inid.d/lighttpd start</p>
<p>Enter the URL including the correct IP for you 323 and you should see the PHP info version page<br />
<a href="http://192.168.1.5:8080/">http://192.168.1.5:8080/</a></p>
<p>If everything works all you need to do is setup nstall wTorrent into a directory under your webserver home.</p>
<p>Download wTorrent from <a href="http://www.wtorrent-project.org/trac/changeset/latest/trunk/?old_path=%2F&amp;format=zip.">http://www.wtorrent-project.org/trac/ch … ormat=zip.</a> Unzip the archive and move the /wtorrent/ directory to /mnt/HD_a2/www/pages/wtorrent. chmod -R 777 wtorrent.</p>
<p>Point your browser to http://&lt;nas ip&gt;:8080/wtorrent/install.php and follow the prompts. After installation is complete, start rTorrent and browse to http://&lt;nas ip&gt;:8080/wtorrent/.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.markstahler.ca/2009/07/dlink-nas-323-debian-chroot-rtorrent-wtorrent/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
