OpenWrt Forum Archive

Topic: Atheros mac filtering

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

Hi anyone!

Please help with organization of mac filtering on Kmz 7.09.
I cant find anything about it on Atheros architecture.

Broadcom have package wlc for it, but not in Atheros!
Mac filtering needed for defence from fool, anymore !
I know how it do via iptables, but may be it be like acl or black list or in broadcom !

// ed
// it planned use like WPA2+(PSK or EAP-TLS) + mac filter + hidden ssid

Please help!
With regards, Dmitry.

(Last edited by Gig_tmb on 27 Nov 2007, 18:01)

Now it would be cool if you find a way to configure MAC filtering thrue /etc/config/network. I think you have to patch /lib/wifi/madwifi.sh.

Once done, submit a working patch smile

(Last edited by forum2006 on 27 Nov 2007, 18:28)

The MAC filtering feature (configurable in /etc/config/network) has been added with [9624] to trunk.

forum2006 wrote:

The MAC filtering feature (configurable in /etc/config/network) has been added with [9624] to trunk.

i do it may be not so elegant, but it work too smile
whenewer thank you for it !

diff /sbin/wifi

78c78,85
<
---
>       config_get macmode "$device" macmode
>       config_get mac "$device" mac 2
>
>       /usr/sbin/iwpriv $ifname maccmd 3
>       /usr/sbin/iwpriv $ifname maccmd "$macmode"
>       /usr/sbin/iwpriv $ifname addmac "$mac"

& add in /etc/config/wireless

    ##############################################
    ## macmode [1-whitelist;2-blacklist]
    ## mac [xx:xx:xx:xx:xx:xx]
    option macmode 1
    option mac xx:xx:xx:xx:xx:xx

with my regards, Dmitry.

After 9 months .... many thanks to Gig_tmb and forum2006 wink

Tested on my Fonera smile

But please note that if you add

config_get maclist "$vif" maclist
                [ -n "$maclist" ] && {
                        # flush MAC list
                        iwpriv "$ifname" maccmd 3
                        for mac in $maclist; do
                                iwpriv "$ifname" addmac "$mac"
                        done
                }

                config_get macpolicy "$vif" macpolicy
                case "$macpolicy" in
                        allow)
                                iwpriv "$ifname" maccmd 1
                        ;;
                        deny)
                                iwpriv "$ifname" maccmd 2
                        ;;
                        *)
                                # default deny policy if mac list exists
                                [ -n "$maclist" ] && iwpriv "$ifname" maccmd 2
                        ;;
                esac

as decrived in https://dev.openwrt.org/changeset/9624

The config wireless is:

#      macpolicy allow or deny
#      maclist [xx:xx:xx:xx:xx:xx]

(Last edited by Crazy on 30 May 2008, 08:07)

whats the easiest way for me to go about adding mac filtering to my atheros based wgt634u running 7.09?
<-- noob

The discussion might have continued from here.