====== Wireless MAC Address filtering via script/scheduler ======
The easiest way to perform Wireless MAC address filtering is to use the controls in FreshTomato's [[basic-wfilter|Wireless Filter]] menu. However, there are occasions when you might prefer/need to block MAC addresses in a script.
There are two main advantages to using a script. First, entering all the data for a large number of network devices into the Wireless Filter menu would be tedious and time-consuming.
A scripted solution can make it easier to manage a large number of network devices. Second, a script more easily allows you to schedule filtering on or off, as needed.
\\ \\ For example, given a MAC address whose access you wish to control:
aa:bb:cc:dd:ee:ff
\\
You could perform the following functions on it:
\\
* Block\\
/usr/sbin/ebtables -A FORWARD -d aa:bb:cc:dd:ee:ff -j DROP
\\
* Unblock\\
/usr/sbin/ebtables -D FORWARD -d aa:bb:cc:dd:ee:ff -j DROP
\\
* Or even…Flush (unblock all the defined references at once)\\
/usr/sbin/ebtables -F
\\
\\