How to Change Your Wireless MAC Address

Learn how to change or spoof your MacBook's wireless MAC address. This recipe make use of on-demand event with Power Manager.

When your Mac connects to a wireless network, your Mac is identified by its MAC address. This address allows hotels and other wireless hotspot providers to identify and track your Mac.

If your Mac’s wireless MAC address changes, the hotspot provider will likely consider your Mac to be a new previously unseen device. Being able to do this is good for security and likely useful where Internet access is time limited per device.

This technique is often called spoofing your MAC address.

To see your current MAC wireless address, use the following command:

ifconfig en1 | grep ether

In this recipe, we will create an on-demand Power Manager event to randomly assign a new MAC address to your Mac. This change is temporary and reset when your Mac is next restarted.

Reassigning MAC On-Demand

  1. Launch Power Manager.

  2. Select Add… to create a new event. Screenshot of Power Manager on OS X

  3. Choose the Run a script on-demand task. Screenshot showing Schedule Assistant

  4. Continue to the Script step.

  5. Copy and paste in the following perl script into the Script to run field:

     # Disconnect from the network
     system('/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z');
     # Create a random ethernet address
     my @mac; for ($i=0;$i<6;$i++) {	@mac[$i]=int(rand(256)); }
     my $mac = sprintf("%02x:%02x:%02x:%02x:%02x:%02x\n",@mac);
     # Apply the random ethernet address
     `ifconfig en1 ether $mac`;
  6. Select Super User (root) in the Environment: pop-up. Screenshot of perl script in Schedule Assistant

  7. Continue through the Constraints step. Screenshot of Power Manager constraint options

  8. Continue to Why and name your new event. Screenshot of event name and notes step

  9. Continue to Confirm and Add your new event. Screenshot confirming event creation Screenshot showing newly created on-demand event

The new on-demand event is available immediately. You can trigger the event through the Power Manager status menu, or through the Power Manager application.

Screenshot showing event ready to trigger on OS X