spoofing the mac address with NetworkManager

NetworkManager is based on a concept of connection profiles, sometimes referred to as connections only. These connection profiles contain a network configuration.
Essentially changing the way we used to think of network configuration.

After a lot google searches and dozens of trial and errors, here is how I eventually found out how to change the Mac Address in a persistent way, for each connection profile.

The folder /etc/sysconfig/network-scripts/ contains the connections configuration files, with a ifcfg- prefix
I have a cabled connection to an emc nas, that connection is called “Wired connection 1”, the config file is called ifcfg-Wired_connection_1

By default the configuration will contain the actual hardware address with a line like:

HWADDR=45:8B:E9:39:71:C3

Replace that line with MACADDR and the mac address you want to set.

MACADDR=00:00:00:00:00:02

NOTE: Leaving HWADDR and MACDDR together can give unexpected behavior according to the NetworkManager Reference manual

If you are changing a wireless connection, by default they get a randomized mac address for privacy reasons:
So if you want to use a fixed address remember to change the default behavior by setting it to never.

MAC_ADDRESS_RANDOMIZATION=never

Now, get a random address and spoof away:
https://www.miniwebtool.com/mac-address-generator/

Previous
Previous

Arnold 5 and Xgen – Bring back the uparamcoord and vparamcoord

Next
Next

Foundry Mari – A Workflow Journey