I’m trying to do the mac randomization in sys-net for the wired connection. Unfortunately nothing seems to work. My sys-net is disposable and the template is Kicksecure-minimal. My wifi device isn’t connected in sys-net, only the ethernet adapter.
When I try to change the mac address manually via the gui it works perfectly.
The logs of sys-net show that the config files in /usr/lib/NetworkManager/conf.d/ , including 30-qubes.conf, 31-randomize-mac.conf, 80_ipv6-privacy.conf 80_randomize-mac.conf and no-mac-addr-change.conf are read but the file in /etc/NetworkManager/conf.d/ isn’t included.
The files in /usr/lib/NetworkManager/conf.d/ were left untouched except for 31-randomize.conf where I added the ethernet.cloned…=stable.
I’ve tried:
Adding /var/lib/NetworkManager/secret_key and /usr/lib/NetworkManager/conf.d/31-randomize-mac.conf to bind_dirs
Adding /etc/NetworkManager/conf.d/00-macrandomize.conf to bind_dirs
I added the things above to the template as well as dvm-template. Furthermore,
I’ve added /var/lib/NetworkManager/secret_key and /usr/lib/NetworkManager/conf.d/31-randomize-mac.conf to bind_dirs in sys-net.
My bind_dirs file /rw/config/qubes-bind-dirs.d/50_user.conf looks like this:
When you edit connection through NM applet then it’ll use the same nm-connection-editor so I don’t understand what do you mean.
And what’s in 00-macrandomize.conf that is not working? Maybe the options there are overwritten by the options from the NM connection config that is created by nm-connection-editor?
Yeah I didn’t wait long enough, nm-connection-editor was not starting so I thought it didn’t work.
It could be overwritten but I don’t really know how to check that. Neither before I use the applet or after the 00-macrandom.conf is used.
The logs in journalctl for the NetworkManager.service show that 00-macrandom.conf isn’t even read at the beginning, instead 31-macrandomize.conf which has nearly the same values as 00-macrandom.conf, is being used. 00-macrandom is in the dvm-template as well as the normal template but in sys-net under /etc/NetworkManager/conf.d/ is shows no files.
Your sys-net is a named disposable?
And you have the /etc/NetworkManager/conf.d/00-macrandom.conf file in the disposable template of sys-net but for some reason this file is missing in the sys-net itself?
I just checked it again and both the template of the disposable template and the disposable template itself have the 00-macrandomize.conf but the disposable sys-net doesnt have it.
I tried to see if its somehow hidden but when I type nano 00-macrandomize.conf in the cli it opens up and shows that it would be a new file. So maybe there is something wrong with the inheritance.
The first output was cannot access, no file or directory and the second is:
total 8
drwxr-xr-x 2 root root
drwxr-xr-x 6 root root
Here its written that qubes-bind-dirs.d has to be used and bind-dirs only when the template has no directory with the same name. Would my usage be wrong and bind-dirs instead of qubes-bind-dirs.d had to be used?
Unfortunately even with that neither nmcli connection show YourConnectionUUID | grep mac nor the NetworkManager.service logs show any changes in the mac address.
Now I’ve created in the disposable template the /rw/binds-dir/ directory, copied 00-macrandom.conf there, gave the rights to execute it, and added a /rw/binds-dir/50_user.conf there with binds+=( '/etc/NetworkManager/conf.d/00-macrandomize.conf' ) written there.
00-macrandom.conf is inside /rw/bind-dirs/etc/NetworkManager/conf.d/ the directory but not in /etc/NetworkManager/conf.d/ . I did the same to the template of the disp template.
Well, there is no 00-macrandomize.conf in disp template so obviously there wouldn’t be one in sys-net.
Create the file /rw/bind-dirs/etc/NetworkManager/conf.d/00-macrandomize.conf in your disp template.
But there is one actually. In the dvm template in /etc/NetworkManager/conf.d/ there is 00-macrandomize.conf as well as in /rw/bind-dirs/etc/NetworkManager/conf.d/