Friday, 23 October 2009

Spoof MAC Address on Linux

Spoofing a MAC address on Linux is quite easy. It does require that you shut the interface down however. Shut the interface you want to spoof down, and then run ifconfig.


Code:
ifconfig eth0 down
ifconfig eth0 hw ether 00:11:22:33:44:55
ifconfig eth0 up

1 comment:

David Webb said...

Instructions for openSuSE (to make the change permentant):

open root konsole and type: kwrite /etc/init.d/boot.local

then add 3 lines to the end of the file:

/sbin/ifconfig eth0 down
/sbin/ifconfig eth0 hw ether AA:50:8D:61:C4:AA
/sbin/ifconfig eth0 up

where you should replace AA:50:8D:61:C4:AA with your mac address and eth1 with eth that you get by executing /sbin/ifconfig

Now reboot