Networking, Programming and Graphics - Tutorials
ONLINEHOWTO.net Tutorials Category

How to change my MAC address in Fedora Core

Type: Code Networking, Programming and Graphics - Tutorials
Networking, Programming and Graphics - Tutorials
Level: Beginner Networking, Programming and Graphics - Tutorials 
Networking, Programming and Graphics - Tutorials
Date: 2009-Jul-31
Networking, Programming and Graphics - Tutorials
Visited: 2238 times
Networking, Programming and Graphics - Tutorials
Rating: Networking, Programming and Graphics - Tutorials
Networking, Programming and Graphics - Tutorials
Published: Stephen Think

In the following tutorial you will learn how to change the MAC address of your Network Interface Card (NIC) under Fedora Core Linux distribution.

I have waited for a long time to write this tutorial but just few days back I had to do it myself. I have bought a new laptop and wanted to use it in the office. In the office network all IP addresses are given by a DHCP server and I had to wait the network administrator to allocate and IP for my laptop. Unfortunately as we it is middle of the summer he was on a vacation and I did not want to bother him to do it remotely. Besides I simply cheated the DHCP server that my MAC address is the same as on my other laptop.

Anyway the reasons why you will need to change might be different for everyone who came on this page so lets cut the useless information and get to the point.

The next two commands will do the trick but you might need root privileges to the Fedora core system. For the purposes of this tutorial we have used Fedora Core 10 but this will work on every Linux distribution.
ifconfig eth0 down
ifconfig eth0 hw ether 00:1E:37:D9:31:9F
If you want to be able to do these commands with a normal user not root you will need to edit have in your /etc/sysconfig/network-scripts/ifcfg-eth0 the following line
USERCTL=yes
of course it eth0 is just an example. You can do it with any other interface you need. For example with wlan0.

You could add this shell script in /etc/init.d/mac_change.sh if you wish to have this MAC permanently changed with startup. To manage this on boot you need to run this command

chkconfig --add mac_change.sh
#!/bin/bash
#
# chkconfig: 2345 99 99

ifconfig eth0 down
ifconfig eth0 hw ether 00:1E:37:D9:31:9F
Rate this tutorial:                    
Post Comment

Need a specific tutorial? Do not hesitate and submit a request!
Your e-mail: