Managing MAC filter via script

Discussion in 'Tomato Firmware' started by quique, Jun 30, 2010.

  1. quique

    quique Networkin' Nut Member


    I am trying to block Internet access from a specific IP/MAC address between a specific times of the day. Obviously, this would be very easy using Access Restrictions, but my WRT54Gv2 does not handle the WAN connection (a separate ADSL router does). I could block wireless access using the built-in schedule for access restrictions, but it would block all other clients as well.

    The best solution I have thought of is using the MAC filter itself, since I don't typically use it. I figured I could put the address in the MAC list and enable/disable it on a schedule using the Scheduler (or a cru job).

    However, I cannot for the life of me actually enable the MAC filter via a script. The filter works appropriately when enabled via the web interface, but not via this attempt at a script:

    nvram set wl_macmode=deny
    nvram set wl0_macmode=deny
    wl macmode 1  
    ifconfig eth1 down  
    ifconfig eth1 up  
    I have tried several combinations through an ssh console all while pinging the computer on the MAC list to check whether the filter is active. So far I have not managed to enable the filter correctly.

    Will someone please point out the flaws or the missing commands? Thanks in advance.
  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