Uma maneira mais padrão de randomizar endereços mac é usar macchanger
.
Seguindo as instruções do wiki do ubuntu: AnonymizingNetworkMACAddresses
Install MACCHANGER
The package macchanger is in the Networking (universe). Install it.
apt-get install macchanger
Create the Randomizer Trigger
Utilizing Network-Manager's methods to trigger events when a network interface changes state, place the macchanger script into
/etc/network/if-pre-up.d
.vi /etc/network/if-pre-up.d/macchanger
Don't change $IFACE. It is a reference provided by NetworkManager for the particular activated interface.
#!/bin/sh # Randomize the mac address for the given interface /usr/bin/macchanger -e "$IFACE"
Make it executable.
chmod +x /etc/network/if-pre-up.d/macchanger
Interface State Change
Now everytime any managed interface is activated, as it passes through the pre-up phase, the network MAC address will be randomized under the VENDOR id.
Fully Random
If you desire a completely random MAC address change the -e in the macchanger script to -r.