Creating a random MAC Address
A MAC address is always in the format xx:xx:xx:xx:xx:xx. If you want to generate randomly a new MAC Address you can use the following command using openssl:
openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'
Setting up the new MAC
In Mac OS X the network interface usually is en0 or en1. The command for changing the MAC address is as follows:
sudo ifconfig en0 ether xx:xx:xx:xx:xx:xx
replacing “xx:xx:xx:xx:xx:xx” with the new MAC address. For example:
sudo ifconfig en0 ether 36:81:51:8e:f1:76
Hope help
You can create temporary MAC Address in Linux by typing
ReplyDeletesudo ifconfig eth0 hw ether xx:xx:Xx:xx on terminal .
the MAC-address will change and will stay until reboot. If you wish to change MAC-address permanently, you can use various software's available in market .