DNS 325 - Extend your NAS possibilities with Funplug 0.5

Contents[Hide]

dropcap-dns325

DNS-325, like its elder brother DNS-323, is a very versatile NAS that can be extended heavily by installing fun_plug script.

The main advantage of DNS-325 over DNS-323 or even DNS-320, is its horse power (1.2 GHz processor) and its embedded RAM (256 Mb). We are in front of a real home server !

Fun_plug script opens the gate to some very interesting extension possibilities.

It won't explain how to install fun_plug 0.5 script on a brand new DNS-325, as it is explained in details on this page of NAS Tweak site.

It will focus on few other important aspects :

  • detection of the DNS-325 NAS device in your LAN from a Linux workstation (without the Windows utility)
  • installation of third-party software repositories (Fonz, Uli, Optware)
  • installation of basic packages that will be used by many others (python, ...)

Once your have gone thru all these steps, you can focus on some much more rewarding procedures for your DNS-325 :

  • install a LAMP server
  • Install a Transmission client
  • Install an OpenVPN server
  • Send mails thru Gmail account from shell scripts

This article has been tested on a DNS-325 with firmware 1.02.

fun_plug 0.5 is kind of deprecated.
You are advised to follow the latest one DNS 325 - Fun_plug 0.7 : Extend your NAS possibilities.

1. Linux - Detect DNS-325 IP address

The first time you connect your DNS-325 NAS device on your LAN, it will get an DHCP IP address. So you can't guess what will be its address.

If you are running a Ubuntu (or any other flavor of Linux) workstation, you can not use the D-Link provided CD, as it is meant exclusively for Windows clients.

So, you will need some other detection mecanism to find your NAS IP address on your LAN.

To do the job you will need to install the umit utility, which is a GUI of nmap.

# sudo apt-get install umit

You can now start the program with root power :

# sudo umit

You will then need to configure the detection according to your LAN netmask :

  • target : your LAN netmask (192.168.0.*, 10.0.1.*, ...)
  • Profile : Quick Operating System Detection

To start the detection process, select Scan. It will take some time.

The detection report on the right side will list all the devices found on the network.

DNS-325 will be detected as follow :

Nmap scan report for xxx.xxx.xxx.73
Host is up (0.0014s latency).
Not shown: 998 closed ports
PORT    STATE SERVICE
80/tcp  open  http
443/tcp open  https
MAC Address: aa:aa:aa:aa:aa:aa (Unknown)
No exact OS matches for host (If you know what OS is running on it, see http://nmap.org/submit/ ).
TCP/IP fingerprint:
OS:SCAN(V=5.21%D=11/24%OT=80%CT=1%CU=31347%PV=Y%DS=1%DC=D%G=Y%M=84C9B2%TM=4
OS:ECD7C98%P=x86_64-unknown-linux-gnu)SEQ(SP=D0%GCD=1%ISR=EF%TI=Z%CI=Z%II=I
OS:%TS=7)SEQ(SP=FE%GCD=1%ISR=FA%TI=Z%CI=Z%II=I%TS=7)SEQ(SP=D1%GCD=1%ISR=EF%
OS:TI=Z%CI=Z%II=I%TS=7)OPS(O1=M5B4ST11NW4%O2=M5B4ST11NW4%O3=M5B4NNT11NW4%O4
OS:=M5B4ST11NW4%O5=M5B4ST11NW4%O6=M5B4ST11)WIN(W1=16A0%W2=16A0%W3=16A0%W4=1
OS:6A0%W5=16A0%W6=16A0)ECN(R=Y%DF=Y%T=40%W=16D0%O=M5B4NNSNW4%CC=N%Q=)T1(R=Y
OS:%DF=Y%T=40%S=O%A=S+%F=AS%RD=0%Q=)T2(R=N)T3(R=Y%DF=Y%T=40%W=16A0%S=O%A=S+
OS:%F=AS%O=M5B4ST11NW4%RD=0%Q=)T4(R=Y%DF=Y%T=40%W=0%S=A%A=Z%F=R%O=%RD=0%Q=)
OS:T5(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)T6(R=Y%DF=Y%T=40%W=0%S=A%A
OS:=Z%F=R%O=%RD=0%Q=)T7(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q=)U1(R=Y%D
OS:F=N%T=40%IPL=164%UN=0%RIPL=G%RID=G%RIPCK=G%RUCK=G%RUD=G)IE(R=Y%DFI=N%T=4
OS:0%CD=S)

Uptime guess: 0.011 days (since Wed Nov 23 23:51:09 2011)
Network Distance: 1 hop
TCP Sequence Prediction: Difficulty=209 (Good luck!)
IP ID Sequence Generation: All zeros

You now know that your DNS-325 device is accessible thru xxx.xxx.xxx.73.

You can connect with your web browser to check. Please note that the admin password is empty by default.

2. Install Fun_plug script

To install fun_plug script on your fresh DNS-325, you just need to follow carefully this page of NAS Tweak site. The complete procedure is explained with lots of details.

You just have to be sure to follow the specific parts for DNS-325 (the article was first written for DNS-323).

Be specially careful about the password modification procedure where you should throw these commands in your DNS-325 telnet console :

# wget http://wolf-u.li/u/172/ -O /ffp/sbin/store-passwd.sh
# store-passwd.sh

3. Declare additionnal packages repository

All the following command have to be executed form the DNS-325 Telnet or SSH console.
They suppose that you have fully completed the fun_plug install procedure on your DNS-325.

You can now install easily some additionnal packages from some specific repository.

3.1. Fonz repository

First repository is provided by Fonz. You can install it with these commands :

# mkdir -p /ffp/pkg/
# cd /ffp/pkg/
# /ffp/bin/rsync -av --delete inreto.de::dns323/fun-plug/0.5/packages .

Note that :

  • the "." at the end of the line is very important
  • the packages are together over 120 MBytes, so it can take a while.

After the last file you get some statistics and return to the command prompt.

This step results in roughly 100 packages being copied (as tarballs) to the folder /ffp/pkg/packages/.

3.2. Uli repository

Next, you can download additional packages provided by Uli repository.

# /ffp/bin/rsync -av --delete ffp.wolf-u.li::ffp/additional .

After the last file you also get some statistics and return to the command prompt.

This step results in a few packages being copied (as tarballs) to the folder /ffp/pkg/additional/ and its subdirectories.

4. Update existing packages

This procedure has to be followed from begin to end in one step.
If you don't follow all the steps, you met get an instable NAS, and worse, you can even be locked out of your NAS without telnet and SSH access.

To be on the safe side, it's better to enable Telnet … just in case.

# chmod a+x /ffp/start/telnetd.sh

Then, you can start the package upgrade procedure

# funpkg -u /ffp/pkg/packages/funpkg*.tgz
# funpkg -u /ffp/pkg/packages/*.tgz
# funpkg -u /ffp/pkg/additional/*/*.tgz

Finally, re-enable SSH daemon, in case it has been updated and it has lost the execute right

# chmod a+x /ffp/start/sshd.sh

If you check, you should see Telnet and SSH allowed to automatically start during next reboot

# ls -l /ffp/start/*.sh
...
-rwxr-xr-x 1 root root  971 Jul 29 16:30 sshd.sh
...

-rwxr-xr-x 1 root root  169 Aug 12 22:17 telnetd.sh

 

You can now reboot

# reboot

If you can connect thru SSH without problem, you can now disable Telnet access

# chmod a-x /ffp/start/telnetd.sh

5. Install Nano editor

Install the package

# funpkg -i /ffp/pkg/additional/*/nano*.tgz
Installing package nano-2.0.9-2 ...
...
[pkgsrc]
Executing install script for nano-2.0.9-2 ...

Copy the configuration file and edit it.

# cp /ffp/etc/examples/nanorc /ffp/etc/
# nano /ffp/etc/nanorc

By uncommenting some lines, you can enable the syntax highlight according to your needs.

In my case, I just need the shell scripts highlighting.

/ffp/etc/nanorc

...
## Bourne shell scripts
include "/ffp/share/nano/sh.nanorc"
...

6. Install Optware repository

Source : http://nas-tweaks.net/219/installation-of-optware-on-the-d-link-dns-320-dns-325-dns-343-and-conceptronic-ch3mnas/

Optware, originally initiated for the NSLU2, can provide some very interesting packages for the DNS-325.

To have access to the Optware repository, the only thing to do is to get a startup script provided by Uli.

# wget http://wolf-u.li/u/233 -O /ffp/start/optware.sh
# chmod a+x /ffp/start/optware.sh
# /ffp/start/optware.sh start

Once done, just reboot the NAS to make it fully operational.

7. Install Python

Python langage is available from Optware repository, along with some nice extension.

So, to install Python and the main libraries, you just need to install these Optware packages :

# ipkg install python
# ipkg install py-crypto
# ipkg install py-gd
# ipkg install py-xml

In case you are interested, some more python libraries are available from Optware. You can list them with

# ipkg list | grep py-

You are now ready to install some very interesting pieces of software on your DNS-325.

It should help in many ways ...

Signature Technoblog

This article is published "as is", without any warranty that it will work for your specific need.
If you think this article needs some complement, or simply if you think it saved you lots of time & trouble,
just let me know at This email address is being protected from spambots. You need JavaScript enabled to view it.. Cheers !

icon linux icon debian icon apache icon mysql icon php icon piwik icon googleplus