Changing mac address Ubuntu/Debian

Yo!

Finally I managed to connect to the net using my laptop. DHCP server was not giving an IP from the lease when I try to connect
from my lappy. I found out the issue – my ISP was blocking the mac address of my laptops network card 🙂 – why – who knows ! :p

So ? I thought I will change the mac. Here is a how to which I think could be useful to someone else too.

Manually set your MAC address for your network card.
—————————————————–

Edit the /etc/network/interfaces file. You can choose to use a different editor if you’d like.

sudo gedit /etc/network/interfaces

or

sudo vim /etc/network/interfaces

You should see the line for your network interface, which is usually eth0. If you have dhcp enabled, it will look like this:

auto eth0
iface eth0 inet dhcp

Just add another line below it to make it look something like this:

auto eth0
iface eth0 inet dhcp
hwaddress ether 01:05:03:04:0B:06

you can change the part after “ether” to some other balue, in the same format

Now restart networking

sudo /etc/init.d/networking restart

===========
Lazy ?

There is a tool availab le for Ubuntu to automate this – macchanger

To install
——-
sudo apt-get install macchanger

usage:
macchanger eth1
Now check the man page of macchanger for usage instructions, there are some interesting options out there.

Advertisements

One Response to “Changing mac address Ubuntu/Debian”

  1. SiiN Says:

    If you are on Windows, this link might be helpful
    http://www.nthelp.com/NT6/change_mac_w2k.htm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: