Random MAC Address on bootup


In Backtrack5, there’s an easy way to have a new MAC address upon every bootup for your network devices.

System > Startup Applications > Add

Name – anything

Command – macchanger -r eth0

Comment – anything

That’s it. Add another for your wlan0 device. The application ‘macchanger’ is installed by default, and the -r option is for random MAC address.  Tested and working on BackTrack 5 R2.

Another method is creating a startup script.

Create a script ‘automac.sh’

sudo ifconfig eth0 down

macchanger -r eth0

sudo ifconfig eth0 up

sudo ifconfig wlan0 down

macchanger -r wlan0

sudo ifconfig wlan0 up

Copy the script into /etc/init.d

Run the following commands

sudo update-rc.d automac.sh defaults

sudo chmod +x /etc/init.d/automac.sh

Now it will run on startup, and randomize the MAC address for your eth0 and wlan0. This was tested on Blackbuntu.

Advertisements

One thought on “Random MAC Address on bootup

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s