Change MAC address with MACChanger

On some occasions, we may need to change some MAC address on your PC. Although the MAC address is encoded directly on the network cards, there are some tools that allow mask the real MAC address by a «false»Defined by the user, managing to confuse the operating system.

The MAC address, in many cases, is used as a security and filtering mode for user access to a network. Either excluding, where it is defined which MAC addresses are not allowed access, or inclusive, such as which MAC addresses are allowed access.

Masking your MAC can be for various reasons, and if you are interested in trying it, you should try it with MACChanger

MacChanger is a GNU / Linux tool for viewing and manipulating the MAC addresses of each network interface on your computer.

To install, just go to a terminal and type

sudo apt-get install macchanger macchanger-gtk

MACChanger can be used under comfort or through a Graphic interface the tool has. Let's start with console. If we write:

 macchanger --help

we will have all the options for the manipulation of the MAC addresses in our equipment. We can assign:

macchanger help

  • Specific addresses of a network interface (-m)
  • Random addresses (-r)
  • Same provider addresses (-and)
  • Other provider addresses (-to)

Before changing the MAC address of a device, it is necessary to disable the network interface.

In my case, my computer has two network interfaces, eth0 and wlan0. To deactivate eth0:

roe0jp-XNUMX

Once disabled, you can change the MAC address of the eth0 interface. If we wanted to change it for one random address:

sudo macchanger eth0 -r

And voila, you will be able to see in the console which is the permanent MAC address, and which is your current MAC address. Finally, it would only remain to activate the network interface again:

sudo ifconfig eth0 up

You can always check your MAC address from ifconfig or with macchanger

sudo macchanger -s eth0

 

Graphic interface

If you prefer to work from a graphical interface, you can use the MACChanger window by executing:

sudo macchanger-gtk

macchanger

It does not matter if you use macchanger in console or window, you will always have to deactivate the network interface first and activate it later. 

5 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Manuel Alcocer placeholder image said

    Well, 'iproute2' already allows you to do that like this:

    ip link set dev eth0 address 00: 11: 22: 33: 44: 55

    Replace eth0 with the desired interface ($ ip link, shows the interfaces).
    By the way, the gossips say that 'ifconfig' is already deprecated and that it will not come in the following versions of some well-known distros.
    It has been more than a year that archlinux has used iproute2 (at least in the basic installation that I do with pacstrap, using scripts that circulate around there, I don't know)

  2.   ManuelAlcocer said

    Well, 'iproute2' already allows you to do that like this:

    ip link set dev eth0 address 00: 11: 22: 33: 44: 55

    Replace eth0 with the desired interface ($ ip link, shows the interfaces).
    By the way, the gossips say that 'ifconfig' is already “deprecated” and that it will not come in the following versions of some well-known distros.
    It has been more than a year that archlinux has used iproute2 (at least in the basic installation that I do with pacstrap, using scripts that circulate around there, I don't know)

  3.   Ramiro Estigarribia said

    A simpler option, although with fewer options:
    ifconfig eth0 hw ether 08: 00: 00: 00: 00: 01
    All the best

  4.   Daniel said

    Also like this:

    rf kill block all
    ifconfig wlan1 hw ether xx: xx: xx: xx: xx: xx
    h_XNUMXferaXNUMXjp-XNUMX

    Greetings.

  5.   user said

    I always do it with the network manager editor from a graphical interface
    Right click to the NetworkManager applet and edit connections, there I set a «cloned MAC»