UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. nielsbasjes
    3. Posts
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 7
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Enabling MAC randomization

      @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.

      posted in Support
      nielsbasjesN
      nielsbasjes
    • RE: Enabling MAC randomization

      @gpatel-fr The tests I did were in a residential setting with the Wifi SSIDs of serveral neighbors showing up.

      posted in Support
      nielsbasjesN
      nielsbasjes
    • 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.

      posted in Support
      nielsbasjesN
      nielsbasjes
    • 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.conf with

      [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 works in 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.conf to /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.conf with
      [device]
      wifi.scan-rand-mac-address=yes
      
      [connection]
      wifi.cloned-mac-address=random
      
      • Ran commands
        • systemctl daemon-reload
        • systemctl 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.
      posted in Support
      nielsbasjesN
      nielsbasjes
    • 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?

      posted in Support
      nielsbasjesN
      nielsbasjes
    • 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.

      posted in Support
      nielsbasjesN
      nielsbasjes
    • 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=random
      

      What I found on my phone is that apparently the /etc/NetworkManager.conf and /etc/NetworkManager/conf.d are all on a readonly file system.
      The /etc/NetworkManager/system-connections is 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.d directory in a writable location (next to the place where the /etc/NetworkManager/system-connections is 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?

      posted in Support
      nielsbasjesN
      nielsbasjes