Internet filtering is done by modifying the firewall configuration file.
Configuration file/etc/config/firewall
1. White List of Macs
At the end of the configuration file, add the following:
Config rule
Option src LAN
Option Dest WAN
Option Src_mac 9c:d2:1e:f9:34:39
Option Target ACCEPT
Config rule
Option src LAN
Option Dest WAN
Option Src_mac 98:6C:F5:5B:11:BC
Option Target ACCEPT
Config rule
Option src LAN
Option Dest WAN
Option Target REJECT
The above rules are interpreted as: Allow two devices with MAC address 9c:d2:1e:f9:34:39, 98:6C:F5:5B:11:BC to surf the internet, other devices refuse to go to the outside network
Attention:
Config rule
Option src LAN
Option Dest WAN
Option Target REJECT
Deny all devices to the outside of the network of this rule to be put behind, firewall rules seem to have priority
After the configuration file has been modified successfully, restart the firewall
#/etc/init.d/firewall Restart
2. IP Whitelist
Principle Step Ibid.
Simply place the rule in the
Option Src_mac MAC address
Switch
Option SRC_IP The IP address you want to allow
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
OpenWrt to implement wireless internet whitelist