Faking MAC Address in Linux

I’m house-sitting for my brother, and I brought my computer over so I didn’t die of boredom, alone, in a house for a week. The problem is the Internet over here is hooked up directly to the modem, and the Internet provider will only provide an Internet address (IP address) to the ethernet card that was registered to them: the one in my brother’s computer. So, I turned on the computer, checked out the advanced properties of the ethernet card to get the MAC (physical) address and wrote it down. In Linux, using ifconfig, you can tell a particular interface to pretend its address is something else. If you’re using a Debian derivative (I’m using Ubuntu), you’ll probably need sudo before the command.

Note: Copy your current MAC address and put it somewhere safe, just in case – I haven’t tested to see if this is permanent, yet.

On the command line:

sudo ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx

Or, to make it permanent, put it in /etc/network/interfaces

auto eth0
iface eth0 inet dhcp
hw ether xx:xx:xx:xx:xx:xx

If you get an error message, saying the “Device or Resource is busy” then you probably have to bring the interface down first: sudo ifconfig eth0 down. Use ifconfig eth0 to check that it worked – it should show the new address if no error was reported. Once that was done, I connected my computer to the modem and the provider was much more cooperative with my DHCP requests. πŸ˜€ Yay, Internet on my computer again! πŸ™‚


  1. telus allows 2 mac addresses per account.
    you could of added your machine and avoided all that nonsense.
    it should give you a page where you can add it/adjust the current one in your browser.

    but I know you like doing things the hard way

  2. yeah, the first machine to connect on your telus account is accepted by default. (few years ago you had to phone it in)

    any further routers/ethernet cards need to be added to ‘the list’

    steve just couldn’t resist flaunting his big sensual brain meat

  3. Jesse, I feel your comment is simply too bitchy to warrant a reply, but I might as well lay it down.

    1) It’s not Telus, it’s Shaw. Holy shit! I think your argument was just shot down! I’d say that whole “don’t assume, it makes an ass outta you and me” thing, but in this case, it’s more like “assu.” But thanks for the related info, anyway. πŸ™‚
    2) It doesn’t take long at all.
    3) This information could be useful to others searching for it, and it’s now kept for me if I need it in the future.

    You PMS-ing or something? Huh, Bitch? Huh? *smack smack* πŸ˜€

Leave a comment

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