Access Restriction Message

Discussion in 'Tomato Firmware' started by TwixKing, Aug 17, 2010.

  1. TwixKing

    TwixKing Addicted to LI Member


    When I block certain keywords (in the URL) to prevent people from downloading torrents and other stuff; is it possible to show a custom message, Instead of a blank page? Would be great to show a page that said that these actions are not allowed!

    Same idea:
    I live in a student house, and not everyone pays his bills; so I had an great idea to turn off access to all websites on certain times (based on MAC-adres) and to display a message that they schould pay :tongue: :biggrin:

    I hope it is possible with a small script, that doesn't kill the connection instandly when a keyword is found, but first sends a custom text and then kills the connection. (Does it work like that?)

    Tnx for helping me out!
    Tomato Firmware v1.25.8515 .2RAF ND
  2. rhester72

    rhester72 Network Guru Member

    You're looking for a captive portal - some work has been done on this with things like nodogsplash. Search for some older threads on the subject.

  3. TwixKing

    TwixKing Addicted to LI Member

    Tnx, you where right; there are some topics about captive portals, but I couldn't find even 1 topic where someone has got it working on tomato... Victec was working on this captive portal but it was never released I guess :(
  4. neilph

    neilph Networkin' Nut Member

    this is my problem too.. how can i make script for this? i want to do is, if the page is block it will direct to to server with html note something like this, CALL OR EMAIL ADMINISTRATOR FOR ACCESS. or ill make jpg image that path to our server.

    so the user know they are not allowed to veiw the site. thanks in advance..
  5. neilph

    neilph Networkin' Nut Member

    or something like this

  6. Toastman

    Toastman Super Moderator Staff Member Member

    The source code for Victek's nocatsplash version is at
    It's all there but had a teensy problem. When the "Accept" button was pressed after viewing the splash page, it didn't forward you back to the internet (which should be done with iptables). Maybe someone can see if they can fix it?

    Alternatively, if access restrictions page could forward blocked users to a page such as you suggest, that would be useful. There used to be a script on here somewhere that did redirect IP's or MAC's to "" as a joke. Looks like that could be a starter, anyone remember it? The search facility here doesn't seem to be working.
  7. neilph

    neilph Networkin' Nut Member

  8. mikester

    mikester Network Guru Member

    You won't be able to achieve this with scripts and standard firmware - you will need to modify the firmware to run a second httpd to handle port 80 redirect messages. The access restrictions just drop the connections. You could try running squid on another machine...probably be easier just to run something like ipcop on an old PC as your firewall instead.
  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