Skip to content

Instantly share code, notes, and snippets.

@thesauri
Last active February 26, 2026 04:05
Show Gist options
  • Select an option

  • Save thesauri/022a307234eb3296fae6487cacc1fc1f to your computer and use it in GitHub Desktop.

Select an option

Save thesauri/022a307234eb3296fae6487cacc1fc1f to your computer and use it in GitHub Desktop.
Change MAC address macOS 15 Sequoia

Change MAC address in macOS Sequoia

I was unable to change the MAC address of the Wi-FI device on a MacBook Air (M1 2020) running macOS Sequoia due to the following error: ifconfig: ioctl (SIOCAIFADDR): Can't assign requested addres.

By running the commands in following sequence I was able to change it successfully:

  1. Turn WiFi device off
  2. Turn the WiFi device on again: networksetup -setairportpower en0 on
  3. Change the MAC: ifconfig en0 ether <mac-address-here>
  4. Run: networksetup -detectnewhardware
@jhgorse
Copy link

jhgorse commented Feb 26, 2026

On Sequoia 15.4.1 I get "ifconfig: ioctl (SIOCAIFADDR): Can't assign requested address" if I try to change the MAC address while the Wi-Fi is off. But it works fine immediately after Wi-Fi has been enabled, before it has connected to an AP.

I.e. this works on my machine:

networksetup -setairportpower en0 off ; networksetup -setairportpower en0 on ; sudo ifconfig en0 ether XX:XX:XX:XX:XX:XX

(I stumbled on this Gist when from a Google search. Maybe this will help future Googlers - or even myself the next time I need to spoof a MAC address.)

Good find.

What about a virtual interface in addition to the parent network interface? In BSD those appear on the network without the MAC Address of the parent interface. feth0 may be an option. My quick test did not route but I am invariably missing something simple.

feth0 <- bridge10 -> en5

sudo ifconfig en5 192.168.0.10 255.255.255.0
sudo ifconfig feth0 create
sudo ifconfig feth0 ether 00:1A:2B:3C:4D:5E
sudo ifconfig feth0 192.168.0.100 255.255.255.0
sudo ifconfig bridge10 create
sudo ifconfig bridge10 addm en5 addm feth0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment