This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| device_filtering [2023/05/24 21:20] – [iptables] -formatting, syntax corrections hogwild | device_filtering [2025/03/03 18:09] (current) – [Notes] -condense hogwild | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Block devices via script/scheduler  | + | ====== Block devices via script/Scheduler  | 
| - | The easiest way to filter WiFi devices is to use the [[basic-wfilter|Wireless Filter]] menu. However, there are times when you want to block specific devices via a script. This is particularly  | + | The easiest way to filter WiFi devices is to use the [[basic-wfilter|Wireless Filter]] menu. However, there are times you want to block specific devices via a script. This is especially  | 
| - |    | + | \\ | 
| - |   * For a routed environment (single router), you will use // | + | |
| + |    | ||
| \\ | \\ | ||
| - | Given a MAC address you want to control, such as: '' | + |   * For a routed environment (single router), you must use // | 
| + | \\ | ||
| - | ===== ebtables ===== | + | Given a MAC address you wish to control, such as: " | 
| + | |||
| + | |||
| + | ===== ebtables  | ||
| # Block\\  | # Block\\  | ||
| Line 23: | Line 28: | ||
| # Flush (unblock all the defined references at once)\\  | # Flush (unblock all the defined references at once)\\  | ||
| - | NOTE: you might have additional ebtables in your system so be very careful about flushing the full ebtable. | + | NOTE: There might be additional ebtables in your system so **be careful** about flushing the full ebtable. | 
| ===== iptables ===== | ===== iptables ===== | ||
| - | # Block Internet access (or any intra-vlan)\\  | + | # Block Internet access (or any intra-vlan):\\  ''/ | 
| \\ | \\ | ||
| - | # Block any network activity,  | + | # Block any network activity,  | 
| \\ | \\ | ||
| - | # Unblock  | + | # Unblock  | 
| \\ | \\ | ||
| - | # Flush\\   | + | # Flush\\  | 
| \\ | \\ | ||
| - | These days, blocking MAC addresses can  be tedious task. Many client devices use a MAC randomization function. MAC addresses can " | + | \\ | 
| - | For dealing with this, one alternative  | + | These days, many devices use MAC randomization which can make blocking MAC addresses tedious. MAC addresses can " | 
| + | |||
| + | To help manage  | ||
| \\ | \\ | ||
| Line 52: | Line 59: | ||
| For example:\\ | For example:\\ | ||
| - | # Block\\  | + | # Block:\\  '' | 
| \\ | \\ | ||
| - | # Unblock\\  | + | # Unblock:\\  '' | 
| \\ | \\ | ||
| - | Still, the hostname is resolved into an IP address by the kernel. A device with randomized MAC address will obtain a new IP when reconnecting. This will probably function well until the user decides to restart the device or even disconnect/ | ||
| - | You could as a paranoia approach  | + | ===== Notes ===== | 
| + | |||
| + | The kernel still resolves the hostname to an IP address. A device with randomized MAC address will obtain  | ||
| + | |||
| + | If you're security conscious, you could trigger a "service wireless restart"  | ||
| + | |||
| + | For WiFi devices, perhaps  | ||
| + | |||
| + | \\ | ||