1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

My utilities web site revived

Discussion in 'Tomato Firmware' started by rhester72, Apr 10, 2010.

  1. ewmailing

    ewmailing Networkin' Nut Member

    One more thing. Would you double check to see if mDNSResponder and mDNSProxyResponder are correctly dynamically linked (in the dynamic build). These tools seem very specialized and I think they should be much smaller. The tool dns-sd is a generic test tool which used to be able to do all the things both mDNSResponder and mDNSProxyResponder claim to do and it is way smaller.

    Thanks
     
  2. onehomelist

    onehomelist Addicted to LI Member

    Thanks Rhester72. I setup the radius server with the captive portal by following this guide https://help.ubuntu.com/community/WifiDocs/CoovaChilli

    When I run ./chilli I get this error

    coova-chilli[4591]: options.c: 174: could not generate configuration (/tmp/chilli-4591/config.bin), sleeping one second

    Also I put the config, up.sh and down.sh in the same directory.
     
  3. rhester72

    rhester72 Network Guru Member

    The link phases look correct to me:

    Code:
    mipsel-uclibc-gcc objects/prod/mDNSPosix.c.o objects/prod/mDNSUNP.c.o objects/prod/mDNSDebug.c.o objects/prod/GenLinkedList.c.o objects/prod/DNSDigest.c.o objects/prod/uDNS.c.o objects/prod/DNSCommon.c.o objects/prod/PlatformCommon.c.o objects/prod/mDNS.c.o objects/prod/Responder.c.o -o build/prod/mDNSResponderPosix
    
    mipsel-uclibc-gcc objects/prod/mDNSPosix.c.o objects/prod/mDNSUNP.c.o objects/prod/mDNSDebug.c.o objects/prod/GenLinkedList.c.o objects/prod/DNSDigest.c.o objects/prod/uDNS.c.o objects/prod/DNSCommon.c.o objects/prod/PlatformCommon.c.o objects/prod/mDNS.c.o objects/prod/ProxyResponder.c.o -o build/prod/mDNSProxyResponderPosix
    
    They show appropriate dynamic linkage:

    Code:
            libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00000000)
            libc.so.0 => not found (0x00000000)
            /lib/ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x00000000)
    
    mDNSDebug's object code is very small (1680 bytes unstripped), so even if that's superflous, it doesn't seem to have a major effect.

    It would appear that dns-sd benefits from linkage to it's own library:

    Code:
            libdns_sd.so => not found (0x00000000)
            libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00000000)
            libc.so.0 => not found (0x00000000)
            /lib/ld-uClibc.so.0 => /lib/ld-uClibc.so.0 (0x00000000)
    
    The library is 30K, but that still adds up to only 76K for dns-sd, which suggests that they are either using *very* different approaches to do the same thing or that there is a lot of superflous functionality in mDNS.c (over 192K of object code!) that isn't used/required by the responders.

    Rodney
     
  4. rhester72

    rhester72 Network Guru Member

    It looks like the config needs to contain the full path to config.bin - if it can't find it, it won't open it and will generate the above message. It's a read error, not a write error.

    Rodney
     
  5. rhester72

    rhester72 Network Guru Member

    Done - let me know how it works out.

    Rodney
     
  6. rhester72

    rhester72 Network Guru Member

    MediaInfo is up...and boy, is it big. Enjoy!

    Rodney
     
  7. ewmailing

    ewmailing Networkin' Nut Member

    Thanks for looking into this. I verified that the dns-sd tool can do what these other tools can do. I need to look at the source code in more detail, but my first glance is that these other two tools aren't doing any more than dns-sd. My instinct says Apple statically linked to things they didn't need to instead of dynamically linking to libdns_sd. I would like to experiment with this though I need more time to look over things.
     
  8. ewmailing

    ewmailing Networkin' Nut Member

    Drat:
    mDNSCoreBeSleepProxyServer: Failed to allocate SPSSocket

    The implementation calls a function called mDNSPlatformUDPSocket() that apparently allocates this SPSSocket. However, the function is not yet implemented in the Posix code.

    I'm probably starting to get in over my head here. If somebody reading this wants to try to fill in the implementation, please speak up.

    I'm wondering for this function, how much of the Mac code can be ported since I would expect things for socket allocation to work mostly at the BSD socket level which would be common to both implementations. Maybe the IPv6 stuff is trickier, but maybe for Tomato purposes, we can skip that for now.
     
  9. Aiko

    Aiko Networkin' Nut Member


    Thank you.

    I'll try it later today, at home.

    I'm using an USB for my /opt in my RT-N16, since mediainfo is not a deamon that needs to be running constantly (IIANM) size shouldn't be a problem

    Thanks again! :)
     
  10. ewmailing

    ewmailing Networkin' Nut Member

    I haven't given up on the Bonjour stuff yet, but I wanted to give your Avahi binaries a good try. So I have a question. Avahi expects a bunch of configuration files in /etc/avahi. My understanding is that if I try to write files in this area, it is only in RAM and the next reboot will lose all these files. What is the usual way of dealing with this? (Or what would you recommend?)

    The optware distribution looks like it passed a flag so all the configuration files are found in /opt/etc/avahi.

    Thanks
     
  11. rhester72

    rhester72 Network Guru Member

    The flag is easiest, assuming you have CIFS or USB storage available. If not, you can generate them at boot time in the init script with simple echos of the required lines into the target files, assuming they aren't too wordy.

    Rodney
     
  12. gtj0

    gtj0 Networkin' Nut Member

    You can also use "nvram setfile2nvram /etc/somefile" to save arbitrary files to nvram. They'll be restored automatically early in the boot process.
     
  13. rhester72

    rhester72 Network Guru Member

    Unless the files are *very* small, I generally recommend against setfile2nvram, because:

    a) People will (mis)use it as "file storage", even for frequently-updating files, blowing away the write cycles to the flash, and
    b) NVRAM is a painfully scarce resource...even on the RT-N16 and taking extreme precautions to avoid NVRAM waste, I have less than 8K of it free.

    That having been said...with the above in mind, it may well be a perfectly valid solution for the OP's issue.

    Rodney
     
  14. ewmailing

    ewmailing Networkin' Nut Member

    Actually, there are potentially lots of files. The avahi directory contains multiple config files and another subdirectory called services with potentially lots of files there. The files might range from 10-30 lines each.

    I think the runtime flag may only affect a single conf file, but the extra support files (like services) are hard coded to compile time paths.
     
  15. ewmailing

    ewmailing Networkin' Nut Member

    A couple more questions/requests about the Avahi build.

    In the dynamic version, I can't find libssp.so.0 needed by avahi-daemon. What is libssp? Could this component be removed as a dependency?

    Second, just curious if there is a RAM usage difference between using the static and dynamic versions.

    Finally, would you mind building the new release of Avahi 0.6.27. They just snuck in a new release. If there is no advantage to dynamic, you could just build the static. Getting all these library dependencies into place is a pain.

    Thanks
     
  16. hrana

    hrana Network Guru Member

    @rhester72: Thanks for making your collection of utils available. I had a request for you... "Network Caller ID" located here: http://sourceforge.net/projects/ncid/files/

    It has 4 parts: ncidd, ncid, sip2ncid, yac2ncid

    You mentioned using the --tee option for target ROUTE in iptables to rebroadcast SIP traffic as one possible solution in this thread: http://www.linksysinfo.org/forums/showthread.php?t=64506&highlight=ncid

    Is it possible to build this package for Tomato (I'm running WRT54GL 1.1)? If you end up compiling it then I'd be very interested in the tweaks you used so I can attempt it myself in the future.

    Thanks!
     
  17. rhester72

    rhester72 Network Guru Member

    Compiled, but incomplete. From NOTES:

    ncid: The following are currently not copied to PRECOMPILED or changed in any way from the original distribution (and thus will almost certainly not function properly on Tomato): ncid (shell script), cidgate/ncidsip (Perl script), cidgate/yac2ncid (bash script)

    I have no knowledge of nor ability to test any changes required to make those scripts function on Tomato (the perl is pretty much a non-starter for obvious reasons), but the binaries are up and appear to be sane.

    If anyone produces Tomato-friendly versions of the above I'd be happy to fold the required changes into the build process.

    Rodney
     
  18. hrana

    hrana Network Guru Member

    Thanks... I'll give them a whirl when I get a chance. I appreciate the effort!
     
  19. rhester72

    rhester72 Network Guru Member

    Both web and ftp are down at the moment...with good reason. They'll be back soon.

    Rodney
     
  20. phdeez

    phdeez Addicted to LI Member

    ncid is great. hrana, if you get it working, please lmk as I'd like to get my Tivo/ncid working again, and this would provide adequate motivation! :)

    rhester72: When you get an opportunity, could you put up a working version of a tftp *server* like atftp? I was looking for one in this post.

    I'd really appreciate it! Any other information I can provide to help?
     
  21. rhester72

    rhester72 Network Guru Member

    I'll definitely take a look after I have the basic web and ftp services restored.

    Rodney
     
  22. rhester72

    rhester72 Network Guru Member

    Web and FTP service restored.

    The curious among you may wonder what happened for nearly a week - well, suffice it to say the wife saw the power bill this month, took one look at the server farm, and said "it's got to go".

    We compromised - now it just sleeps a lot. ;) But since it was where my compiler machine was located, all of my storage, etc., it meant that any time the server platform was asleep, you couldn't reach anything - the back-end Apache web servers were unresponsive, the CIFS mounts disappeared, and the site was pretty much offline. Some of you may have seen the Pound "maintenance" pages, which really just meant that the back-end web server was unreachable (because it was effectively turned off).

    What to do? Well, it seemed like a pretty interesting challenge to me, which led to...

    - an rsync job (and binary) to mirror the real Tomato binary content onto a USB drive connected to the RT-N16
    - discovering that the "good" compile of lighttpd crashes on the first valid access
    - reading about the Hiawatha web server and realizing how ideal it is for an embedded platform (no plugins/modules needed!)
    - getting Hiawatha all compiled and configured for Tomato (including automatic log rotation courtesy of the logrotate binary)
    - figuring I may as well take it to the next level and getting PHP5 compiled and configured for Tomato as well, linked via FastCGI to Hiawatha (WARNING: This is *NOT* for the feint-of-heart or small-of-router. You _MUST_ have at least 32MB of RAM in your router before you even _THINK_ about this! I'm not kidding! But the RT-N16 has so much RAM it seems a shame to let it go to waste...)

    Want to see PHP5 on Tomato for yourself? http://ado.blogsite.org/phpinfo.php proves it works!

    The practical upshot of all this is that all my critical web and ftp services are back, and no longer have any external dependency - as long as my router is powered up and functioning, you can get what you need. :)

    Am I insane enough to go all the way and try to create a LAMP-like environment on Tomato? All that's missing at this point is MySQL...

    Rodney
     
  23. rhester72

    rhester72 Network Guru Member

    Put a very alpha compile of atftp(d) on the site (compiled from Debian source, which I'm not too thrilled about) that seems to pass the smoke test but is only available as a dynamic binary (having trouble getting static to compile properly). One caveat is that the default group in atftpd (which lacks libwrap, not sure if that's important to you) is nogroup, but it's nobody on Tomato - flag "--user nobody.nobody" seemed to get the job done and I was able to successfully upload via its own client (which currently lacks readline support). I also didn't bother enabling mtftp since multicasting never really caught on with this.

    Also please be aware that you're talking about _very_ old code, and it's likely chock-full o' buffer overrun exploit opportunities, etc. - it appears to be roughly 2004 vintage. Caveat emptor.

    Feedback welcomed.

    Rodney
     
  24. phdeez

    phdeez Addicted to LI Member

    rhester72, Thanks so much for putting this together! Do you suggest a different tftp server instead? I looked up libwrap, and from what it seems, it's like an access list function? If I'm just running this for internal access, will that be a problem? Also, regarding the buffer overrun issue, again if it's for internal network access only that won't be a problem, right? I'll report back how it works for me!

    No problem on multicast tftp- I won't need that portion at all.

    Also, that's a very interesting read regarding your server farm! I had no idea that the RT-N16 was so powerful! You sir are a guru!
     
  25. rhester72

    rhester72 Network Guru Member

    To be honest, I haven't looked for one in a long time.

    Briefly looking around my Ubuntu install, I noticed that the realistic choices appear to be tftpd (I'm assuming this is the baseline), atftpd (what we're discussing), and...dnsmasq! dnsmasq's is read-only, not sure if that suffices for your usage or not, but it is built in.

    Correct on all counts.

    I'd appreciate that. I'm going to take a look at "plain" tftpd as well, it will probably suit most usage patterns (much as your own) without a lot of overhead.

    It's basically a machine-in-a-box with 128MB of RAM and USB storage. If the CPU is fast enough for your needs (and good luck outrunning it with most SoHo-type applications!), and you can fit in the RAM (+swap), it's incredibly versatile - it's a pretty decent general-purpose Linux server for about US$110 street with wireless N. Can't beat that with a stick.

    Hardly - I just have some modest talent at making things work in ways they were not originally designed. ;) The vast majority of credit goes out to Jon (the original author of Tomato), Keith (who added OpenVPN), and Fedor (who created the infamous TeddyBear mod and has largely managed the recent spin-off of Tomato), among countless other contributors. I just play. :)

    Rodney

    UPDATE: Wow - busybox has tftpd too! (Not compiled into Tomato, but it's trivial to softlink to my full busybox binary and make it work...) Just tested it and it seems to work as advertised.
     
  26. phdeez

    phdeez Addicted to LI Member

    atftp worked right out of the box, but I did have to install "libuclibc++" which wasn't a problem with the ipkg from dd-wrt. After that, works like a champ! I did have to invoke it with "--daemon" which wasn't a big deal. So, to get 'my' setup work, I used the following command:

    Code:
    atftpd --daemon --user nobody.nobody --bind-address 192.168.0.1 /jffs/atftp/tftpboot/
     
  27. phdeez

    phdeez Addicted to LI Member

    Yeah, I found dnsmasq included a tftp server which would have worked for me, however the version of dnsmasq tomato uses does not include the tftp portion.
     
  28. rhester72

    rhester72 Network Guru Member

    Hrm...did I do something wrong with the first compile attempt? I just checked with ldd and I don't see any dependencies on that library.

    You did, however, cause me to re-audit all of the precompiled libraries on the site, and I did find several that were inadvertantly missing, including libstdc++, which has been corrected - all library dependencies for every binary in PRECOMPILED should now be found in PRECOMPILED/lib. This also caused me to clean up some dangling links that were a result of the switch to rsync.

    More to the point, I got atftp to compile cleanly/properly in all cases, including static binaries - which might have helped you before, I'm not sure. I also tracked down the "real" tftp(d) (nee tftp-hpa, maintained by the Linux kernel team) and a very recent addition to the mix, opentftp (featuring a multithreaded version). All have been added to the site in dynamic and static builds.

    For my dollar, I'd go with the tried-and-true tftp-hpa version (smaller, fewer external dependencies, but no built-in help! ;), but that's just me.

    Enjoy!

    Rodney
     
  29. Lassik

    Lassik Networkin' Nut Member

    I'll be the first to admit that I'm not the sharpest tool in the shed when it comes to Tomato and Linux in general.

    I've been looking for a good way to put MoBlock on my RT-N16 running TomatoUSB for awhile now. I just came across your thread and noticed that it was available.

    My only problem is now, I have no clue what I'm doing to put it on there. Is there a guide somewhere on how to do this? Do I just copy the files on to the router somewhere and set up some INIT scripts via the GUI?

    I apologize, I just really have no clue what i'm doing here. I just have a RT-N16 running TomatoUSB build 48 with no additional modifications. I do have a USB stick plugged in to it and mounted.

    I tried to read through this thread but unfortunately I'm a paint-by-numbers type of guy. Could someone lay it out for me please?
     
  30. rhester72

    rhester72 Network Guru Member

    A good day today. transmission and nmap. :)

    Rodney
     
  31. onehomelist

    onehomelist Addicted to LI Member

    memcached, I guess, is a nice piece of software.http://memcached.org/ I'm not quite sure whether you'll find it useful. Here is a game site which uses it http://www.pokemondeluge.com/ They get about 700 queries per second, and memcached handles it very efficiently. Perhaps you might find it useful on your web server.
     
  32. onehomelist

    onehomelist Addicted to LI Member

    I would like to run your apps during boot up, and also want to set a PATH variable so that I can invoke the apps in whichever directory i'm working in.

    As /opt/bin is already added to PATH I did the following
    Code:
    mkdir /jffs/opt
    mkdir /jffs/opt/bin
    mount -o bind /jffs/opt /opt
    And I placed your binaries in /jffs/opt/bin and I was able to invoke your apps from anywhere.

    I would like to sort out two more things:
    1. /jffs/opt should get mounted to /opt automatically at boot up.
    2. I want to run a script to start some of your apps at bootup.
    Here is an example script"

    Code:
    echo "4194304"> /proc/sys/net/core/rmem_max
    echo "4194304"> /proc/sys/net/core/rmem_default
    
    
    darkstat-faster -i br0 --chroot /home/root -l 192.168.1.0/255.255.255.0
    Any help is apreciated.
     
  33. rhester72

    rhester72 Network Guru Member

    Thanks for the reference. :) I'm not (currently) running a database server on the router, and I don't get anything approaching 700 hits/second, so it wouldn't be very useful here, but if there's ever any demand for it on Tomato...I might want to know what in the world they are doing with their router, because I want in. *laughs*

    Rodney
     
  34. rhester72

    rhester72 Network Guru Member

    First, I'd recommend not setting rmem_default like that - you don't want to invest 4MB of RAM for every IP connection right off the bat. rmem_max is the upper bound, and the buffers will grow to that limit if necessary, so it alone should be sufficient to make darkstat happy.

    That having been said, I'll describe the approach I'm using for starting this up (my way is actually considerably more complex, but I've stripped it down to the basics for what you're looking for).

    Init script:

    Code:
    echo 4194304 > /proc/sys/net/core/rmem_max
    
    t=0
    while [[ ! -d /jffs/opt && $t -lt 30 ]];do
     sleep 1
     t=$(($t+1))
    done
    
    if [ -d /jffs/opt ];then
     mount -o bind /jffs/opt /opt
    else
     logger -t /jffs -p err did not mount within $t seconds
    fi
    
    You want darkstat to restart any time the WAN restarts because br0 is torn down and rebuilt each time. Thus, in the WAN Up script:

    Code:
    t=0
    while [[ ! -d /opt/bin && $t -lt 30 ]];do
     sleep 1
     t=$(($t+1))
    done
    
    PIDFILE=/var/run/darkstat.pid
    if [ -f $PIDFILE ];then
     kill `cat $PIDFILE`
     sleep 1
    fi
    /opt/bin/darkstat-faster -i br0 --chroot /home/root -l 192.168.1.0/255.255.255.0 --pidfile $PIDFILE
    
    Let me know if some of this doesn't make sense.

    Rodney
     
  35. onehomelist

    onehomelist Addicted to LI Member

    Thanks rhester72. It worked like a charm.

    As you have been using pound as a reverse proxy, I have a small query to make.

    I run a Jboss Tomcat server in my LAN. I have to use the following address in my LAN to access pages from it

    http://192.168.2.5:8080/website

    I have done port forwarding on tomato, so from outside I need to use the following address:

    http://122.130.45.34:8080/website

    Is it possible to configure pound so as to make it possible to access the website just by using my external ip:

    http://122.130.45.34
     
  36. rhester72

    rhester72 Network Guru Member

    That won't really work, because JBoss is expecting (and producing) URLs on port 8080, but Pound is listening on 80. Pound can't rewrite URLs produced in HTML by JBoss to "override" the port (or URI).

    Rodney
     
  37. i1135t

    i1135t Network Guru Member

    Any idea why I get this error when trying to run Rhester's "openvpn" OR "openvpn-static" file?
    Code:
    Cannot open TUN/TAP dev /dev/net/tun: No such file or directory
    I'm sure I pointed all the files to their correct paths in the config... The reason is that I am trying to run more than two OpenVPN servers on Victek's firmware. I am not sure if he complied the necessary files for openvpn to create the TUN devices when initiating the OpenVPN servers. If I could get this working, it would open up the possibility for me creating multiple private VPN site to site connections for my family members. Any help would be appreciated. Thanks!
     
  38. rhester72

    rhester72 Network Guru Member

    Add this to the end of your openvpn startup line:

    --dev-node /dev/tun

    Rodney
     
  39. i1135t

    i1135t Network Guru Member

    I'm still getting the same error:
    Code:
    Aug 18 07:32:32 T1 daemon.notice openvpn[212]: OpenVPN 2.1.1 mipsel-linux [SSL] [LZO2] [EPOLL] built on Apr 13 2010
    Aug 18 07:32:32 T1 daemon.warn openvpn[212]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
    Aug 18 07:32:33 T1 daemon.notice openvpn[212]: Diffie-Hellman initialized with 1024 bit key
    Aug 18 07:32:33 T1 daemon.warn openvpn[212]: WARNING: file '/etc/openvpn/server1/server.key' is group or others accessible
    Aug 18 07:32:33 T1 daemon.warn openvpn[212]: WARNING: file '/etc/openvpn/server1/static.key' is group or others accessible
    Aug 18 07:32:33 T1 daemon.notice openvpn[212]: Control Channel Authentication: using '/etc/openvpn/server1/static.key' as a OpenVPN static key file
    Aug 18 07:32:33 T1 daemon.notice openvpn[212]: Outgoing Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
    Aug 18 07:32:33 T1 daemon.notice openvpn[212]: Incoming Control Channel Authentication: Using 160 bit message hash 'SHA1' for HMAC authentication
    Aug 18 07:32:33 T1 daemon.notice openvpn[212]: TLS-Auth MTU parms [ L:1560 D:168 EF:68 EB:0 ET:0 EL:0 ]
    Aug 18 07:32:33 T1 daemon.notice openvpn[212]: ROUTE default_gateway=72.x.x.x
    Aug 18 07:32:33 T1 daemon.warn openvpn[212]: Note: Cannot open TUN/TAP dev /dev/tun: No such file or directory (errno=2)
    Aug 18 07:32:33 T1 daemon.notice openvpn[212]: Note: Attempting fallback to kernel 2.2 TUN/TAP interface
    Aug 18 07:32:33 T1 daemon.err openvpn[212]: Cannot open TUN/TAP dev /dev/tun: No such file or directory (errno=2)
    Aug 18 07:32:33 T1 daemon.notice openvpn[212]: Exiting
    
     
  40. rhester72

    rhester72 Network Guru Member

    If you aren't using the built-in OpenVPN GUI, you'll need to do a "modprobe tun" in the Init script as well.

    Rodney
     
  41. i1135t

    i1135t Network Guru Member

    Looks like there is no module compiled into the build to load:
    Code:
    # modprobe tun
    modprobe: module tun not found
    Is there a file where I can try to load it manually with insmod?
     
  42. rhester72

    rhester72 Network Guru Member

    Ah, sorry, I thought you were using the OpenVPN build.

    The K26 module can be found at:

    http://multics.dynalias.com/tomato/PRECOMPILED/lib/modules/2.6.22.19/kernel/drivers/net/tun.ko

    Use insmod (with the full path) to load it.

    Rodney

    UPDATE: I noticed you said you're running Victek's mod - I don't have a tun.ko module compiled for it. Hell, truth be told, I'm not even sure which kernel he's running. The one linked above will only work with TeddyBear's K26. It's possible to compile for TeddyBear's K24 (though I no longer do so, since I abandoned 2.4 long ago), but I expect that kernel version _does_ differ from Victek's, and thus will be useless as well. I don't know if anyone ever tried to compile modules for the Victek mod.
     
  43. i1135t

    i1135t Network Guru Member

    No, it doesn't work... :-(
    Code:
    # insmod /etc/tun.ko 
    insmod: unresolved symbol do_sync_read
    Thanks for pointing me in the right direction though. Does anyone have this module available for the 2.4 kernel for Tomato? This would help me out alot since Victek is MIA..
     
  44. rhester72

    rhester72 Network Guru Member

    Can you do "uname -a" and post the output?

    Rodney
     
  45. i1135t

    i1135t Network Guru Member

    Sure, here it is:
    Code:
    Linux T1 2.4.20 #1 Fri Jul 24 04:24:56 CEST 2009 mips GNU/Linux
     
  46. rhester72

    rhester72 Network Guru Member

    Ye Gods - I can't even get K24 to compile. :/

    Anyone out there using K24 with built-in OpenVPN (TeddyBear or TomatoVPN) and kernel 2.4.20 willing to share their tun.ko?

    Rodney
     
  47. itunali

    itunali Addicted to LI Member

    Hello,

    iftop does not work and it says "Error opening terminal: vt100".

    I just copied "PRECOMPILED-static/iftop" and I am using "Tomato Firmware v1.27vpn3.6.4b664ba6 VPN integration".

    Please be advised.

    # ./iftop -i br0
    interface: br0
    IP address is: 192.168.2.1
    MAC address is: 00:23:69:63:84:33
    Error opening terminal: vt100.
    # uname -a
    Linux nexrouter 2.4.20 #2 Sun Jan 31 21:40:53 CST 2010 mips GNU/Linux
     
  48. i1135t

    i1135t Network Guru Member

    Thanks, but I found a tun.o file from the other builds and was able to get it to load up fine. Thanks for all your help!
     
  49. ehunt123

    ehunt123 Networkin' Nut Member

    Can't tell you how much this helps for most people. Unfortunately, for years in the ddwrt/openwrt (bounced between them over the years) forums, the usual response to asking about how to cross compile, even if one had years of experience working with code/compiling on the cli, was met with the usual answers.
     
  50. Cefur

    Cefur Networkin' Nut Member

    How about "nfs-utils"? Is this possible?
    I know there are some ports at nslu2, but not for ddwrt (tomato).
    It would be nice to have another fast "transfer" option, since nfs is omitted from kernel.
     
  51. rhester72

    rhester72 Network Guru Member

    This is a client-side issue...it means your _local_ terminal doesn't support vt100 termcaps (which is very unusual - I hardcoded that one into the ncurses library because it is practically the defacto standard).

    What does "set | grep TERM" say on your terminal - and what terminal are you using?

    Rodney
     
  52. rhester72

    rhester72 Network Guru Member

    If you don't mind sending it my way, I'd be happy to put it on the site for others to use. Glad to hear you got everything going!

    Rodney
     
  53. rhester72

    rhester72 Network Guru Member

    Are you looking for a client or server?

    Client will be tough, since it also requires a portmap demon - tough to set up, not so tough to compile. Server is absolutely impossible without kernel support - though I agree, full NFS support (in the extras build perhaps?) would be very nice. I'm currently sharing out some of my Tomato router with my Linux VMs via CIFS, which is as ugly as ugly gets. :/

    Rodney
     
  54. Cefur

    Cefur Networkin' Nut Member

    Server ...
    Well if kernel support is a must ... I hope TB adds this feature in the future. I think it is worth to have it in the "extras" package.

    Yep, your solution is really ugly. :wink:
     
  55. i1135t

    i1135t Network Guru Member

    Sure thing, go here to download it:
    Code:
    http://www.mediafire.com/?buc7drkfnqc9792
     
  56. rhester72

    rhester72 Network Guru Member

    Thank you! May I also get the "ls -l" output of /lib/modules on your router? I just want to make sure I have the path correct.

    Rodney
     
  57. i1135t

    i1135t Network Guru Member

    Here you go:
    Code:
    # ls -l /lib/modules/
    drwxr-xr-x    3 root     root           39 Jul 23  2009 2.4.20
    
     
  58. rhester72

    rhester72 Network Guru Member

    Thanks! Mirrored to my web site as well.

    Rodney
     
  59. onehomelist

    onehomelist Addicted to LI Member

    I would love to have GNU nano for tomato.
     
  60. rhester72

    rhester72 Network Guru Member

    Ask, and...oh, you know the rest already. :)

    Rodney
     
  61. rhester72

    rhester72 Network Guru Member

    One of the very first requests I ever got was for Midnight Commander (mc) - which I worked on for about a day, got extremely frustrated with the maze of dependencies involving glib2, and left it as a battle to be fought another day.

    That day is today. It even works with a mouse using an xterm-based ssh client - how cool is that?

    Rodney
     
  62. onehomelist

    onehomelist Addicted to LI Member

    Rodney, your http app site is down. The DNS doesn't get resolved. FTP works.

    Thanks for nano. The statically linked version works fine. Finally an editor I like most.
     
  63. rhester72

    rhester72 Network Guru Member

    Hiawatha is back up - sometimes this stuff drives me nuts. Seems that anything that _writes_ to my USB hard drive will ultimately just keel over without explanation - hiawatha, tor, transmission, whatever. I've experimentally had tor writing to the ramdrive in /tmp for 3 days now without issue, so I'm increasingly sure that there's some sort of issue with USB writes...it would seem that both OpenWRT and DD-WRT had various issues with USB timeouts on writes at one point as well.

    I'm working on a longer-term solution, but it may take some time.

    Rodney
     
  64. Cefur

    Cefur Networkin' Nut Member

    One more question regarding NFS.
    I noticed that TB has compiled some "Optional kernel modules". Among them are nfs.ko and nfsd.ko! Would "loading" them (insmod) + some "magic" make NFS an option?
     
  65. rhester72

    rhester72 Network Guru Member

    A shot across the bow, and a brief story...

    First, the important part: If you're looking for anything off of my web site, it's probably a good idea to snag it within the next two weeks or so, because after that (and a final notice beforehand) it will be going down, most likely forever.

    The reason is because while I firmly believe that Tomato represents *the* best router OS available today, it unfortunately does not meet my needs in terms of application stability. I'm definitely not a "standard" use case, and while Tomato is _remarkably_ stable out of the box, self-compiled applications (in my case particularly - transmission, tor, and hiawatha in that order of increasing stability) crashing left and right does not make for a useful platform, even if I remain eternally in love with Tomato's AJAX bandwidth presentation and glorious UI, quality QoS, and overall stability/integration.

    I've done everything I know to do on my RT-N16 to identify the root cause of the application failures - multithreaded straces, constant upgrades to latest git builds, recompilation of the applications and libraries again and again, sourcing libraries and applications from multiple sources (including OpenWRT's packages), different USB storage, CIFS, attempts to produce valid coredumps, literally everything over a period of more than a month...but given that I need these services and I need them to run stably, and I've been unable to find any means of making that happen on Tomato K26, I've no choice but to explore other avenues.

    I've no love lost for DD-WRT and would consider that only as a last resort - I'll be starting with Oleg's modified firmware and setting it up to boot from my USB hard drive (you read that right - native booting/OS), and modifying it from there for my needs, so I'll probably end up with something that doesn't look like anything else out there. *laughs*

    The bad news is that, given such a jump, use of the Tomato SDK for compilation isn't likely to produce anything usable on both platforms, and there's no pragmatic reason on my part to support a different platform like Tomato "blind" when I've no means of testing (or even executing) the results, plus trying to maintain two separate SDKs.

    It's entirely possible that Oleg's firmware won't produce solid results for me either, at which point I may entertain DD-WRT out of desperation, unless OpenWRT finally comes to the RT-N16 (and I don't see that happening *any* time soon).

    I came to be a part of the Tomato community longer ago than I even realized, and I've truly enjoyed the amazing camaraderie that exists here between developers and users - I've certainly never before seen such a spirit of cooperation and goodwill in (F)OSS, and it's a welcome change.

    I don't mean for this to be a "tearful goodbye" or anything like that - unfortunately, this is nothing more than a strictly pragmatic decision to pursue a stable solution for my own needs, and unfortunately I've exhausted all avenues of making that possible with Tomato. I certainly don't intend to suggest Tomato is unstable (and anyone quoting me as such will face my wrath! ;), merely that it is not stable for _my peculiar usage patterns_, so please...no rumor-mongering. =)

    Thanks to everyone here that made my stay warm and welcome for so long, and my *explicit* thanks to teddy_bear for reviving what was slowly turning into a waning, stagnant project...the new life he breathed into Tomato did more for it than anything since Jon first created it from the ashes of HyperWRT.

    So long, and thanks for all the fish. :) I'll be sure to wave a big red flag a few days before I take the web and FTP offline to give anyone a last-minute opportunity to snag something they missed.

    All the best,

    Rodney
     
  66. mstombs

    mstombs Network Guru Member

    Wow, what a shock - if you can't get things stable can anyone? I guess the major problems are todo with the Broadcom binary sdk modules which lock the kernel version and make it hard for all the kernel sources to be brought up to date? Is it more stable if you don't use wireless? I agree there are many levels of stability, and it all depends on your usage patterns and expectations. I regularly have to kill a runaway "firefox" on my Ubuntu desktop, but that's more 'stable' than XP ever was on the same hardware, and the grub bootloader made the windows 7 installer crash horribly... I haven't knowingly had Tomato crash recently - but I have recently lost my dyndns account the 28 day update didn't!

    Can you advise on best way to leach your great build-scripts from your site for future use - attempting to take snapshot of your site would generate too much traffic I'm sure, and the original GPL sources should be available elsewhere.
     
  67. rhester72

    rhester72 Network Guru Member

    I believe the root cause is likely the kernel, yes, which is why I'm not too terribly confident I'll have better luck with Oleg, either - strangely enough, DD-WRT actually has the best shot (since OpenWRT is at least a year away from having anything workable, in my opinion, though they will hopefully finally achieve the independence of the Broadcom binaries that is sorely needed) since they benefit from direct access to uplevel binaries. I've seen no differences disabling wireless and/or QoS - which rather makes sense, because whatever's going wrong definitely appears to be on the boundary between kernel and userspace, outside of "normal" router functions. The only tenuous link I've found is that all of the unstable apps concerned thus far use OpenSSL - but I've also been very, very far down that road without success, and see the same result using OpenWRT's openssl libs coupled with their binaries (that are known to run completely stably in their native environment).

    I've jokingly entertained running watchdog scripts to periodically check to see if the apps have crashed and just respawn them, but a) that is particularly problematic with tor and b) it's just hacky and ugly to an extreme. An appliance OS is designed *not* to require such things by definition.

    Good question - I just created build_scripts.tar.gz in the root that is a snapshot of all my build scripts - that plus the contents of the PATCHES directory is all that's really needed. You're right, all of the sources I used are freely available (though a few can be challenging to find).

    I'm more than happy to answer any questions anyone may have about the build scripts (that sadly remain utterly undocumented) and try to help them come up to speed, and would even be willing to go so far as to create a complete 7zipped mirror of the entire site and have *ONE* person snag it from me to create a mirror site or the like if the community would find it useful. Whatever I can do (within reason) to help, I'll do.

    Rodney
     
  68. rhester72

    rhester72 Network Guru Member

    The entire site compressed to 358MB with 7-zip, if anyone is genuinely interested in mirroring/carrying the torch. It is *NOT* available for download, but I will gladly make it available to someone via non-public means.

    Rodney
     
  69. mstombs

    mstombs Network Guru Member

    I've grabbed the scripts because I know you compiled some stuff I totally failed with before! I don't know what half the tools you have are supposed to do so cannot consider taking on more, hope someone does though!
     
  70. onehomelist

    onehomelist Addicted to LI Member

    I visit your app site almost daily to find out how many great apps you've introduced to the tomato world. And I've also made many requests on this thread. I use not less than 6 of your apps daily. I'm hoping fo a miracle to happen which'll give you the tomato stabilty that you require.

    Many Thanks for your help.:clap:
     
  71. Jedis

    Jedis LI Guru Member

    *sniff* Your presence and work will be missed!

    I'm still running your adblocking script,that you posted when you first got here, on 5 routers at 5 different locations. Working great and I've never had any issue with it. Plan on using it until the WRT54G are ran into the ground or until struck by lightning. ;)
     
  72. onehomelist

    onehomelist Addicted to LI Member

    I tried to compile an app using using your scripts and I was not successful. Can you please post a brief howto for compiling a simple app. Thanks.
     
  73. rhester72

    rhester72 Network Guru Member

    I guess I need more than "not successful" to go on. :)

    What was the specific output you saw, and are you able to compile the firmware itself OK (which tests your toolchain)?

    Rodney
     
  74. onehomelist

    onehomelist Addicted to LI Member

    When I tried to compile the new release I found that my toolchain was at fault, probably that was the reason why I was not able to get an individual app compiled. I have posted the error below, is there any solution for it?

     
  75. rhester72

    rhester72 Network Guru Member

    The above suggests that the compiler isn't in your path - read the README included with the toolchain.

    However, that path should be auto-set by my include script when compiling utilities, so I suspect you're having a different issue there.

    Can you compile pixelserv? It's by far the simplest, but should shake out any issues.

    Rodney
     
  76. onehomelist

    onehomelist Addicted to LI Member

    I found out what went wrong. The toolchain doesn't work on ubuntu 10.04. I tried compiling it on ubuntu 9.04 and it worked successfully. Soon I'll be compiling some of your apps.
     
  77. rhester72

    rhester72 Network Guru Member

    Interesting. I've been using 10.04 for my builds since it was released, but I have read the reports of trouble people have had with it. I've had the occasional issue compiling the firmware, but they were resolved within git.

    Rodney
     
  78. onehomelist

    onehomelist Addicted to LI Member

    The code I have posted above was the error I got while compiling on Ubuntu 10.04. I tried on Ubuntu 10.04 desktop and also server (both amd64 build), and got the same error.
     
  79. rhester72

    rhester72 Network Guru Member

    The code you posted only indicated that you hadn't properly created the softlink to /opt/brcm per the README. :) The issues others have described with 10.04 are quite different and occur much later in the firmware build stages.

    No big deal, glad to hear you're making progress.

    Rodney
     
  80. itunali

    itunali Addicted to LI Member

    sorry for my noop question it worked when connect via ssh to tomato. I was connect with telnet before.

    Thank you
     
  81. rhester72

    rhester72 Network Guru Member

    One or two minor changes - the transmission "downgrade" and additions of aiccu and radvd being the most notable. (PLEASE don't ask for a tutorial on how to set up an IPv6 tunnel with subnetting on Tomato - I'm still trying to figure out how to do it!)

    Suffice it to say the site will be around a while longer...I've made excellent progress in at least diagnosing my stability issues, and at least one of them is confirmed *NOT* to be related to Tomato (or the Linux kernel it uses). Good news, more details as I have facts and not guesses.

    Rodney
     
  82. mstombs

    mstombs Network Guru Member

    Good news I hope - have you noticed that your site is now well indexed by Google?
     
  83. rhester72

    rhester72 Network Guru Member

    Actually, I hadn't. That's probably not a good thing, since it's not immediately obvious to most what it even is. Unless you see good reason not do, I'll throw up a robots.txt.

    Rodney
     
  84. onehomelist

    onehomelist Addicted to LI Member

    I have three vlans with different subnets in my network. I can access routers GUI on all the vlan, or any webserver that runs on the tomato router can be accessed on all the vlans. But a standalone http server can be accessed only on the vlan network it is in, and not on the other 2 vlans. I want to make an internal http server accessible on all the vlans(it runs apache tommcat). Can it be done?
     
  85. rhester72

    rhester72 Network Guru Member

    The VLANs are all joined at the router, which is why you are seeing that behavior. To actually route between the LANs will require them to either all be joined into br0 or to have static routes applied on the router.

    Rodney
     
  86. rhester72

    rhester72 Network Guru Member

    As you may have seen in my signature, there's been a minor change to the site - namely a new domain. The old domain will continue to function indefinitely, and the web site will automatically redirect you to the new URL.

    Oh, and one more thing (thank you, Steve Jobs) - both the web site and FTP server are now available via IPv6 as well. ;)

    Tomato makes it possible.

    Rodney

    P.S.: Sorry, the URL/domain changed again - should be quite permanent this time. My bad for not doing my homework first. Hopefully the AAAA records have (re)propagated by now for you IPv6 folk. Apologies!
     
  87. ehunt123

    ehunt123 Networkin' Nut Member

    Hi,

    Could you compile/add to your repo these two utilities?

    One is a c-based (with minimal dependencies) growl client. It creates a UDP datagram containing the GNTP protocol so not only will it be able to send notices to OSX systems but Windows as well. It also works across lans if you have the port forwarded or subnet setup.

    http://bitbucket.org/xnyhps/microgrowl

    Real basic but does lack some options. This is another client but does have deps:

    http://bitbucket.org/dgc/cgrowl

    It has a more complete implementation but requires iconv, which I am not sure if it is standard on Tomato, and assume is not worth the port.

    The local network side (and remote if you forward the udp/tcp port):

    http://github.com/mattn/gntp-send

    Lastly, the network side for Prowl users:

    http://github.com/rphillips/cprowl.git

    Only dependency is libcurl w/ssl.

    Thanks
     
  88. rhester72

    rhester72 Network Guru Member

    4K (dynamically) compiled. Not bad. :)

    Wasn't too terribly bad. Wish it wasn't dependent on iconv, but it is what it is.

    Done.

    Rodney
     
  89. Aiko

    Aiko Networkin' Nut Member

    Currently the site is offline.. I was thinking that UNNA -the Newton archive- started a bit like this.

    If it is going to be offline definitely, we can perhaps agree to upload the .zip of all files to an online file server, so the files are not lost.
     
  90. rhester72

    rhester72 Network Guru Member

    Aiko,

    I have no intentions of pulling the site down...in fact, I expect it to become considerably more active in the near future. I've also done a *LOT* of root-cause analysis on the problems (particularly with tor and transmission-daemon) I alluded to in a past post and determined that only one of them had anything to do with Tomato and was corrected in a subsequent build.

    Long story short, I'm currently suffering from something related to build 51 of TomatoUSB that I'm still trying to research, but it makes it difficult to do so during the day because one of the side-effects is that my VPN connectivity doesn't work.

    As soon as I can figure out what's going wrong, I'll correct it and the site will be back online. This is one of the prices to be paid for "live" testing. =)

    FYI, I made the offer some time ago to upload a complete snapshot of the site to anyone willing to host it long-term...and got absolutely no takers.

    Rodney
     
  91. Aiko

    Aiko Networkin' Nut Member

    Glad to read that it will not go down for good..

    well, I just read this thread today, and got the (old) news of it going down today as well, hence my answering a bit late.

    I'm thinking of the online storage sites or the space provided with my accounts. If needed I'd be glad to help.

    Thanks for keeping the files online.
     
  92. rhester72

    rhester72 Network Guru Member

    Site's back up.

    I'm contemplating ways of making accessible backups, more after I've had a chance to work on it a bit.

    Rodney
     
  93. onehomelist

    onehomelist Addicted to LI Member

    rhester72, your site is down. I get timeout on firefox.
     
  94. rhester72

    rhester72 Network Guru Member

    Ugh. freedns didn't update my records. Fortunately, it has a 60-second TTL.

    Correct IP should be 66.167.242.121, expect a DNS update Real Soon Now(TM).

    Rodney
     
  95. Amuro

    Amuro Addicted to LI Member

  96. rhester72

    rhester72 Network Guru Member

    Assuming you have /opt mounted, put the following in /opt/usr/lib:

    libz.so.1
    libstdc++.so.6

    Or, if you're not going to be running a lot of other precompiled tools, just pick up the copy from PRECOMPILED-static, which has no external dependencies.

    Rodney
     
  97. Cefur

    Cefur Networkin' Nut Member

    Nice to see, that you have not left Tomato.

    With build 51, USB camera is an viable option (with extra loaded .ko). So I tried to cross-compile mjpg-streamer.

    After seemingly successful compile (of executable and plugin libraries .so), the program just does not want to run properly. It terminates with "Segmentation fault" error. After some checking up, I noticed that this error "happens" on dlopen call (when a library is being "opened"). But here my limited knowledge ends.

    I am guessing a "proper" compile should be a walk in a park for you. So if/when you have time, please check it out.
     
  98. Amuro

    Amuro Addicted to LI Member

    There is no mediainfo in the PRECOMPILED-static
     
  99. rhester72

    rhester72 Network Guru Member

    You're absolutely right, my apologies. Still having issues getting this one to build properly as static. The required library dependencies for the dynamic version can be found in PRECOMPILED/lib, you can get a list via "ldd mediainfo" on the main binary.

    Rodney
     
  100. rhester72

    rhester72 Network Guru Member

    Compiled - you'll also want to get libjpeg.so.8 (from PRECOMPILED/lib). No static compile possible due to the plugins system used by mjpg-streamer.

    Sorry for it taking so long - libtorrent-rasterbar's been kicking my butt of late. That (plus the needed boost libraries) have been my worst compile nightmare to date. If/when I ever get it working, though, the resulting application it makes possible will (hopefully) make it all worth it. =)

    Let me know if you have any problems.

    Rodney
     

Share This Page