random findings by wt8008
RSS icon Home icon
  • Tomato CIFS Bandwidth Logs Backup

    Posted on August 4th, 2009 wt8008 No comments

    As seen from my previous post, I have moved to Tomato firmware for my router. A feature that caught my eye was the ability to save bandwidth logs to CIFS (Samba shares). My ISP does not have any monthly bandwidth limitations, but I know some others in my area does, and this feature would be a must have for them. By default the bandwidth history is saved in RAM, and if the power goes out, then all the logs will be lost.

    On my Linux server, I created a new user (adduser(1)) with a default shell of /bin/false (/etc/passwd), and also a corresponding samba user (smbpasswd(1)). I configured the Samba share for that user with

    [tomato]
    path = /home/tomato
    public = no
    writeable = yes
    also, the server's global setting requires a security level of user
    [global]
    ...
    security = user

    On the router in Administration->CIFS Client, enable cifs1, for the UNC enter in the IP address, and share name. Do not use the hostname of the system.

    \\192.168.1.5\shared_example

    also enter in the username and password of the samba account that was created above. Hit save to mount the share, and after the 10 second countdown, you’ll see the total size of the mount, and the free space left.

    Now to enable the remote log saving. In Administration->Bandwidth Monitoring, change the save location to CIFS. I used the Create New File for the first time running it, but I am not sure if that option is necessary. Hit Save, and go to your share and see the backup log. The monthly start date can also be adjusted, for those who need to monitor monthly usage based upon an arbitrary day.

    Reference: http://www.wi-fiplanet.com/tutorials/article.php/3794171

  • Tomato Firmware Hostname

    Posted on July 29th, 2009 wt8008 No comments

    I always wanted to access my router via its hostname instead of typing the router IP in. This works fine in Linux, but for some reason Windows resolves hostnames different. I checked in windows with nslookup, and it can resolve my router name, but in Firefox or IE it doesn’t work. I had the same problem when using dd-wrt.

    In the Basic->Identification section, I randomly added a domain name of home, and now windows can resolve the router hostname and router.home, also points to my router. For past routers I used, I typically leave this field empty, as the documentation says it is provided by my ISP. This solution doesn’t require massive editing of config files on the router or editing host files.

    The computers can resolve themselves just fine either via the router DNS, Samba, or Avahi. I am not sure which one is doing the work.