Changing MAC Address in Linux aka. MAC Spoofing

By Zhiqiang Ma On Nov 27, 2012

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.

By: Zhiqiang Ma Last updated: Nov 27, 2012 Views: 888
Tags: , ,

About Zhiqiang Ma

Zhiqiang Ma is a PhD candidate at Dep. of CSE, HKUST. He is interested in system software for cloud computing, virtualization of large-scale distributed system, etc. Find Zhiqiang on Facebook, Twitter, LinkedIn and Google+.

Add your comments, share your thoughts

Be nice. Keep it clean. Stay on topic. No spam.