Skip to content

Commit

Permalink
update mac addres randomization
Browse files Browse the repository at this point in the history
  • Loading branch information
kimg45 committed Sep 17, 2024
1 parent 309284a commit 89db7b4
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions docs/os/macos-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,19 +131,11 @@ On older Intel-based Mac computers, FileVault is the only form of disk encryptio

### MAC Address Randomization

macOS uses a randomized MAC address when performing Wi-Fi scans while disconnected from a network. However, when you connect to a preferred Wi-Fi network, the MAC address used is never randomized. Full MAC address randomization is an advanced topic, and most people don't need to worry about performing the following steps.
macOS uses a randomized MAC address when performing Wi-Fi scans while disconnected from a network.

Unlike iOS, macOS doesn't give you an option to randomize your MAC address in the settings, so if you wish to change this identifier, you'll need to do it with a command or a script. To set a random MAC address, first disconnect from the network if you're already connected, then open **Terminal** and enter this command to randomize your MAC address:
You can set your MAC address to be randomized per network and rotate occasionally to prevent tracking between networks and on the same network over time.

``` zsh
openssl rand -hex 6 | sed 's/^\(.\{1\}\)./\12/; s/\(..\)/\1:/g; s/.$//' | xargs sudo ifconfig en0 ether
```

`en0` is the name of the interface you're changing the MAC address for. This might not be the right one on every Mac, so to check you can hold the option key and click the Wi-Fi symbol at the top right of your screen. "Interface name" should be displayed at the top of the dropdown menu.

This command sets your MAC address to a randomized, "locally administered" address, matching the behavior of iOS, Windows, and Android's MAC address randomization features. This means that every character in the MAC address is fully randomized except the second character, which denotes the MAC address as *locally administered* and not in conflict with any actual hardware. This method is most compatible with modern networks. An alternative method is to set the first six characters of the MAC address to one of Apple's existing *Organizational Unique Identifiers*, which we'll leave as an exercise to the reader. That method is more likely to conflict with some networks, but may be less noticeable. Given the prevalence of randomized, locally administered MAC addresses in other modern operating systems, we don't think either method has significant privacy advantages over the other.

When you connect to the network again, you'll connect with a random MAC address. This will be reset on reboot.
Go to **System Settings** > **Network** > **Wi-Fi** > **Details** and set **Private Wi-FI address to either **Fixed** if you want a fixed random address for each network or **Rotating** if you want it to change over time.

Your MAC address is not the only unique information about your device which is broadcast on the network, your hostname is another piece of information which could uniquely identify you. You may wish to set your hostname to something generic like "MacBook Air", "Laptop", "John's MacBook Pro", or "iPhone" in **System Settings** > **General** > **Sharing**. Some [privacy scripts](https://github.com/sunknudsen/privacy-guides/tree/master/how-to-spoof-mac-address-and-hostname-automatically-at-boot-on-macos#guide) allow you to easily generate hostnames with random names.

Expand Down

0 comments on commit 89db7b4

Please sign in to comment.