I’d like Linux Mint to randomize my MAC address on startup on all network interfaces (
wlp3s0), and notify me if one of them failed to change via a pop-up.
How would I go about doing this?
(I’m running Linux Mint 18.1 64-bit)
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
A more standard way to randomize MAC addresses is using
Following (roughly) the instructions of the ubuntu wiki: AnonymizingNetworkMACAddresses
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
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.
If you desire a completely random MAC address change the -e in the macchanger script to -r.