How to Change MAC Address on Mac Easily
A MAC address, or a Media Access Control address, is a unique identifier that is assigned to the network interface of a machine. On your Mac, this is the unique hardware identifier for the WiFi or Ethernet card inside it. Every device has a unique MAC address, because if more than one device on the same network has the same MAC address, the network won’t be able to distinguish between the two devices, causing quite a lot of problems.
Since the MAC address is permanent, and hardware bound, it is most often used to prevent a particular device from accessing the network. For example, in your home WiFi, you can easily set up your router to allow only a specific list of MAC addresses to connect, so even if someone has your WiFi password, but are not added to the list of accepted addresses, they won’t be able to connect to your network. That’s one situation you’d want to change the MAC address of your Mac. So, if you’re trying to get around a router that has blocked your Mac’s MAC address, here is how to change MAC address on Mac:
Note : I’ve changed my MAC address on a MacBook Air running macOS Sierra 10.12.4. The method should be similar in other versions of macOS as well.
Find Your Current MAC Address
The first thing you need to do, is figure out the current MAC address of your Mac. You can do this by following the steps given below:
- Go to System Preferences -> Network.
- Here, click on “Advanced”
- Switch over to the “Hardware” tab, and you’ll be able to see the MAC Address of your Mac. Note this down somewhere, just in case you need to switch back to it.
Change MAC Address in macOS
To change the MAC address on your Mac, you’ll have to use the Terminal. The commands are simple, and you can just follow the steps given below:
- Press and hold the “option” key, and click on the WiFi icon in the menu bar. You will be able to see the “interface name” there. In my case, it’s “en0”.
- Launch the Terminal, and type the following command:
openssl rand -hex 6 | sed ‘s/\(..\)/\1:/g; s/.$//’
This will give you a new random hex number that you can use as a MAC address
- Disconnect from your WiFi network, by holding down “option” and clicking on the WiFi icon in the menu bar, and clicking on “disconnect” under your WiFi name.
- Now, type “sudo ifconfig en0 ether “.
- You will now have successfully changed your MAC address on Mac.
You can reconnect to your WiFi network, and check your MAC address again to verify that it has changed.
Easily Change MAC Address in Mac
You can use this method to easily change your Mac’s MAC address, and get around any router that is blocking you by your MAC address. Do note that if the router is using a MAC address whitelist, instead of blocking particular MAC addresses, you will not be able to join the WiFi network, even though your MAC address will have changed. Changing MAC addresses on your Mac is not a very difficult task, even if it sounds like one. So, if you’ve been wanting to spoof your MAC address, go ahead and try this method out. Also, let me know how it worked out for you, and if you know of any other methods to change the MAC address on Mac, do let me know about them in the comments section below.
5 COMMENTS
False, once you reconnect and check in the network settings the original Mac address is still there
When copy/pasting, replace quotation marks (‘ U+2018 left single quotation mark and ’ U+2019 right single quotation mark) with proper apostrophes for this to work:
openssl rand -hex 6 | sed ‘s/\(..\)/\1:/g; s/.$//’
Posted the correct version but it looks like this website aggressively replaces them even in comments.
Its not working for me.. Macbook pro 13″ 2013. The MAC adress changes but wont be able to acces the internet after ive changed it.
How to Find and Change MAC Address in Mac OS X
A computer is identified by a unique Media Access Control address (MAC), which is built in your computer’s network card. You can change this MAC address natively in OS X.
It is quite easy to change MAC address if you are using Windows or Linux; this is quite an expert thing to change such virtual addresses on your Mac or Windows systems.
First off, we will discuss how you can find your MAC Address.
Find MAC Address of Your Mac
You can quickly find MAC Address on your OS X from the menu bar. Just press and hold Option key and click on the Wi-Fi icon seen in the menu bar. A drop-down menu will appear with some options, among which you can see first two options as Interface Name and Address.
The address is sort of mixture of alphabets and numbers separated by colons; this is physical MAC address of the computer. This address may be changed; at this time, you can you can write a command in terminal and check the address your computer is using to communicate.
ifconfig en1 | grep ether
This will supply your MAC address for the hardware interface en1; this interface is used for Wi-Fi in most Macs.
If you want to check which interface is used for Wi-Fi, press and hold the Option key and click the Wi-Fi icon in the menu bar. This action will show you which device you are using to access the internet.
Change MAC Address
You can change your MAC address by setting a new one
sudo ifconfig en1 ether aa:bb:cc:dd:ee:ff
Enter your system password when prompted.
This command will set the MAC address for en1.
Get a Random MAC Address
If privacy is your concern, you should randomize your MAC address. Type in the command as mentioned below:
openssl rand -hex 6 | sed ‘s/\(..\)/\1:/g; s/.$//’ | xargs sudo ifconfig en1 ether
Enter your system password when prompted.
You get a new MAC address for en1 every time you run this command. Please note that this is not a permanent thing as the changes made from both commands will revert to its original condition when you restart your Mac. Please note that once you change your MAC address, there can be some network problems. It is always advisable to restart your Wi-Fi after editing MAC address.
Замена MAC-адреса на компьютерах с macOS
Узнаём MAC-адрес на macOS
Перед тем как менять адрес, нелишним будет узнать текущий, чтобы в случае неудачных манипуляций его можно было вернуть обратно. Делается это следующими методами:
- Можно воспользоваться «Терминалом». Для его открытия воспользуйтесь средством Launchpad – кликните по соответствующей иконке на панели Dock.
Далее откройте папку «Others» (иначе может называться «Утилиты»).
Найдите значок «Терминал» и щёлкните по нему.
Далее следует ввести следующую команду:
ifconfig en0 | grep ether
Появится строка, которая начинается со слова ether — последовательность после него и есть аппаратный идентификатор сетевого адаптера.
Далее откроется раздел сведений о компьютере Mac. В меню слева выберите пункт «Сеть» (именно его, а не подпункты), после чего в правой части появятся подробные сведения о сетевом оборудовании, в том числе и искомое нами значение.
Третий вариант – откройте «Системные настройки» (находится на панели Dock) и выберите пункт «Сеть».
В меню адаптеров выберите нужный, затем кликните «Дополнительно».
Далее перейдите на вкладку «Аппаратура», первая же позиция на ней показывает MAC-адрес выбранного адаптера.
Полученное значение лучше где-нибудь записать или скопировать в отдельный текстовый файл. Теперь можно переходить непосредственно к изменению идентификатора.
Меняем MAC-адрес на Маке
Собственно процедура может совершаться двумя путями – специальным сторонним приложением или командой через «Терминал». Рассмотрим оба возможных варианта.
Способ 1: Macspoofer
Достаточно давно на рынке существует стороннее приложение для замены аппаратного идентификатора сетевого адаптера, известное как Macspoofer. Программа изначально разработана для ОС Snow Leopard, а последняя официальная версия совместима только до El Capitan, однако без проблем работает и на macOS Catalina, самой современной из настольных операционных систем Apple на момент написания статьи.
- Программа упакована в ZIP-архив, однако для её работы не потребуется стороннее ПО – при запуске архива в макОС Каталина он будет автоматически распакован. Запустите содержащийся в папке файл с названием Macspoofer.prefPane.
Появится предупреждение об установке приложения для работы файла. Выберите, для каких категорий пользователей вы хотите инсталлировать это ПО, затем кликните «Установить».
После установки будет открыта панель Макспуфер, в дальнейшем доступная через «Системные настройки». В левой части окна отображены доступные адаптеры, в правой – уже существующие идентификаторы. Замена МАК-адреса происходит по нажатию кнопки «Generate».
Также адрес можно ввести и вручную, при этом важно следовать имеющемуся шаблону: два символа после двоеточия.
После того как значение идентификатора будет заменено, кликните по кнопке «Update».
Для первого проведения процедуры потребуется ввести пароль от текущего аккаунта.
Подождите, пока значение обновится, после чего закрывайте приложение.
Как видим, всё просто и понятно, однако у этого решения есть несколько недостатков. Первый – не гарантируется работа на так называемых хакинтошах (обычных PC с установленной macOS), а также отсутствует русский язык.
Способ 2: «Терминал»
Пользователям, у которых не сработал первый вариант или нет возможности устанавливать стороннее ПО, предложим альтернативу – ввод специальной команды через «Терминал».
- Вызовите консоль ввода команд (в начале статьи указано, как её открыть) и напечатайте следующее:
sudo ifconfig en0 ether *новый MAC-адрес*
Вместо позиции en0 впишите требуемый адаптер (en1, en2, en3 и так далее по этой же схеме), а вместо *новый MAC-адрес* – идентификатор в формате ХХ:ХХ:ХХ:ХХ:ХХ.
Также потребуется ввести пароль администратора.
Внимание! Вводимые символы не отображаются, так и должно быть!
openssl rand -hex 6 | sed ‘s/(..)/1:/g; s/.$//’ | xargs sudo ifconfig en0 ether
Опять-таки, вместо en0 укажите номер нужного адаптера.
Готово – «Терминал» можно закрывать. Для стабильности работы переподключитесь к интернету.
Заключение
Мы познакомили вас с методикой смены MAC-адреса на компьютерах Apple, работающих под управлением macOS. Как видим, процедура несложная, но стоит иметь в виду, что вследствие ее выполнения возможны проблемы с доступом к интернету. В таком случае просто восстановите оригинальный идентификатор, после чего проблема будет решена.