I heard that it was quite easy to spoof a MAC address in terminal, and thought it would be interesting to try it out on my own network. After reading through a number of sites which listed commands for 10.4, I finally found a method that works in 10.6. This worked for both wifi and ethernet.

  • First disconnect from the network if you are already connected. For ethernet, this involves disconnecting the cable. For wifi, it may be a bit trickier if you have instructed your computer to remember your passwords, as it will keep reconnecting, and there is no disconnect button. You can't just turn the wifi off either, as ifconfig will return an error. There are two possible methods for disconnecting from a wifi network without turning it off – the Terminal way, and the non-Terminal way. The Terminal way is easiest, and I don't know why you'd use the other method, unless you really hate using terminal. (Which is pointless, because you need Terminal to do the next steps anyway...)
  • The Terminal method is to copy the following into terminal, press return, enter your password, and press return again:


  • The non terminal way to disconnect from a wifi network is to go to the wifi menu in the menu bar, and select "Join Other Network..." (This may seem counter intuitive,  but bear with me.) A dialogue box will appear asking you to enter a network name. Instead of following instructions, click the button in the lower left that says "Show Networks". This will display a dialogue box with all the networks available. Select the network that your computer keeps wanting to join, but type a random (wrong) password into the password box and press join. The computer will try to connect, but will be unable to. After a message appears informing you that your computer cannot connect, press cancel, and proceed to the next step. (If your computer reconnects to a different wifi network, repeat these steps with that wifi network, until it is not connected to any wifi network.
  • Now that you are disconnected from the network, open Terminal, and type the following command to find out what your current MAC address is:
    • For ethernet, type: ifconfig en0
    • For wifi, type: ifconfig en1
  • In both cases, the current MAC address will be found after the word "ether", and will look something like this: 00:11:22:33:44:55
    • MAC addresses are hexadecimal, so they can include letters from a to f
  • Record your current MAC address somewhere, in case you want to change it back.
  • Assuming you know what MAC address you want to spoof, type the following command, replacing 00:11:22:33:44:55 with the MAC address you plan to spoof.
    • For ethernet, type: sudo ifconfig en0 lladdr 00:11:22:33:44:55
    • For wifi, type: sudo ifconfig en1 lladdr 00:11:22:33:44:55
    • When you press Return, the computer will ask for your password. Enter your password, and press return. The MAC address should be changed. To confirm, type ifconfig en0 for ethernet, or ifconfig en1 for wifi.
  • Your computer should now be displaying a different MAC address. Note that the MAC address will reset to the original MAC address on restart.
If this didn't work, go back and make sure that you are disconnected from all networks. Ethernet cables should be completely unplugged, and wifi should be on, but not connected to anything.