anonymous acces to custom web page on router

Discussion in 'Tomato Firmware' started by Mihail_, Sep 23, 2010.

  1. Mihail_

    Mihail_ Networkin' Nut Member

    hello everyone!
    I'm trying to make a custom web page on router which can show some information about traffic limit per hour (it is one of terms of usage in my internet contract) that my home users could see it on web page. I already have a script which can turn off internet when traffic limit exceeded, but i don't know how to show it on web page.
    So i have a few questions:

    1. here is a script to create custom web page
    echo -e "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0//EN'>" > /tmp/var/wwwext/cgi-bin/index.asp
    echo "<HTML>
    <HEAD>" >> /tmp/var/wwwext/cgi-bin/index.asp
    echo -e '<META http-equiv=Content-Type content="text/html; charset=utf-8">' >> /tmp/var/wwwext/cgi-bin/index.asp
    echo "</HEAD>
    hello world
    </HTML>" >> /tmp/var/wwwext/cgi-bin/index.asp
    cat /tmp/var/wwwext/cgi-bin/index.asp
    you can acces it on

    how to use system commands on it? for example print result of "ls"

    2. is that possible to acces this page from lan and wi-fi whith no login\password?

    thanks for help!
  2. teddy_bear

    teddy_bear Network Guru Member

    1. Instead of creating a static page, use CGI-script - you almost wrote it already ;). Remove output redirection from your script (">> /tmp/var/wwwext/cgi-bin/index.asp") so the "echo" commands will output to stdout, save the script to /tmp/var/wwwext/cgi-bin directory, and you will be able to access it as "<script_file_name>". You can use any system commands in your script (in fact, "echo" is one of them) - the output of the command will be displayed on the resulting web page.

    2. No. It's hardcoded in the Tomato web server that authentication is required to access any of the pages it serves.

    Your other option would be to install another web server from Optware - but it doesn't look like that's something you're interested in...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice