random: generate a randomized value upon each connect. The options are: permanent: use the hardware MAC preserve: don’t change the MAC address of the device upon activation. If we execute «–help» we can see the help provided by this program: connection-mac-randomization ethernet.cloned-mac-addresspermanent wifi.cloned-mac-addresspermanent and keep wifi.scan-rand-mac-addressno. Macchanger -mac=XX:XX:XX:XX:XX:XX interfazįinally, we can put the original MAC of the card: Of course, we can put the MAC address that we want in the following way: We also have the possibility that the MAC is random, but keeping the first 24 bits (manufacturer): We will use the application macchanger as our example application that we want to run on boot.
CREATE RANDOM MAC WITH MACCHANGER LINUX HOW TO
This is more of just a tutorial on how to run something as root in a start up script for Ubuntu. If we check the MAC with ip link show, we will see: Random Mac Address on Start Up with Ubuntu. The program itself will inform us of the current MAC address, the permanent MAC (the one that is recorded on the card) and the new MAC address: To change the MAC address completely randomly on a certain interface, we must do the following: When installing it, it will ask us if we want it to run automatically when activating a network device, to have a new MAC address every time a network cable is connected or the WiFi network is activated, ideal to always have a different MAC.
This program is not installed by default, we have to install it ourselves through the repository: The macchanger program is designed to automate the MAC address change, and even allows us to generate a completely random MAC address.
We must remember that ifconfig is no longer installed in the latest versions of Debian and other distributions, in favor of iproute2. As you have seen, changing the MAC address is really easy and fast with ifconfig, the same number of commands as with ip link.