OpenWrt Forum Archive

Topic: Block MAC address via LuCI?

The content of this topic has been archived on 8 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi, total noob here.

I was wondering if there was an easy way to block a MAC address via the web interface? I've been looking around LuCI, but I'm a little lost.  If at all possible, I'd like to be able to toggle this rule on or off as well. Console commands would be appreciated too, of course, but I'm somewhat unfamiliar with them.

I'm running Attitude Adjustment 12.09 on a TP-Link TL-WDR4300, if that's relevant.

(Last edited by onlooker on 25 May 2013, 03:21)

Network->Wifi->Edit Network->Interface configuration->MAC Filter->Allow All Except Listed
I hope this help you

Thanks for the quick reply! I'm an idiot for not mentioning this earlier, but I'd actually need this for wired connections. Is there a MAC filter option for those, too?

So you should use a Firewall rule, some like this using /etc/config/firewall:

config rule
        option src              lan
        option dest             wan
        option src_mac          00:00:00:00:00:00
        option target           REJECT

where 00:00:00:00:00:00 is the mac address that you want to block.

Using Web interface is Firewall->Traffic Rules->Open Ports on Router->Put a name for the rule then "Add" and finally fill in the rest.

It worked like a charm. Thank you! smile

The discussion might have continued from here.