Change your Network Card MAC Address on Ubuntu
Sponsored Link
If you want to change your network card mac address you need to use simple utility called mac changer.MAC changer is a utility for manipulating the MAC address of network interfaces
Possible usages
You're in a DHCP network with some kind of IP-based restriction
You've a cluster that boot with BOOTP and you want to have a clean set of MACs
Debug MAC based routes
MAC Changer Features
Set specific MAC address of a network interface
Set the MAC randomly
Set a MAC of another vendor
Set another MAC of the same vendor
Set a MAC of the same kind (eg: wireless card)
Display a vendor MAC list (today, 6800 items) to choose from
Install MAC Changer in Ubuntusudo apt-get install macchanger
This will complete the installation.
If you Find your MAC address using the following command
ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:A8:D0:FA
inet addr:172.20.22.35 Bcast:172.20.22.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fea8:d0fa/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:7690 errors:0 dropped:0 overruns:0 frame:0
TX packets:6399 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4284579 (4.0 MiB) TX bytes:876317 (855.7 KiB)
Interrupt:177 Base address:0x1080
In the above example MAC Address is 00:0C:29:A8:D0:FA
If you want to configure MAC Changer you need to stop the networking services using the following command
For Ubuntu Userssudo /etc/init.d/networking stop
Now you need to configure your MAC address using the following examples
MAC Changer Syntax
macchanger [options] device
Examples
macchanger eth1
Current MAC: 00:09:a5:eb:23:f7 (Hansung Eletronic Industries Development Co., Ltd)
Faked MAC: 00:09:a5:eb:23:f8 (Hansung Eletronic Industries Development Co., Ltd)
macchanger --endding eth1
Current MAC: 00:09:a5:eb:23:f8 (Hansung Eletronic Industries Development Co., Ltd)
Faked MAC: 00:09:a5:6f:31:23 (Hansung Eletronic Industries Development Co., Ltd)
macchanger --another eth1
Current MAC: 00:09:a5:6f:31:23 (Hansung Eletronic Industries Development Co., Ltd)
Faked MAC: 00:11:18:5b:3a:1f (Blx Ic Design Corp., Ltd.)
macchanger -A eth1
Current MAC: 00:06:5b:f6:f3:48 (Dell Computer Corp.)
Faked MAC: 00:0d:11:93:0c:4f (Dentsply -- Gendex)
macchanger -r eth1
Current MAC: 00:0d:11:93:0c:4f (Dentsply -- Gendex)
Faked MAC: 3c:f1:89:f9:1f:ce (unknown)
macchanger --mac=01:23:45:67:89:AB eth1
Current MAC: 00:40:96:43:87:65 [wireless] (Cisco/Aironet 4800/340)
Faked MAC: 01:23:45:67:89:ab (unknown)
./macchanger --list=Cray
Misc MACs:
Num MAC Vendor
--- --- ------
065 -- 00:00:7d -- Cray Research Superservers,Inc
068 -- 00:00:80 -- Cray Communications (formerly Dowty Network Services)
317 -- 00:40:a6 -- Cray Research Inc.
Here is the list of available options for MAC Changer
-h, -help
Show summary of options.
-V, -version
Show version of program.
-e, -endding
Don't change the vendor bytes.
-a, -another
Set random vendor MAC of the same kind.
-A Set random vendor MAC of any kind.
-r, -random
Set fully random MAC.
-l, -list[=keyword]
Print known vendors (with keyword in the vendor's description string)
-m, --mac XX:XX:XX:XX:XX:XX
Set the MAC XX:XX:XX:XX:XX:XX
If you completed the your MAC address changes you need to start the networking service using the following command
For Ubuntu Userssudo /etc/init.d/networking start
For Ubuntu Userssudo /etc/init.d/networking stop doesn’t work for me still running i have hardy
MAC Changer for Ubuntu 8.04 needs a GUI to make it as easy and convenient to use as various MAC changers are for Windows.
Ubuntu Users who don’t know do to start/stop network services:
To stop network services, enter this command:
sudo ifconfig (network interface) down
To start again:
sudo ifconfig (network interface) up
If I change my mac address, is the changes is permanent. How can I restore back my old MAC address.
azwar: The change is not permanent. Reboot and your old MAC is restored. reboot is not neccesary to restore MAC, you can type:
# macchanger –mac=XX:XX:XX:XX:XX:XX ethX
XX:XX:XX:XX:XX:XX=your original MAC
To show your original MAC, of course before you’ve changed it:
# macchanger -s ethX
What I want to know is why macchanger only works on ethX, and not my wlanX?
I can change my wlanX, so it might be your adapter
sudo vi /etc/network/interface
add “pre-up ifconfig eth0 hw ether 00:e0:4c:dd:7e:b3”
You can try my simple frontend to macchanger called macchangerGUI at
http://medan-slackware.blogspot.com/2010/06/macchangergui-frontend-macchanger-untuk.html
The blog use indonesian, please use google translator to read it.
after changing my mac address, it doesnt want to connect over a network.
when tried to ping to dns, it says “destination host unreachable”
but if i restore the old mac address, networking is fine.
how to configure so that the fake mac address can connect to a network?
please suggest
jken’s method is brilliant and is the way I am looking for.
2ndid Billz.
Jkenz solution works for wireless also!
Good work geez!