Changing MAC Address in Linux aka. MAC Spoofing

MAC stands for Media Access Control which is a six byte number, usually expressed as a twelve digit hexadecimal number. IPs in LAN are translated to MAC address by the ARP (Address Resolution Protocol) protocol. For some reasons such as keeping the true MAC address from being logged, accessing to the network which bounds IPs together with MAC address, the MAC address of NIC card may need to be changed.

Changing the MAC address in Linux box is very easy. Let’s use an example that we want to change the eth0 interface’s MAC address to 00:00:00:00:00:01:

Shut down the interface

# ifconfig eth0 down

Changing the MAC address of the interface

# ifconfig eth0 hw ether 00:00:00:00:00:01

Bring up the interface

# ifconfig eth0 up

Checking the new MAC address

$ ifconfig eth0

The MAC address should be changed to 00:00:00:00:00:01 now.

Eric Zhiqiang Ma

Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

Leave a Reply

Your email address will not be published. Required fields are marked *