Keeping mac address for a single network while using disposable sys-net in 4.1

Hi,

First of all thanks for this great project, I really enjoy using Qubes.

I am using a disposable sys-net (Fedora-39) on Qubes 4.1, when I am in my home network I pass the command qvm-run --pass-io sys-net -- nmcli device wifi connect <SSID> password <PASS> to connect. The problem is that it always creates a new random mac address. Even though I like this feature when I am connecting to networks that outside of my home, I don’t want to have a random mac address everytime I connect to my router. Is there way to pass a made up mac address to nmcli similar to this command: qvm-run --pass-io sys-net -- nmcli device wifi connect <SSID> password <PASS> mac-address <MAC-ADDRESS> or do I need to switch to a non-disposable sys-net?

qvm-run --pass-io sys-net -- nmcli connection modify --temporary <connection_name> 802-11-wireless.cloned-mac-address <desired_mac_address>
qvm-run --pass-io sys-net -- nmcli connection up <connection_name>

To learn the current MAC address used to connect to your router:

qvm-run --pass-io sys-net -- nmcli connection show <connection_name> | grep -i 'mac-address'

p.s.: Disclaimer: Fixed mac addresses for WiFi connections is a security hazard.

1 Like