Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

chemistry76

macrumors member
Original poster
Jun 22, 2011
65
6
Is there a way to change the Mac address (wifi) on a 2018 MacBook Air running Mojave?

Googling around, and it seems that the old solution (High Sierra and older) no longer works, and the app WifiSpoof is broken in Mojave.

Has anyone found a solution?

Thanks.
 
Hi chemistry76,

I just checked the standard commandline method for changing the ethernet MAC address under Mojave 10.14.1 and it works fine without any problems.

For instance, using the Terminal, first save your original MAC address:

ORIGINALMAC=`ifconfig en0 | grep ether | awk '{print $2}'`
echo " MAC address: ${ORIGINALMAC}"


Then use openssl to generate a new random MAC address:

RANDOMMAC=`openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'`
echo " Random MAC address: ${RANDOMMAC}"


Then reset your ethernet en0 MAC address to the random one:

sudo ifconfig en0 ether `echo ${RANDOMMAC}`
sudo ifconfig en0 down
sudo ifconfig en0 up


Then check that the MAC address has changed:

ifconfig en0

Then reset the MAC address back to the original one:

sudo ifconfig en0 ether `echo ${ORIGINALMAC}`
sudo ifconfig en0 down
sudo ifconfig en0 up


And check that the MAC address is back to the original:

ifconfig en0

Worked for me ... hope it helps you. (Of course, you need Administrator privileges.)

I changed my ethernet MAC address instead of my WiFi MAC address because I didn't want to affect my WiFi connection to my router (since I only allow known MAC addresses to connect to my router). But the same should work for your WiFi network, you just have to figure out the name of your WiFi, for me it is "en1". If you execute the "ifconfig" command by itself, you then find the entry that has your proper inet address (the IP address listed in the Network Pane of System Preferences). If your WiFi is "en1" (like mine), you would then substitute "en1" for all instances of "en0" in the above commandlines.

So, to find your WiFi card:

ifconfig

Regards,
Solouki

P.S. Of course, this does not change the NVRAM parameter and thus is a temporary change of the MAC address.
 
Did you do this on a 2018 MacBook Air or MacBook Pro?

This is the response I get in terminal when I type in sudo ifconfig en0 ether xx:xx:xx:xx:xx:xx (I have a Mac address in mind)

sudo: ifcongig: command not found

This seems to be the problem with the new 2018 MacBooks.
 
  • Like
Reactions: adib
That command should be available in your OS, if you're in terminal, at a prompt, and you simply type: ifconfig

... you're saying the command isn't found? What if you type ls /sbin ? You should see a directory listing and ifconfig listed as one of the files[?]
 
That command should be available in your OS, if you're in terminal, at a prompt, and you simply type: ifconfig

... you're saying the command isn't found? What if you type ls /sbin ? You should see a directory listing and ifconfig listed as one of the files[?]

ifconfig is listed, and if I just type ifconfig it displays a plethora of information.

But when I type in:

sudo ifconfig en0 ether xx:xx:xx:xx:xx:xx

I get:

sudo: ifcongig: command not found

Before I posted here, I googled around trying to figure out how to change the MAC address of my machine - a 2018 MacbBook Air.

This problem apparently began with the 2018 MacBook Pros. I was hoping someone here might have figured out a way to make it work.
 
ifconfig is listed, and if I just type ifconfig it displays a plethora of information.

But when I type in:

sudo ifconfig en0 ether xx:xx:xx:xx:xx:xx

I get:

sudo: ifcongig: command not found

Before I posted here, I googled around trying to figure out how to change the MAC address of my machine - a 2018 MacbBook Air.

This problem apparently began with the 2018 MacBook Pros. I was hoping someone here might have figured out a way to make it work.
It appears you're typing "ifcongig" rather than "ifconfig".
 
It appears you're typing "ifcongig" rather than "ifconfig".

Ahh.. Yes, I did. However I'm still unable to change the mac address.

Typing sudo ifconfig en0 ether f4:0f:4f:xx:xx:xx no longer returns an error message, but it still doesn't change the mac address. Here are some threads I've found with others having the same problem on 2018 Macbook Pros and Airs with Mojave:

https://www.reddit.com/r/macbook/comments/93h2mi/mac_address_changing_on_new_2018_mbp_broken/

https://github.com/feross/SpoofMAC/issues/87
 
  • Like
Reactions: adib
Did you do this on a 2018 MacBook Air or MacBook Pro?

This is the response I get in terminal when I type in sudo ifconfig en0 ether xx:xx:xx:xx:xx:xx (I have a Mac address in mind)

sudo: ifcongig: command not found

This seems to be the problem with the new 2018 MacBooks.

Hi chemistry76,

I tested the exact Terminal commands that I listed above on an iMac running macOS 10.14.1 since the iMac has an ethernet interface. But if you wish, I can try it on a 2018 MBP too?
 
The 2018 would have the extra security command, that you have to turn off the system security (some function name that I don't recall atm) in terminal after booting to your recovery system. Reboot normally, then try the ifconfig command again.
 
The 2018 would have the extra security command, that you have to turn off the system security (some function name that I don't recall atm) in terminal after booting to your recovery system. Reboot normally, then try the ifconfig command again.

Interesting ... as SIP is a feature of the Mojave 10.14.1 OS that I was using on the iMac and I didn't have to turn off SIP (csrutil disable, while in Recovery Mode) in order to change the MAC address on my iMac. It did require administrator privileges, but it did not require SIP to be disabled. Maybe I should check changing the MAC address on my 2018 MBP ... I'll do this when I have a chance.
 
  • Like
Reactions: chemistry76
I posted too late last night... I was thinking of disabling SIP - but maybe the T2 security should be turned off, too?
I don't have one of the newer Macs with that extra layer of security.
 
Any updates? There're threads on reddit and github that on latest mbp ifconfig doesn't change MAC address even on external dongles.
 
Hey there,

I just worked this out but if you don't want to use a random MAC address then you can just create a variable with the mac address you want to use stored on there ie:

NEWMAC=(xx:xx:xx:xx:xx:xx)
sudo ifconfig en0 ether `echo ${NEWMAC}`
sudo ifconfig en0 down
sudo ifconfig en0 up

This should be a good method to set your MAC address to something you want to too instead of something random.

To change back to original view the first answer
 
Hi, I have a late 2018 Macbook Air.

I tried WIFISpoof, and it changed the Thunderbolt Bridge MAC address, but not the LAN ethernet, nor the WIFI MAC addresses. I tried all recommended terminal commands, and got this regarding the above:

ifconfig: can't set link-level netmask or broadcast

Not very promising. My neighbors are harassing (moving my cursor all over the place and speeding up the temperature, causing the fan) and I believe they are using a computer to computer access, whereby I tried to change the MAC addresses, with no luck so far.

If I can't change the MAC address, does anyone have a NETBIOS deletion or?

The neighbors also learned to slow my internet (ATT DSL) or to disconnect it, even though my computer Network in System Preferences shows LAN ethernet connected. I disabled the WIFI and have just been using ethernet connection.

Any ideas are welcome. Many thanks!
 
Hi, I have a late 2018 Macbook Air.

I tried WIFISpoof, and it changed the Thunderbolt Bridge MAC address, but not the LAN ethernet, nor the WIFI MAC addresses. I tried all recommended terminal commands, and got this regarding the above:

ifconfig: can't set link-level netmask or broadcast

Not very promising. My neighbors are harassing (moving my cursor all over the place and speeding up the temperature, causing the fan) and I believe they are using a computer to computer access, whereby I tried to change the MAC addresses, with no luck so far.

If I can't change the MAC address, does anyone have a NETBIOS deletion or?

The neighbors also learned to slow my internet (ATT DSL) or to disconnect it, even though my computer Network in System Preferences shows LAN ethernet connected. I disabled the WIFI and have just been using ethernet connection.

Any ideas are welcome. Many thanks!

Change your wifi password??
 
My guess would be that the intruders are in her router. If that's the case, then changing the router's password would kick them out.
 
Tried that first, but as they seem be able to see my computer screen, no passwords nor password changes help.
 
Tried that first, but as they seem be able to see my computer screen, no passwords nor password changes help.

it doesn’t make a huge amount of sense, the way you’ve explained it.

What is the evidence you’ve found that this is happening?
 
it doesn’t make a huge amount of sense, the way you’ve explained it.

What is the evidence you’ve found that this is happening?
I have audio recordings of my neighbors speaking over my computer speaker (that match the audio/video recordings of their other harassments), and experience the same wrongful acts after I change passwords. I even experience them changing passwords, after I just changed a passwords, recorded in Keychain access. If I knew the "technical" explanation, I would have stopped it already. But, again, as they aren't very bright, these are just small cheap tricks which are easy to do, thereby easy to fix. Nothing they do is "rocket science", they are incapable of anything complicated. I just haven't come across the cheap trick fix, just yet, not spending much time on it. As usual, I'll come across the fix without much effort. However, in the meantime, it produces a ton of legal evidence, and will be used in legal proceedings against them in the near future.
 
Neighbors, even though they "aren't very bright", seem to stay one step ahead of you.
How would you account for that?

hmm...
I'm guessing that you have been in your System Preferences/Sharing pane, and turned OFF all sharing options (all of them). If you return later, are any Sharing options turned back on? Which ones, specifically?

What has been your experience when you called ATT for help with blocking other users from your internet connection?

Can you try some scanning software (scan for "troublesome" apps) such as EtreCheck? That will check for a variety of startup software, perhaps helping you decide if something has been installed on your system, which might be sending reports of some kind, etc.
Won't hurt anything to give Etrecheck a run.
 
I have audio recordings of my neighbors speaking over my computer speaker (that match the audio/video recordings of their other harassments), and experience the same wrongful acts after I change passwords. I even experience them changing passwords, after I just changed a passwords, recorded in Keychain access. If I knew the "technical" explanation, I would have stopped it already. But, again, as they aren't very bright, these are just small cheap tricks which are easy to do, thereby easy to fix. Nothing they do is "rocket science", they are incapable of anything complicated. I just haven't come across the cheap trick fix, just yet, not spending much time on it. As usual, I'll come across the fix without much effort. However, in the meantime, it produces a ton of legal evidence, and will be used in legal proceedings against them in the near future.

This whole thing sounds weird and could be anything. Regardless, it is not something a MAC change would fix. Why not start a new thread and post screenshots of the behavior you're experiencing?
 
I have audio recordings of my neighbors speaking over my computer speaker (that match the audio/video recordings of their other harassments), and experience the same wrongful acts after I change passwords. I even experience them changing passwords, after I just changed a passwords, recorded in Keychain access. If I knew the "technical" explanation, I would have stopped it already. But, again, as they aren't very bright, these are just small cheap tricks which are easy to do, thereby easy to fix. Nothing they do is "rocket science", they are incapable of anything complicated. I just haven't come across the cheap trick fix, just yet, not spending much time on it. As usual, I'll come across the fix without much effort. However, in the meantime, it produces a ton of legal evidence, and will be used in legal proceedings against them in the near future.


How is your neighbour putting audio over your computer speaker?

Its really difficult for someone here to help you. You mention changing the MAC or disabling NetBIOS but you don't explain how you think those things will help you. You mention that you think they're remotely controlling your computer but you don't mention how. You mention that they're slowing down your Internet service. That's really not likely, unless they're just hammering your link with traffic.

It appears you have some knowledge but your application of the knowledge might not be correct.

I recommend you get a security professional to help you.

Assuming you're not going to do that, then I would backup my computer and backup my router. Then I would reset my router to factory defaults and reconfigure it, ensuring that it's secure. Disable wifi, disable remote admin, ensure you have a strong password, ensure the firmware is up to date. That will close most holes there.

On your Mac, I would make a backup, wipe and factory reset, and then do not restore you data. If your system is compromised and you restore your data you may be restoring compromised apps. Just make a backup, put it aside, and get to grips with cleaning this mess up first.

You'll then have a relatively clean network and Mac (from what little we know about the setup). Then as these things continue to happen you can document them and we can try to help you.

I wouldn't knee-jerk to trying to change MAC address or disabling NetBIOS etc. I don't think these things are likely to help you.

This may be something as simple as a bluetooth connection to your speaker, but you don't mention anything about the physical layout (how far are your neighbours) or how your speakers are connected.

Again, I recommend find a security professional. If this turns into a legal thing then they might be an expert witness too.
 
Thank you. This is just one of many harassments. Over and over again, I eventually learn each form of harassment is just an extremely low tech, cheap trick.

Yes, there are multiple harassers which then could slow my connection. Within minutes after shortening my wifi range, there were verbal complaints like - "I hate you". Bluetooth may well be the way for the talking, but of course my computer shows no blue tooth connection. I did run network software and got their computer IP addresses (I think that's the correct term). That's how I kicked them off the router, individually, after shortening the wifi range. But, one keeps changing the address, that's why I started this thread inquiry. Thought if I did the same, it would be harder to get on mine.

I spoke with ATT and Apple, and no remedy. I did pay for "security", about $400 worth, and that did nothing as well. I got a refund.

That these multiple idiots spend their time harassing me, rather than something fruitful with their lives is sign of human de-evolution. They tend to be low income producers, and attempt to diminish my successes.

Honestly, it's not that big of a deal. The whole reason I don't spend much time trying to stop them, is for the legal evidence their harassments produce, which is indisputable. And, the legal actions forthcoming. I have a Federal trial, already. There will be more.

This legal evidence will benefit many, as they boast of being Freemasons, and this being part of their "craft" and their "process". Therefore, when I go public in legal proceeds about their "craft" and "process", while actually forcing those individuals which I have substantial evidence on to appear for the courtroom cameras, the rest of humanity they plague will see the low caliper, socially outcast, inadequates they are. No one need fear them. It's fear they try to attain, and before I'm finished, no one on earth ever will.

Thanks again for the Saturday afternoon entertainment. It's all about the evidence. Tally ho. Signing off.
 
Good luck.

With all sincerity, you had bad help if they couldn’t sort this for you. I would find someone else, this should be trivial to resolve with access to all of the correct information. Nothing you’re describing sounds difficult for a professional to fix and clean up. I hope you find someone and can get this all closed off.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.