Thursday, September 15, 2011

DLink DNS320 NAS with Extended Services

DLink DNS320 NAS is quite awesome, because it is quite affordable and one can hack it to make it as even more useful than what it already is.

This NAS sports a Marvell Kirkwood processor with 128MB RAM, here is technical details of it:

CPU800 MHz Marvell 88F6281 (Kirkwood)
USB1 USB2.0 Port (front)
LANMarvell 88E1118R-NNC1

To get more info please go here.

Looking at that spec, one can get tempted to figure out a way to turn it into not just a Storage Server. Fortunately there is a way to extend the functionality by using fun_plug. Fun_plug makes installing other services so easy. Here and here contains more detail about setting it up in DNS320. Please install fun_plug (ffp) before installing Debian Squeeze. Make sure you use this ffp script for DNS320, otherwise you will receive errors.

For me it is not enough, since I know that there is a way to install Debian Squeeze in it and chroot it automagically. Now this is amazing, because you have a full blown debian linux distro running inside your NAS.
What you need is to download Debian Squeeze here. Then store it in the root of your nas, normally called Volume_1. Follow the readme inside the archive.

Once Debian Squeeze installed, you can install ntp daemon, web server, svn server, download manager, and other stuff. The only limitation is the size of RAM.

Oh, I need to inform you that installing fun_plug and Debian Squeeze is totally safe and reversible, because no ROM Flashing involved. So, what are you waiting for?!


  1. I'va installed debian squeeze but how to have apache on port 80 ?

    aptitude install apache2
    aptitude install php5
    aptitude install libapache2-mod-php5
    aptitude install php-pear
    aptitude install php5-dev

    root@NAS:~# /etc/init.d/apache2 start


    apache2: Could not reliably determine the server's fully qualified domain name, using for ServerName
    (98)Address already in use: make_sock: could not bind to address
    no listening sockets available, shutting down

    root@NAS:~# netstat -tulpn| grep :80
    tcp 0 0* LISTEN 1742/lighttpd

    If i have understood lighttpd is for the webadmin 'nas

    how to change the port of this web admin to 81 and launch apache 2 on 80 ?

    I tried to change /mnt/root/etc/lighttpd/lighttpd.conf

    with port 81...

    but when i reboot the nas...

    lighttpd.conf is again and again on 80...

    Thanks for your help

    1. Marc, changing the webadmin port requires some more work, instead of just changing the config file.
      Take a look at this tutorial,

      The guide is something like the following:
      cp /etc/lighttpd/lighttpd.conf /ffp/lighttpd_portmod.conf
      in /ffp/lighttpd_portmod.conf, add/edit the following paramater:
      server.port = 81
      Then, make some modification in fun_plug script:
      #*** start Mods for different http port for webadmin tool
      echo "killing lighttpd-angel"
      kill -9 `pidof lighttpd-angel`
      echo "killing lighttpd"
      kill -9 `pidof lighttpd`

      echo "Restart lighttpd-angel with different port"
      /usr/sbin/lighttpd-angel -D -m /usr/local/lib -f /ffp/lighttpd_portmod.conf &
      #*** end Mods different http port


    2. Hi Murzal,

      I did the above steps for my case but it seems didnt work. Do i need to install Debian?

    3. yes, my method is by having debian squeeze installed.

  2. Hi! Here can find info how to put native debian to the DNS320, DNS325:
    This guy made it so cool.

    1. Thanks a lot. Wow, this requires flashing kernel image. Brave guy. I am sure he knows what he's doing.

  3. @ Murzal - Thanks for providing the link to the instructions however these are for if you are continuing to use ffp rather than Debian Squeeze as the file you have to update is the orginal ffp fun_plug file. Are there any instructions for changing the port whilst continuing to use Debian Squeeze?

    @ Marc - did you ever get this working..and how did you do it??!! :-)

    Thanks in advance for any help.


    1. @Dave: In my understanding, what Marc was trying to do is to run separate (another one instead of the web server for the web config interface) apache web server on port 80. He could not do it, because of the existing web server already run on that port. So, I gave him the guide to change the web config server to port 81, so he could run his own apache web server on port 80. Are you trying to do the same? Or something else?

  4. Hi Guys.. For anybody who have installed Debian Squeeze, have you tried installing Plexapp on your NAS. It's really a cool app and make your media looks cooler when browsing them using Plexapp client from a PC/ or LG/Samsung Smart TV. Find out more here:

  5. I have followed all the steps but after the reboot i can't access debian using ssh, it said connection refused. I have a DNS320L Nas.

    1. I have the same problem. I can't find any solution to that.