How to change MAC address on startup in Kali Linux

I would like Kali Linux to change the MAC addresses of both my network interfaces (eth0 and wlan0) on startup to randomly generated ones. How would I go about doing this?

2 Answers

You can use the macchanger program which comes preinstalled in kali.

Follow the instructions at this kali forum to configure it to start at boot.

This Link discusses how to do it without macchanger

4

You can program your computer to automatically generate a random MAC address upon reboot by entering the following commands in Terminal:

First, login as root, then enter crontab -e. This will either load a program, or allow you the option to select a program to load it with. (I recommend nano.) Once crontab is loaded, enter a new line at the bottom like this: @reboot macchanger -r eth0. (Make sure it does NOT have a # before the line. The pound sign basically tells the program, "ignore this line.") Then just "Write Out" (save) and exit crontab. Reboot your computer to test it.

You may encounter an issue, like I have, where the randomly generated MAC address does not grant network access.... don't freak out, simply generate a new one with macchanger -r eth0 until it does. I haven't found a way to avoid that yet... it's annoying, but at least it'll keep you from footprinting your real MAC address somewhere you don't want it.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like