I'm having a problem on connecting to networks with spoofed MAC address.
First, when I was using Fedora 23, connecting to a network with a spoofed MAC worked perfectly. I could confirm it with "ip link"
And then I installed arch linux with KDE Plasma which uses NetworkManager 1.2.2-1 to deal with network connections.
In arch linux, I'm able to change the MAC address using any methods incluing macchanger, "ip link set..." or adding "MACAddressPolicy=random" to systemd .link file. Changing the address itself is not a problem.
But when I connect to any network, using plasma-nm gui, it does connect but with the original MAC address, not the spoofed one.
It seems that NM automatically 'set MAC address' to its original when it connects and 'resets' when it disconnects. Here's from journalctl | grep MAC:
fbi NetworkManager: <info> [1460000000.7700] device (wlp2s0): set MAC address to xx:xx:xx:xx:xx:xx <- hardware original MAC addr. fbi NetworkManager: <info> [1460000001.0714] device (wlp2s0): reset MAC address to 00:12:34:56:78:90 <- manually spoofed MAC addr.
What I tried: I edited NetworkManager.conf to add
[connection.no-cloned] ethernet.cloned-mac-address=leave wifi.cloned-mac-address=leave
But this doesn't change anything. Moving it under [connection] doesn't work neither. I deleted network profiles and rebooted everytime I tried something, to make sure they are effective.
What can I do to NM not to set the MAC address to its original? Is NM the problem? or KDE Plasma?
1. Using "cloned MAC address" function in NM works fine but its not my purpose.
2. I added "wifi.mac-address-randomization=2" in NetworkManager.conf at [connection] section to randomize my MAC address, and this makes NM can't even connect to any network. journalctl says:
fbi NetworkManager: <error> [1460000000.9586] device (wlp2s0): Activation: (wifi) couldn't build wireless configuration: 802-11-wireless: cannot enable mac-randomization due to missing supplicant support fbi NetworkManager: <info> [1460000000.9586] device (wlp2s0): state change: config -> failed (reason 'supplicant-config-failed') [50 120 9] fbi NetworkManager: <info> [1460000000.9600] manager: NetworkManager state is now DISCONNECTED fbi NetworkManager: <warn> [1460000000.9605] device (wlp2s0): Activation: failed for connection 'James_5627' fbi NetworkManager: <info> [1460000000.9630] device (wlp2s0): state change: failed -> disconnected (reason 'none') [120 30 0]
But my wpa_supplicant is version 2.5 which I think supports mac randomization. I don't know why these happen on arch linux.
Last edited by maymay (2016-09-14 13:07:31)
Downgrading NetworkManager from 1.2.2 to 1.0.8 "fixed" this problem. Plasma/KDE was not the culprit.
I noticed it by Fedora 24 showing the same symptom. (F24 has NM 1.2)
Now the question has been narrowed: How can I change the behavior of NM 1.2 that always sets MAC address to the original one? Which config file?
Some time ago I researched this issue and from what I found it seems that this is how Networkmanager works. I found no real solution, only workarounds like https://forums.kali.org/showthread.php? … ch-boot-up
I think that it makes sense to create a bug report for Networkmanager project.
Last edited by Abaddon (2016-06-27 10:15:01)
Gnome - The weakest link!
Linux, *not* GNU/Linux!
I found that some people are also experiencing same/similar thing.
It seems that the bugfix has been merged to NM. So when NM package in arch linux repository updates with this bugfix, I'll post in this thread if it solves the problem.
NM 1.4 fixed this problem by introducing "cloned-mac-address" variables.
NetworkManager.conf I'm using now:
... [connection] ethernet.cloned-mac-address=preserve wifi.cloned-mac-address=random ...
Using this config works well as intended. (I use a systemd service to change the ethernet MAC)
Actually It had some bugs with plasma-nm but it also got fixed with an update about a week ago.