Setting NetworkManager wifi.scan-rand-mac-address=no

Hi,

We would like to avoid random MAC scanning with out solution due to customer requirements (they do MAC filtering on some of their deployments).

Is there a way to set wifi.scan-rand-mac-address=no using nmcli or dbus interface?

(note that we’re aware it’s possible to disable it for a network profile, but we need this to work on the initial scan - before a profile is created)

Many thanks!

Hi, the MAC address is only being randomized during scans. When the device is connected to the network the real address will be used.
I could not find any API to change that behavior dynamically - looks like it can be only switched on and off permanently.

Hi Majorz - thank you for your help.

I am not looking to change it dynamically - but I also could not find a way to permanently configure NetworkManager to disable it as the containers have no access to the NetworkManager configuration files (which reside on the host os).

Any idea if there might still be a way to configure it?

There is a config.json option that can be used for permanently setting this: Configuration - Balena Documentation

Will that work for you?

Thank you. That’s great!