@gpatel-fr I wasn't clear. The SSIDs showed when wifi.scan-rand-mac-address was disabled and none (not even the current one) were shown when it was enabled.
Posts
-
RE: Enabling MAC randomization
-
RE: Enabling MAC randomization
@gpatel-fr The tests I did were in a residential setting with the Wifi SSIDs of serveral neighbors showing up.
-
RE: Enabling MAC randomization
@gpatel-fr Correct, the list in the config UI does not show any of the available networks. On the FP5 we have it seems to be directly related to the scan randomisation setting.
-
RE: Enabling MAC randomization
What we did:
To test
The
/run/is reset on every reboot so we first created/run/NetworkManager/conf.d/20-randomwifimacaddress.confwith[device] wifi.scan-rand-mac-address=yes [connection] wifi.cloned-mac-address=random- Restart NetworkManager:
systemctl restart NetworkManager
The observed effects:
- The MAC address was random everytime (as configured).
- The
wifi network scanning no longer worksin the config app.
Scanning from the command line does still work.nmcli radio wifi on && nmcli device wifi rescan && nmcli device wifi list && nmcli radio wifi off
I could really use some help on that one.
To make permanent
- Created
/userdata/system-data/etc/NetworkManager/conf.d/ - Copied the existing
/etc/NetworkManager/conf.d/default-wifi-powersave-on.confto/userdata/system-data/etc/NetworkManager/conf.d/. - Created
/userdata/system-data/tmp/ - Created the described
/userdata/system-data/etc/systemd/system/etc-NetworkManager-conf.d.mount
[Unit] Description=Mount unit for /etc/NetworkManager/conf.d DefaultDependencies=no Requires=system.slice dev-sda17.device -.mount Conflicts=umount.target Before=umount.target local-fs.target Before=network-pre.service Wants=network-pre.service [Mount] Where=/etc/NetworkManager/conf.d What=/userdata/system-data/etc/NetworkManager/conf.d Options=rw,relatime,upperdir=/userdata/system-data/etc/NetworkManager/conf.d,lowerdir=/etc/NetworkManager/conf.d,workdir=/userdata/system-data/tmp Type=overlay [Install] WantedBy=network.target- Created
/userdata/system-data/etc/NetworkManager/conf.d/20-randomwifimacaddress.confwith
[device] wifi.scan-rand-mac-address=yes [connection] wifi.cloned-mac-address=random- Ran commands
systemctl daemon-reloadsystemctl start etc-NetworkManager-conf.d.mount
- Verify it was correctly mounted and had the right files
- Ran commands
systemctl enable etc-NetworkManager-conf.d.mount
Summary so far
- MAC Randomization works
- Wifi network scanning in the config app no longer works (and it does work using nmcli). If we disable the scan mac randomization then the config app works again.
- Restart NetworkManager:
-
RE: Enabling MAC randomization
@uxes I'm going to try it this weekend. If it works, where can I find the issue tracker/git repo to submit a patch proposal?
-
RE: Enabling MAC randomization
@gpatel-fr I have not tried this idea. I realized this is such an "extreme" way of settings this (also looking at the other replies) that I asked here first.
My key question is : Is this the right direction or is there a simple, clean and reliable way of enabling MAC randomization.
-
Enabling MAC randomization
Hi,
I have installed Ubuntu Touch on a FairPhone 5.
I would like to configure MAC randomization on the WIFI connection.
I have not been able to find this as a setting in the config app.The normal way of doing this with the NetworkManager is by setting these kinds of properties in the config files
wifi.scan-rand-mac-address=yes wifi.cloned-mac-address=randomWhat I found on my phone is that apparently the
/etc/NetworkManager.confand/etc/NetworkManager/conf.dare all on a readonly file system.
The/etc/NetworkManager/system-connectionsis explicitly mounted on a special directory which is writable.So far I have only come up with these steps, but they seem to me like too much of a hack.
- Adding an extra
conf.ddirectory in a writable location (next to the place where the/etc/NetworkManager/system-connectionsis mounted) - Copy all files that are already in there to the new location
- Add an extra mount line in the
/etc/fstab - Mount it
- Add a new config with the above mentioned lines.
My question is simple: What is the proper way to enable MAC randomization on Ubuntu Touch? Or is the above mentioned way the best available solution?
- Adding an extra