Mac filter on sta mode

hello,
I have a question it this is at all possible or not to do in /etc/config/wireless
I can set a macfilter to wireless networks on "ap" mode but I would like to have this filter as well on "sta" mode, like this

config wifi-iface 'wifinet2'
        option ssid '<SSID>'
        option device 'radio0'
        option mode 'sta'
        option key '<password>'
        option network 'wwan'
        option encryption 'psk2'
        option macfilter 'deny'
        list maclist '18:<MAC1>:13'
        list maclist '18:<MAC2>:13'
		list maclist '18:<MAC3>:13'
		list maclist '18:<MAC4>:13'
		list maclist '18:<MAC5>:13'

config wifi-iface 'wifinet3'
        option ssid '<SSID>'
        option device 'radio1'
        option mode 'sta'
        option key '<password>'
        option network 'wwan'
        option encryption 'psk2'
        option macfilter 'deny'
        list maclist '18:<MAC1>:13'
        list maclist '18:<MAC2>:13'
		list maclist '18:<MAC3>:13'
		list maclist '18:<MAC4>:13'
		list maclist '18:<MAC5>:13'

but when I try to do this the whole connection to the internet drops.
so something get's applied, but not what I want?
is it possible to create a mac filter here, so I can only connect to certain access points?

I think you're looking for option bssid:

4 Likes

Option bssid is a one-entry whitelist. It locks the STA to a single AP. If you don't set a bssid, it will connect to any AP matching the SSID, usually the strongest one. This is the only control built directly into wpa-supplicant itself.

You could use the travelmate package to set up multiple SSID / BSSID APs allowed to connect to. The first one in the list has priority. Internally travelmate works by having multiple STA wifi-ifaces defined but disabled, then scanning the band to decide which one to enable.

3 Likes

Hello,

thank you both,
after reading in on BSSID I think, this is indeed what I need.
for now 1 address will suffice.

Is that limitation something that's enforced by a specification, or just a software limitation in search of a patch set do you think?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.