How to install any of the binaries?

An area of the forum to discuss router binaries (utilities and applications that run on routers) etc.
Post Reply
Pieter2627
Newbie
Newbie
Posts: 5
Joined: Sun Apr 07, 2013 2:49 pm

How to install any of the binaries?

Post by Pieter2627 » Wed Apr 17, 2013 1:45 pm

Hi,

I want to install tinyproxy and possible darkstats on my router with the following hardware and software details - "RouterTech AR7WRD (TNETW1350A) Custom Firmware ( v2.97 )".

So far I know that I will have to downloads them from here Class II Router Binaries, but I don't know how to put/install them on the router.

FTPing the router using "root" as username and the same password for the web interface as the password via GUI just returns " Invalid reply" and using "dir" via command line FTP does not list any content.

I mainly using Ubuntu(Linux), but can use Xp if needed.

Thanks for any help.
Pieter

PS. I develop websites from time to time and it would also like to know if it is possible to edit the /etc/hosts file on the router to make local testing easier.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: How to install any of the binaries?

Post by thechief » Wed Apr 17, 2013 9:18 pm

You can't use ftp. The best option is to scp to copy the files across. WinSCP works fine with WINE.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
Pieter2627
Newbie
Newbie
Posts: 5
Joined: Sun Apr 07, 2013 2:49 pm

Re: How to install any of the binaries?

Post by Pieter2627 » Thu Apr 18, 2013 3:24 pm

Ok, Thanks

I downloaded WinSCP 5.14 and used the same credentials that I tried for the FTP and was able to copy the three files for TinyProxy and the one for DarkStat over to the /var directory on the router.

I then used WinSCP's command utility and entered "sh tinyproxy" (tinyproxy is one of the three files) which returned that it does not have permission to read tinyproxy.bin (another of the three files). So I gave it execute permission and then ran the command again, and then it returned that it can't read /etc/tinyproxy.conf. I then found a tinyproxy.conf file in the 31 January 2010 combined download's file and copied it to /var and changed the tinyproxy file to look for it in /var. The command then didn't throw any errors so I took it that it was successful, but testing showed that it didn't work.

And "sh darkstat" throws an error about a '[' on its first line.

I don't know if what I tried was how it is supposed to be done, but based on the outcome it seems to be wrong. So what should be done after the files are copied to the /var directory?

I flashed the router with RouterTech three weeks ago and this is the first time that I am trying to do something like this, so I will need some help.

Thanks,
Pieter
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: How to install any of the binaries?

Post by thechief » Thu Apr 18, 2013 11:12 pm

1. Send the tarballs to the router (not the individual files inside them) and extract them there.
2. Don't run anything on the router from WinSCP's command utility. Connect to the router via telnet or ssh and run the commands there, at the command line.
3. Download the tinyproxy tarball again (it has been updated tonight), send it to the router, and extract it from inside the router. There is a readme file in the tarball that explains things a bit.
4. For darkstat, simply run "fetch_ds" from a command prompt on the router.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
Pieter2627
Newbie
Newbie
Posts: 5
Joined: Sun Apr 07, 2013 2:49 pm

Re: How to install any of the binaries?

Post by Pieter2627 » Fri Apr 19, 2013 9:43 am

OK, now I sent the tarrballs over using WinSCP. Then open the command prompt (I am using XP, because to avoid installing Wine in Ubuntu) and entered 'telnet 192.168.1.1', gave 'root' when asked for username and the normal password for the password.

The tarrballs where then extracted using 'tar -xvzf archive' (archive = tinyproxy.tar.gz or darkstat.tar.gz). Both extracted and I can start darkstat using the command you provided.

But starting 'tinytrans.sh' outputs

Code: Select all

iptables: No chain/target/match by that name
and then if I tried it again it gives

Code: Select all

killall: /var/tmp/tinyproxy/tinyproxy-bin: no process killed
/var # /var/tmp/tinyproxy/tinyproxy-bin: Could not create listening socket.
Running 'tinyproxy' does not give any errors, but testing shows that it did not work(I tried one of the words in the filter file for testing). So I tried running it again too, and got the same error that I got when I tried to run 'tinytrans.sh' for a second time.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: How to install any of the binaries?

Post by thechief » Fri Apr 19, 2013 5:56 pm

1. darkstat - the "fetch_ds" command is self-contained (i.e., you don't need to first upload it manually to the router)

2. tinyproxy - the first error message is inconsequential (i.e., it can safely be ignored); the second one happens because the program is already running. You can download the tarball again (updated again, to provide some information about what is happening). I know of no reason why it shouldn't work if everything is properly configured. If you try again and it still doesn't work after setting up some proper filtering (e.g., just try some web addresses in the filter file), then you might want to post the output of the firmware's system diagnostics (under the "Tools" menu).
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
Pieter2627
Newbie
Newbie
Posts: 5
Joined: Sun Apr 07, 2013 2:49 pm

Re: How to install any of the binaries?

Post by Pieter2627 » Sat Apr 20, 2013 10:53 am

1. I realised sometime yesterday that 'fetch_ds' fetches and runs/starts darkstat when I tried to get it to 'listen' to my PPPoE connection since it didn't display any graphs, but I saw on a previous post here that it is a bug that can be fixed. So uploading, extracting and running it is a duplicate of just running 'fetch_ds' like you said.

2. Tinyproxy works now, it might have worked before to because it seems that it does not check/filter https connections.

All I have to do now is to get the files to stick on the router between reboots. I have seen a few examples of it on this forum, but don't know which will be the best way.
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: How to install any of the binaries?

Post by thechief » Sat Apr 20, 2013 6:02 pm

Pieter2627 wrote:All I have to do now is to get the files to stick on the router between reboots. I have seen a few examples of it on this forum, but don't know which will be the best way.
You can use a minix partition if you want to store the files on the router. See firmware-faq/#minix

If you have a NAS, then you can keep the files on your NAS, and mount the NAS drive via smbfs (search for smbfs in features.html).
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
Pieter2627
Newbie
Newbie
Posts: 5
Joined: Sun Apr 07, 2013 2:49 pm

Re: How to install any of the binaries?

Post by Pieter2627 » Mon Apr 22, 2013 4:23 pm

I see that I will have to unmount the mimix partition before switching of the router. Is there any why that it can be done automatically when I use the web-interface to shutdown/reboot the router?
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: How to install any of the binaries?

Post by thechief » Mon Apr 22, 2013 5:53 pm

Pieter2627 wrote:Is there any why that it can be done automatically when I use the web-interface to shutdown/reboot the router?
It is done automatically when you shutdown or reboot the router from the web interface - as long as you are running the latest version of the firmware (i.e., v2.97).
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
Post Reply