Setting up the Transmission torrent client on Tomato firmware



    Intro


    Welcome all. I want to share with you my experience in setting up the Transmission client on the popular open source firmware for Tomato routers. Recently, a Netgear WNR3500L article was published on a hub : We turn the router into a NAS , where the DD-WRT firmware was taken as the basis. But I personally didn’t really like DD-WRT, and the functionality of the torrent rocking from NAS was really needed. Therefore, I propose to get acquainted with an alternative method.

    Installing Tomato firmware on the router.


    I don’t want to describe in detail the process of installing the firmware and I assume that you know how to do it. In general terms, the sequence of actions is as follows: from the website www.dd-wrt.com download the mini firmware and install it. For my NetGear WNR3500L, this is the d-wrt.v24-14896_NEWD-2_K2.6_mini-WNR3500L.chk file ( unfortunately, the default firmware of the router cannot immediately open the tomato file with the trx extension. Therefore, we resort to DD-WRT first) The next step is to install DD-WRT directly to Tomato. We download the desired distribution from tomatousb.org/download (in my case it was tomato-K26USB-1.28.9054MIPSR2-beta-Ext.trx ) and again install it. Be sure to remember to reset the router. By default to the admin panel at192.168.1.1 set the password admin \ admin.

    Hard disk preparation


    Now we need to format the hard disk into the ext3 file system in one partition . I did this with Acronis Disk Director. When formatting, you will need to specify the HDD label - I entered the name Elements in honor of my WD Elements Portable hard drive. The name of the hard will be needed in the future and will help not to get confused.

    HDD connection


    Before connecting the hard to the usb port of the router, go to the admin panel and go to the USB and NAS -> USB Support section and put down the checkboxes as in the screenshot.



    Install Transmission


    Using Putty, we connect to the router via telnet. By default, port 23 is open for this at the address 192.168.1.1. Username root, password - your admin password. Further the most interesting.

    Create the necessary directories:

    mkdir / mnt / Elements # where Elements is USB HDD label (ext3)
    mkdir / mnt / Elements / opt
    mkdir -p / mnt / Elements / data / torrents
    mkdir / mnt / Elements / opt
    mount -o bind / mnt / Elements / opt / opt
    mount -o bind / mnt / Elements / / mnt

    Download Optware:

    wget www.3iii.dk/linux/optware/optware-install-ddwrt.sh -O /tmp/optware-install.sh
    sh / tmp / optware-install.sh Install

    Transmission and the config:

    / opt / bin / ipkg-opt -verbose_wget install transmission
    / opt / bin / transmission-daemon -g /mnt/Elements/data/torrents/.config/transmission-daemon
    killall transmission-daemon
    wget www.3iii.dk/linux/optware/settings.json -O / mnt / Elements / data / torrents / .config / transmission-daemon / settings.json
    / opt / bin / transmission-daemon -g /mnt/Elements/data/torrents/.config/transmission-daemon

    Now Transmission works and you can go to its web interface by address http://192.168.1.1:9091

    We fix the result


    At the moment, we already have a working client. But when the router is rebooted, our entire economy will not start up by itself. So again we go to the USB and NAS -> USB SUPPORT section and write the following script in the After Mounting block . After this operation, Transmission will rise itself after loading the router.

    mount / mnt / Elements / opt / opt
    / opt / bin / transmission-daemon -g /mnt/Elements/data/torrents/.config/transmission-daemon



    Correct shutdown


    In the Administration -> Scripts section, in the Shutdown block, add the following script for the correct shutdown (complete the transmission service and unmount the drive) in case the router is turned off.

    killall transmission-daemon
    sleep 5 && unmount / dev / sda1



    Raise the ball


    To make all downloaded content conveniently accessible, run Samba. This is done very simply in the USB and NAS -> File Sharing section . Here you need to set Enable File Sharing to Yes and add the folder that you want to make available.



    Now you can attach the folder to your network drive.

    Access from outside. Dyndns


    It is very good to have access to the router from an external network. Thus, for example, from work you can put something to download and, upon arrival home, already have what you need. Most providers do not provide a static ip address or want money for this service. Here DynDNS services come to the rescue. I opted for no-ip. We go to www.no-ip.com , register and get an address of the form username.no-ip.org and a password. We go to the admin interface of the Basic menu router - DDNS and configure it as in the screenshot.



    Access from outside to the router admin panel


    We go to the Administration - Admin Access menu , where we set the settings as in the screenshot. Now at username.no-ip.org:8080 you can get to the router.



    Access from outside via SSH


    To make it possible to connect to the router from the Internet via Putty, we enable SSH Daemon in the same menu ( Administration - Admin Access ) with the following settings.



    Next, we forward the ports to the Port Forwarding - Basic menu.



    Thanks to this, if necessary, connect via SSH



    Access from outside to the web interface of Transmission


    Through the interface of the router, I could not do port forwarding for the torrent client. It was possible to solve this problem with the command in the terminal:
    iptables -I INPUT -p tcp --dport 9091 -j ACCEPT
    Since this "forwarding" disappears after the router reboots, I put it in the "startup" section of the Administration - Scripts menu of the WAN UP block



    After all the manipulations when entering username.no-ip.org:9091, the web interface of Transmission should be. But in the settings.json configuration file located in /mnt/Elements/data/torrents/.config/transmission-daemon/settings.json there is a setting that does not allow "alien" ip. Solution: either add your ip to rpc-whitelist or chop off whitelist altogether, setting it to false. I chose the second method.



    Profit!


    Again, try to log in to username.no-ip.org:9091 - voila! Works. From this moment you can control the entire "system" from any place where there is an Internet connection.



    Goodies & Thanks!


    1) It is convenient to use the service www.yougetsignal.com/tools/open-ports to check open ports on the router
    2) You can connect via SSH using FAR with the installed WinSCP plugin
    3) In order not to climb into Transmission through a browser, you can use Transmission Remote GUI
    4 ) There is also a Transmission Remote for Android. Easily searched on the Android Market. Tested with a slow GPRS connection - it works. True, the functionality of the application is not very large.



    5) I want to thank the user with the nickname ArtemR from the forum.netgear.ru forum, Vladimir Kuznetsov and Andrey Rogozhkin for their help in setting up.
    6) Used materials from here www.xtremecoders.org/forums/f76/guide-how-install-setup-transmission-tomato-56

    Also popular now: