Change or Spoof a MAC Address in Windows or OS X
Every NIC(Network Interface Card)has a unique MAC address (Media Access Control). This applies to all types of network cards, including Ethernet cards and WiFi cards. The MAC Address is a six-byte number or 12-digit hexadecimal number that is used to uniquely identify a host on a network.
An example of a MAC address is 1F-2E-3D-4C-5B-6A and it falls into the Layer 2 networking protocol of the OSI model. In today’s networks, ARP, or Address Resolution Protocol converts a MAC address to a Layer 3 protocol address, such as an IP address. A MAC address can also be called aPhysical Address. Read my post onhow to find your MAC addressif you don’t know it.
All MAC addresses are hard-coded into a network card and can never be changed. However, you canchange or spoof the MAC addressin the operating system itself using a few simple tricks.
So why would you want to change your MAC address? Well there are many reasons for this, mostly related to bypassing some kind of MAC address filter set on a modem, router or firewall. Changing the MAC Address can help you bypass certain network restrictions by emulating an unrestricted MAC Address or by spoofing a MAC address that is already authorized.
For example, a WiFi network may allow only authorized computers to connect to the network and filters out computers based on the MAC address. If you can sniff out a legitimate MAC address, you can then spoof your MAC address and gain access to the WiFi network.
Another example is if you have an ISP that allows only a certain number of computers to connect to the Internet from your home. If you have more computers that need to connect, you can spoof the MAC address of an authorized computer and connect from a different computer.
Change Windows MAC Address
You can change the MAC address for the network card in Windows pretty easily following the steps below.
Step 1: Click onStart, thenControl Panel, thenNetwork Connections, and right-click on the network connection you want to change the MAC address for and selectProperties. It will normally either beLocal Area ConnectionorWireless Network Connection.
If you are using Windows Vista, Windows 7 or higher, you have to go toControl Panel,thenNetwork and Internet,thenNetwork and Sharing Center,and then click onManage Network ConnectionsorChange adapter settings.
Then you can right-click on the adapter and chooseProperties.
Step 2: On theGeneralorNetworkingtab, click theConfigurebutton.
Step 3: Now click on theAdvancedtab and click on theLocally Administered Addressproperty or theNetwork Addressproperty.
By default, theNot Presentvalue is selected. Go ahead and click on theValueradio button and enter in a new MAC address. The MAC address is a combination of 6 pairs of numbers and characters, i.e. 40-A2-D9-82-9F-F2. You should enter the MAC address without the dashes.
You can go to the command prompt and type inIPCONFIG /ALLto check that the MAC address has been changed. Go ahead and restart the computer in order for the changes to take effect.
This is the simplest way to change your MAC address in Windows. You can also do so via the registry, but it’s much more technical and probably not required by most people.
Change OS X MAC Address
Changing the MAC address on OS X is definitely not as easy as it is on Windows. Firstly, you have to use Terminal (similar to command prompt in Windows) to actually change the MAC address.
Secondly, you need to manually figure out the technical name of the adapter before you can change the settings. I’ll explain everything below step by step, but it gets a bit complicated at times.
To start, let’s find out the current MAC address for your Mac. You can do this in one of two ways: via System Preferences or via Terminal. OpenSystem Preferences, click onNetworkand then click on theAdvancedbutton. Make sure to select the appropriate interface first (WiFi, Ethernet, etc) in the listbox on the left.
Click on theHardwaretab and you will see the first line isMAC Address. I thought you could simply chooseManuallyfrom theConfiguredropdown, but that doesn’t allow you to edit the MAC address.
In Terminal, you can get the MAC address by typing in the following command:
ifconfig en0 | grep ether
This will give you the MAC address for the en0 interface. Depending on how many interfaces you have on your computer, you might need to run this command several times adding 1 to the number each time. For example, I ran the following commands below until I reached an interface that didn’t exist.
Now you can simply compare the MAC addresses listed here with the one you saw via System Preferences. In my case, my WiFi MAC address off8:1e:df:d8:9d:8amatches withen1, so that is the interface I have to use for the next commands.
Before we change the MAC address, you can use a useful command in Terminal to generate a random MAC address if you need one.
openssl rand -hex 6 | sed ‘s/(..)/\1:/g; s/.$//’
Now that you have a new MAC address, you can change the current one using the following command below. Replace XX with the actual MAC address you want to use.
sudo ifconfig en0 ether xx:xx:xx:xx:xx:xx
In order to do this, you need to be logged in as an Administrator or you have to enable the root account in OS X. By default, root is disabled and it’s better to leave it disabled if you can. Just login as an admin and you should be able to run the command just fine. It will ask you for your password, though, before changing the MAC address.
Also, the address won’t change if you are still connected to a WiFi network. You need to first disconnect from any networks and then run the command. Surprisingly, disconnecting from a wireless network in OS X is not intuitive at all. You have to press and hold theOptionkey and then click on the WiFi icon to see the disconnect option.
So here is a rundown of all the commands I ran in order to get the current MAC address, generate a random one, update the MAC address and then verify to make sure it had actually changed.
As I mentioned earlier, this is definitely not as straightforward as the process is on Windows, but you should be able to do it if you simply copy and paste the commands above. If you have any questions, feel free to post a comment. Enjoy!
Founder of Help Desk Geek and managing editor. He began blogging in 2007 and quit his job in 2010 to blog full-time. He has over 15 years of industry experience in IT and holds several technical certifications.Read Aseem’s Full Bio
Welcome to Help Desk Geek- a blog full of tech tips from trusted tech experts. We have thousands of articles and guides to help you troubleshoot any issue. Our articles have been read over 150 million times since we launched in 2008.
HomeAbout UsEditorial StandardsContact UsTerms of Use
Copyright © 2008-2024 Help Desk Geek.com, LLC All Rights Reserved