7

I would like my MAC addresses on my Mac OS X (iMac) and iOS devices (iPhone, iPad) to be randomized on boot. I have no idea how to generate the random MAC, nor to insert it into the boot process. Any help would be greatly appreciated!

1
  • 3
    What are you attempting to achieve by this? Knowing your objectives would help in finding a workable solution. Sep 16, 2010 at 11:25

7 Answers 7

3

You can't. The Ethernet and AirPort (Wi-Fi) drivers in Mac OS X don't reliably support changing your MAC address. I suspect the same is true of iOS, although I haven't tried it on a jailbroken iOS device.

Was this about privacy, or something else?

1
  • I guess "each device will have 30 minutes free wifi"
    – celeron533
    Dec 17, 2014 at 2:48
3
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z
sudo ifconfig en1 ether 00:11:22:33:44:55
1

Besides questioning why, and thinking that this will be more work than will probably benefit you, realize that a truly random MAC will cause problems.

The main problem I see is grabbing by accident the same MAC as someone on the network you're on, or will later join. Also, part of the MAC is a hardware manufacturer identifier, so a truly 'random' MAC would possibly cause problems.

1
  • 3
    Given the number of possible MAC addresses (281 trillion) causing a collision seems fairly improbable.
    – Dracs
    Feb 26, 2012 at 5:29
0

To change the MAC address of a jailbroken iOS device (one-time, not quite on-every-boot):

  1. Generate a MAC address. openssl rand -hex 6 should work.

  2. Ensure that the MAC address is unicast and "locally administered", which means the second digit must be one of 2, 6, A or E (x2:xx:xx:xx:xx:xx). This will prevent weird things from happening.

  3. On a rooted iOS device, run:

    su -
    nvram wifiaddr=4a:1c:ff:c1:d0:c0
    
  4. Reboot the device.

  5. After reboot, my iOS device reported that the iTunes library was corrupted, and was unable to sync with iTunes. Remove these files, and the device should regenerate the iTunes library from the media on disk (please be careful):

    cd /var/mobile/Media/iTunes_Control/iTunes
    mv iTunesCDB iTunesCDB-backup
    mv iTunesControl iTunesControl-backup
    mv iTunesPrefs iTunesPrefs-backup
    
0

You can use WiFiSpoof for Mac, you can google it.

You can change randomize your MAC Adress on ever Boot and at Certain conditions like changing WIFi etc. For iOS I guess you mean jailbroken, there are some packages in Cydia but they are all for old iOS,

-1

Preface: This is not a complete answer to your question, but as it has not yet been mentioned I believe it may be a beneficial addition here.

Homebrew is a package manager for OSX/macOS (much like aptitude for Debian Linux). One of the many packages you can get through it is spoof-mac. You'll need to read the instructions on https://brew.sh for the installation process, but it's pretty easy.

Once homebrew is installed, you get get spoof-mac by typing (In the terminal) "brew install spoof-mac"

You can now easily randomize you mac address by typing "sudo spoof-mac randomize --local $$$" replacing $$$ with whatever your network interface is.

As I mentioned up front, this is only part of the answer, but as homebrew allows the easy install of thousands of linux programs this should still get you closer to your goal.

-2

Um, the mac address is the physical address of your network device. It is set by the manufacturer and cannot be changed. At least not with software. With some h/w hackery, you probably could.

1
  • 4
    Not true. Although you're correct that the MAC address was originally intended to be permanent, most modern network cards are more than capable of having their MAC address changed with software. See en.wikipedia.org/wiki/MAC_spoofing for some simple examples of how.
    – Scott
    Sep 16, 2010 at 9:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .