Change MAC address

Flattr this!

 

 

If you frequently use open WLANs (Airport, public Internet local, …), you don’t want to be identifiable by the WLAN provider using your MAC address. Also in other LAN cases a change of the MAC address can be useful.

 

Change MAC address (Windows)

Launch built-in tool “regedit”, go to

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}

and overwrite the address. NOT for novice users.

Other way to to is the program Change-MAC-2010, (page in German, free download, since Windows 2000, needs .NET). It allows to set any address for any adapter. Alternatively use the SMAC program.

 

Change MAC address (Linux)

Install the packet macchanger.

> sudo service networkmanager stop 
> sudo ifdown -a
> sudo macchanger -a eth0
> sudo service networkmanager start

Change MAC address in Linux during boot

#!/bin/bash
### BEGIN INIT INFO
# Provides:          macchanger
# Required-Start:    ifupdown-clean
# Required-Stop:
# Should-Start:      
# Default-Start:     S
# Default-Stop:
# Short-Description: Change MAC addresses
### END INIT INFO
PATH=/sbin:/bin:/usr/bin
NETH=`/bin/netstat -ia | grep eth0 | cut -d " " -f 1`
NWLAN=`/bin/netstat -ia | grep wlan0 | cut -d " " -f 1`
case $1 in
 restart|reload|force-reload|start)
  echo "Change MAC addresses"
  if [ $NETH ] ; then
   /usr/bin/macchanger -a eth0
   /sbin/sysctl net.ipv6.conf.eth0.use_tempaddr=2
  fi
  if [ $NWLAN  ] ; then
   /usr/bin/macchanger -a wlan0
   /sbin/sysctl net.ipv6.conf.wlan0.use_tempaddr=2
  fi
  ;;
 stop)
  ;;
esac
exit 0

Save the script in /etc/init.d/macchanger and make it executable:

> sudo chmod +x /etc/init.d/macchanger

To run the scripte at every boot time, use insserv:

> sudo insserv macchanger

 

 

from here