Most people ask themselves whether they can be tracked over the Internet by having their MAC Address or IP address detected by others.
It’s true that IP addresses are no longer secret. It’s a main part of the Internet communications protocols to have the IP address sent each time you transfer or receive data over the internet. Each time you start your computer, to go to the Internet you will be assigned an IP address by the Internet Service Provider (ISP) but the MAC address will be same as assigned by your hardware vendor.
In a network when a computer wants to find another one it has to know the IP of that computer but the information inserted in the packets is the MAC Address of the destination computer.
The Media Access Control (MAC) address is an identifier that’s unique to an individual piece of networking hardware. And if the identifier is really unique, you could “filter” users on your wireless LAN so that only users with pre-identified MAC addresses can get on.
Theoretically, this could provide a secure means of controlling access to your LAN: Just put all of your own MAC addresses on the “allowed” list.
Unfortunately, the relationship between a MAC address and the hardware it identifies is not so rigid. In fact, MAC addresses can be spoofed or impersonated – so a wireless client with MAC address x can be set up to look like the client with MAC address. This is a pretty easy task to perform.
We will assume that you do have wireless hardware that does work in Linux and to check, type “iwconfig” command into your terminal.
The command iwconfig configures a wireless network interface. You can view and set basic wi-fi details like SSID and encryption.
As you see that, wlan0 is the name of the wireless interface which is currently in Managed mode and can be changed to Monitor Mode by running “airmon-ng start wlan0“.
Next you need to disable your active wireless network interface (wlan0) by typing the following command:
ifconfig wlan0 down
You can also use the following command to turned down the wlan0 interface.
ip link set wlan0 down
To get random MAC address, the command is:
macchanger -r wlan0
The above command will change the MAC address of the network card to different hexadecimal numbers.
In case, if you want to restore the original one as set by your hardware vendor, then the command is:
macchanger --permanent wlan0
The above command will reset your MAC address to original.
If you want to set your own custom MAC address or someone’s spoofed MAC address, then the command is:
macchanger -m 00:11:22:33:44:55 wlan0
The above command will change the MAC address of wlan0 device into 00:11:22:33:44:55.
Various vendors have different MAC address prefixes. Therefore, you can usually identify the manufacturer of a network device by looking at the first few bits of the MAC address. To see a list of known MAC addresses and their corresponding vendors, you can use the -l option.
Now in the ending, you can also use the following command to show the current MAC address:
macchanger --show wlan0
In this article, we saw how to change the MAC address of a wireless network interface on Linux. This is done through the macchanger utility, which can be easily installed from the default repository of most major Linux distributions.