In macOS Sierra, for some reasons, I would like to change my MAC address and I would like that this change survive a reboot.
How can I do this?
brew install spoof-mac
You can also install SpoofMAC with
pip, or directly with:
git clone git://github.com/feross/SpoofMAC.git cd SpoofMAC python setup.py install
Add a local.macspoof.plist file in /Library/LaunchDaemons:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>MacSpoof</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/spoof-mac.py</string> <string>set</string> <string>ca:fe:ca:fe:ca:fe</string> <string>en4</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist>
Adapt the interface name and address to your need then reboot.
Then load the launch daemon:
sudo launchctl load /Library/LaunchDaemons/local.macspoof.plist
P.S.: There is a similar question Change MAC address in OS X Yosemite but the question is not about permanent change and is only for Yosemite.
MAC address is always fixed based on the hardware NIC interface. You can spoof the Mac address but it wouldn't be ensured that it will remain spoofed with latest software updates etc.