You are not logged in.

#1 2024-01-28 18:22:35

860lacov
Member
Registered: 2020-05-02
Posts: 497

How to randomize MAC address for every wifi connection but one?

In my /etc/conf.d/wifi_rand_mac.conf
I have:

wifi.cloned-mac-address=random

I've changed my selected connection
from

[wifi]
mode=infrastructure
ssid=UPC504214925

to:

[wifi]
mode=infrastructure
ssid=UPC504214925
cloned-mac-address=stable

But after system restart new MAC was generated

Last edited by 860lacov (2024-01-28 18:22:49)

Offline

#2 2024-02-03 14:56:08

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,490

Re: How to randomize MAC address for every wifi connection but one?

I'm not sure where your "cloned-mac-address=stable" option comes from, but 'stable' is arbitrary to me when a random policy is setup in the first place. If you use randomization, you should simply try to assign the real static MAC for the individual connections where needed.
Also note the following caveat from man 5 systemd.link:
"MACAddress=
The interface MAC address to use. For this setting to take effect, MACAddressPolicy= must either be unset, empty, or "none". "

Offline

#3 2024-02-08 20:21:47

860lacov
Member
Registered: 2020-05-02
Posts: 497

Re: How to randomize MAC address for every wifi connection but one?

Strike0 wrote:

I'm not sure where your "cloned-mac-address=stable" option comes from, but 'stable' is arbitrary to me when a random policy is setup in the first place. If you use randomization, you should simply try to assign the real static MAC for the individual connections where needed.
Also note the following caveat from man 5 systemd.link:
"MACAddress=
The interface MAC address to use. For this setting to take effect, MACAddressPolicy= must either be unset, empty, or "none". "

I didn't notice that there is an answer. Sorry!
I took it from here:
Configuring MAC address randomization

And it started to work.
I thought that it should work immediately, so no new MAC after reboot.
It didn't and that's why I thought it is not working.

And after next boot it was ok. Same mac as before.

Offline

Board footer

Powered by FluxBB