Changing MAC addr on command line was not working, after change it won’t ping the gateway with the following command:
# ifconfig eth0 down
# ifconfig eth0 hw ether 00:80:48:BA:d1:20
# ifconfig eth0 up
# ifconfig eth0 |grep HWaddr
So, to make it permanent here’s what u have to do:
In Red Hat Linux and other similar systems (Fedora Core, etc) an easy way to make it “permanent” across reboots is to just add a variable like this to your ifcfg-eth0 or similar file:
MACADDR=12:34:56:78:90:ab
(upper or lower case on the MAC address are fine, because the network function does a “toupper” on it)
and service network restart for prompt results.
In Debian just put
hwaddress ether 02:01:02:03:04:08
in the appropriate section of /etc/network/interfaces so that the MAC address is set when the network device is started.
You can also use the tool MACChanger to change the MAC address under Linux.