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:
- Specific addresses of a network interface (-m)
- Random addresses (-r)
- Same provider addresses (-and)
- Other provider addresses (-to)
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
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)
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)
A simpler option, although with fewer options:
ifconfig eth0 hw ether 08: 00: 00: 00: 00: 01
All the best
Also like this:
rf kill block all
ifconfig wlan1 hw ether xx: xx: xx: xx: xx: xx
h_XNUMXferaXNUMXjp-XNUMX
Greetings.
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»