Here’s a guest post from someone who followed my first article on hacking the D-Link DNS-323.  I’m grateful to see the sense of community forming here and people giving back!

I haven’t validated the steps below but I will try it soon, as always, hit me up in the comments if you need more help!

badmanhop writes,

    How to install transmission 1.42

Hi after messing around and reading lots of info and from following this great web page i decided to try and update the transmission to the latest one and this is how i did it..
first “i read that you should backup the files before you try this”, i did. lol dont know how

open telnet/ssh to your dns-323 and input a line at a time then hit enter.  (Note:  Do not put in the #-signs).

# funpkg -r Transmission-1.34-ffp0.5.tgz
# wget http://kylek.is-a-geek.org:31337/files/curl-7.18.1.tgz
# funpkg -i curl-7.18.1.tgz
# wget http://kylek.is-a-geek.org:31337/files/Transmission-1.42-1.tgz
# funpkg -i Transmission-1.42-1.tgz
# wget http://www.inreto.de/dns323/fun-plug/0.5/packages/uclibc-0.9.29-7.tgz
# funpkg -i uclibc-0.9.29-7.tgz

after i did all this i then telneted back into my dns323 and had a little trouble but found the fault and this is what i did.

You need to tell Transmission which IPs are allowed to access it. This is done in the form of a whitelist or you just keep getting 401 fault when you try to login to the web page.

# /ffp/start/transmission.sh stop
wait for transmission to stop (few mins) or seconds.
# transmission-daemon -f -T -B -a 127.0.0.1,(”then i put my pc ip address i.e- 192.118.0.0″) (eg -a 127.0.0.1,192.118.0.0) hit enter.
Note:  You will have to determine the IP addresses of the PCs on your own network

you should now get some print out telling you that all went well and your ip is now added and a listening port was opened, if not then you have not fully stopped transmission try stopping again and repeting the whitelist settings again.

no errors then press ctrl-c and it will save the setting, now you reboot or you can try just entering this.
# /ffp/start/transmission.sh start

you should now login and all you sould see all your files loading up.

if all else fails like it did for me as i had to edit the file manualy with my ip address (transmission-daemon/settings.json).

reboot the dns.

try to logon to transmission it worked for me and all my old setting started to restore upon boot.

Im now on transmission 1.42 and all is working well.

BIG thanks to the main people for all the hard work that they do and the web sites i found on this subject.
www.transmissionbt.com
http://forum.dsmg600,dansu,KyleK.
And BIG THANKS to “Horto” and this web site www.horto.ca
with out this i would not be here now. have a beer on me (’.')
thanks badmanhop.

Thanks badmanhop!

Update 24-Jan-09:  The one and only shadowandy has a great tutorial on how to get 1.42 running.  Check it here!!


12 Comments to “Upgrading your hacked DNS-323 NAS to use Transmission 1.42”  

  1. 1 ConsumedConsumer

    I looked for updated scripts for firmware 1.06 ad could not find much..
    I wonder: is Transmission much better than the built-in BT manager? The cron script loads the torrents every hour, wherea the built-in BT manager is instantaneous.

  2. 2 admin

    That’s actually a really good question. For the average user, I would think that the built-in torrent client is sufficient. It probably does almost everything you need it to do. But for the power user, the idea of running your own client in a customized manner is quite appealing.

    For example, with my torrent watchdog script (v1.0), you can set the DNS-323 to monitor a specific directory. Whenever a torrent file is detected, it will automatically start downloading, and stop seeding when its finished. With the built-in torrent client (323 native web interface), I’m pretty sure you have to load the torrents manually.

    For me, personally, I’m all about the “set it and forget it”. I love the fact that with a tiny bit of work I can just drop torrents in a watch folder and have it all run automatically without any work on my part. As an added bonus, v2.0 of my watchdog script also helps keep my media library organized :)

  3. 3 AD

    I followed the steps to upgrading Transmission, and I would like to confirm that it worked for me. I had to stop transmission by running /ffp/start/transmission.sh stop, then manually edit settings.json, and I included 192.168.1.*, so that any ip address from my network could connect to the web interface.

  4. 4 ConsumedConsumer

    yes, you’re right, the torrents have to be loaded manually in the native interface. the good part is that you can just enter the torrent URL, without downloading it yourself. the bad part is that it takes a few seconds until it’s “digested”; dropping the torrent in a bookmarked directory is probably easier.

    one other thing i’m interested in - and haven’t seen it mentioned anywhere - is the ability to run a TOR Privoxy node. if this could be made to work, it’d be awesome. what’s your take?

  5. 5 admin

    @ConsumedConsumer,

    Sure! You’ve got a couple of options:
    1) Install optware (automatically?) on your 323 and find the privoxy/tor package(s).
    2) Install debian on your 323 and find the privoxy/tor package(s).
    3) Find the privoxy/tor sources and crosscompile them for the 323.

    I’m not 100% sure of the details of how privoxy works with TOR, but in any case, your solution is probably documented somewhere in the 323 wiki, and applicable to a ton of *nix packages/software (e.g. SVN, MRTG, irssi, etc, etc). I hope you’re linux/UNIX-savvy, because clearly these solutions aren’t for the faint of heart. But the cool thing is, there’s definitely more than one way to accomplish what you’re after!

  6. 6 ConsumedConsumer

    Thanx, I had a look at the wiki (optware) but for some reason I did not see Tor Privoxy packages :D
    (Obviously, the optware way is the preferred method for my purposes.)
    I’ve been playing with Linux for a while now, but do not consider myself a guru. I happen to think that given enough time, I can accomplish any computing task - it’s just that I don’t have that much time for this now. I’ll get to it eventually!

    I’m still not sure of the best way to secure the box and particularly access to files. Hopefully, I’ll be able to look into it tonight.

  7. 7 tconciello

    I posted this on http://forum.dsmg600.info/viewtopic.php?pid=25256#p25256 but im hoping you can offer some insight!

    Help please, relatively new, so any help would be appreciated. I upgraded 1.42 and now I get the following error messages when attepting to connect to : http://192.168.1.102:9091/transmission/web/

    401: Unauthorized

    Unauthorized IP Address.

    Either disable the IP address whitelist or add your address to it.

    If you’re editing settings.json, see the ‘rpc-whitelist’ and ‘rpc-whitelist-enabled’ entries.

    If you’re still using ACLs, use a whitelist instead. See the transmission-daemon manpage for details.

    my config file is listed below:

    {
    “blocklist-enabled”: 0,
    “download-dir”: “\/mnt/HD_a2/BT/torrents”,
    “download-limit”: 100,
    “download-limit-enabled”: 0,
    “encryption”: 1,
    “max-peers-global”: 200,
    “peer-port”: 51413,
    “pex-enabled”: 1,
    “port-forwarding-enabled”: 0,
    “rpc-authentication-required”: 0,
    “rpc-password”: “”,
    “rpc-port”: 9091,
    “rpc-username”: “”,
    “rpc-whitelist-enabled”: 0,
    “rpc-whitelist”: “127.0.0.1,192.168.1.26″,
    “upload-limit”: 100,
    “upload-limit-enabled”: 0
    }

    Can anyone tell me why I am getting this error when I am connecting to the GUI?

  8. 8 am

    tconciello

    1. First step
    /ffp/start/transmission.sh stop

    If no stop
    ps -ef | grep trans
    kill -9 1683 1696 1697

    vi settings.json

    i

    2.
    {
    “blocklist-enabled”: 0,
    “download-dir”: “\/mnt\/HD_a2\/incoming”,
    “download-limit”: 200,
    “download-limit-enabled”: 0,
    “encryption”: 1,
    “max-peers-global”: 200,
    “peer-port”: 51413,
    “pex-enabled”: 1,
    “port-forwarding-enabled”: 0,
    “rpc-authentication-required”: 0,
    “rpc-password”: “”,
    “rpc-port”: 9091,
    “rpc-username”: “”,
    “rpc-whitelist”: “*.*.*.*”,
    “upload-limit”: 100,
    “upload-limit-enabled”: 0
    }

    escape :wq

    3.
    /ffp/start/transmission.sh start

    4.
    http://192.168.1.128:9091/transmission/web

  9. 9 weebg

    I had to change the /ffp/start/transmission.sh script to point to my config file that was created under ~/.config/transmission-daemon. The original script only pointed to my /home/root directory.

  10. 10 doobya

    For those who want to use the blocklist functionality: here is how I adapted the script given on the Transmission wiki to use with the DNS-323.

    saved as /ffp/var/scripts/blocklist-update.sh
    —————-
    #!/bin/sh

    /ffp/start/transmission.sh stop
    sleep 3

    PID=”`pidof transmission-daemon`”
    if [ -n “$PID” ]; then
    kill $PID
    fi

    echo -n “Waiting for the daemon to exit ”
    sleep 2

    COUNT=1
    while [ -n “`pidof transmission-daemon`” ]; do
    COUNT=$((COUNT 1))
    if [ $COUNT -gt 60 ]; then
    echo -n “transmission-daemon doesn’t respond, killing it with -9″
    kill -9 `pidof transmission-daemon`
    break
    fi

    sleep 2
    echo -n “.”
    done

    echo ” done”

    cd /mnt/HD_a2/.transmission-daemon/blocklists/
    if wget http://www.bluetack.co.uk/config/level1.gz 1>/dev/null 2>&1 ; then
    rm -f level1 && gunzip level1.gz
    echo “blocklist updated”
    else
    echo “blocklist not updated”
    fi

    /ffp/start/transmission.sh start
    —————-
    Source: http://trac.transmissionbt.com/wiki/Scripts/BlockListUpdater

    Cheers to horto for the great site && to badmanhop for the upgrade tips!!

  11. 11 admin

    @doobya: THANK YOU!

  12. 12 Aizal

    @doobya,

    Am I correct to modify the script like this so it will restart transmission after updating blocklist?

    #!/ffp/bin/sh

    #######################################
    # Blocklist downloader
    # Author: shadowandy.sg[AT]gmail.com
    # Web: http://www.shadowandy.net
    ########################################

    # Setting the path
    DOWNLOAD_DEST=/mnt/HD_a2/.transmission-daemon/blocklists
    TRANSMISSION=/mnt/HD_a2/ffp/start/transmission.sh

    ##### You should not need to edit anything below #####

    cd ${DOWNLOAD_DEST}
    # backing up existing blocklist (if any)
    for blocklist in “level1″ “level1.bin”
    do
    if test -f ${blocklist}; then
    echo “Backing up ${blocklist}…”
    mv -f ${blocklist} ${blocklist}.bak
    fi
    done
    # downloading the blocklist
    echo “Downloading new blocklist…”
    curl –silent http://download.m0k.org/transmission/files/level1.gz > level1.gz
    echo “Unpacking new blocklist…”
    gunzip level1.gz
    echo “Done. Blocklist downloaded and unpacked to ${DOWNLOAD_DEST}”
    echo “restarting Transmission”
    sh ${TRANSMISSION} restart
    echo “Done. Transmission has been restarted”

Leave a Reply