Changing a MAC Address on Each Platform, and the Risks

Wi-Fi privacy

A MAC address is burned into the adapter at manufacture, but drivers accept a software-supplied value, so it can be changed on every mainstream platform. Legitimate reasons include reusing an address when replacing failed hardware so DHCP reservations keep working, testing network access policy, and working around bad designs that treat a MAC as a sole credential.

Three things to know first

Use a locally administered address. Set the second least significant bit of the first byte, which means the second hex character should be 2, 6, A or E. Your address then cannot collide with any vendor's globally unique allocation and will not pollute anyone's asset identification. The reasoning is in reading the first byte of a MAC address.

Do not copy the address of a device that is online. Two identical MACs in one broadcast domain cause an address conflict, switch entries flip back and forth, and both parties lose connectivity intermittently.

Expect to re-acquire an IP. DHCP keys leases on the MAC, so a new address makes you a new client. Details in how DHCP uses MAC addresses.

Linux

Temporary, lost on reboot:

sudo ip link set dev eth0 down
sudo ip link set dev eth0 address 02:1a:2b:3c:4d:5e
sudo ip link set dev eth0 up

Persisting it through NetworkManager is more reliable:

nmcli connection modify "Wired connection 1" 802-3-ethernet.cloned-mac-address 02:1a:2b:3c:4d:5e
nmcli connection up "Wired connection 1"

NetworkManager also accepts the keywords random and stable, meaning random per connection and stable per network respectively. To restore the factory address, set the property to permanent.

To see the real hardware address:

ethtool -P eth0

macOS

sudo ifconfig en0 ether 02:1a:2b:3c:4d:5e

Wireless interfaces usually need to disassociate first:

sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z
sudo ifconfig en0 ether 02:1a:2b:3c:4d:5e

Changes on macOS never survive a reboot and there is no official way to persist them. Recent major releases have tightened restrictions on wireless adapters, and on some models the change simply fails.

Windows

The graphical route is the most dependable: Device Manager, select the adapter, Properties, the Advanced tab, look for a "Network Address" entry, and enter twelve hex digits with no separators.

From the command line:

Get-NetAdapter | Select-Object Name, MacAddress, InterfaceDescription
Set-NetAdapterAdvancedProperty -Name "Ethernet" -RegistryKeyword "NetworkAddress" -RegistryValue "021A2B3C4D5E"
Restart-NetAdapter -Name "Ethernet"

Whether it works depends on the driver. Some adapters do not expose the NetworkAddress property at all, and then no method will help. Intel wired adapters generally support it; some inexpensive USB adapters do not.

Risks and compliance

Terms of service. Changing a MAC to get around time limits or billing on public WiFi normally breaches the terms explicitly, and in some jurisdictions may be unlawful.

Disrupting operations. Changing MACs casually on a corporate network interferes with asset inventory, access control and troubleshooting, and may trip port security into shutting the port down.

It does not make you anonymous. A MAC change affects only the local broadcast domain. It does nothing about your public IP, browser fingerprint or logged-in accounts. Treating it as a privacy tool is a misunderstanding. The real privacy mechanism on mobile devices is the built-in address randomisation, which is both more thorough and less disruptive to network operations.

If all you want is to know which vendor an address belongs to, nothing needs changing. Just enter it on the lookup page.

Related Articles
About the Author · Kai

7n4.cn author focused on network operations, including switches, access points, and wireless controllers. The articles follow practical checks that readers can reproduce.

← Back to Blog