Can we Change the MAC Address of an Ethernet Card in Linux 9 :?:

Hello,

You MIGHT be able to, but why would you want to?

Which Linux version? Mandrake? RedHat?

Christian

sounds like someone is trying to avoid a ban for a gaming server.

99% of the time, its not possible on newer cards.

Member Avatar for TKSS

You can change the MAC address with something like the following command:

ifconfig eth0 hw ether AA:FF:EE:00:00:00

Member Avatar for TKSS

Hey, why am I the only one who answered who isn't a supermod :)

Hey, why am I the only one who answered who isn't a supermod :)

Only because you posted before I did... :mrgreen:

"ifconfig eth0 hw ether AA:FF:EE:00:00:00"

Yes, that might very well work. The interface will probably have to be taken offline in order for that to work though, so before you try the above command, do the following:

ifdown eth0

Remember that the example "eth0" refers to your first or only Ethernet NIC; if you have 2 NICs and it's the address of the second that you want to change, it would be eth1 instead of eth0.

Also, a change implemented by the above command may not persist through a reboot; you have to take extra steps to make the new MAC "permanent". See the following for a bit more info:
http://whoozoo.co.uk/mac-spoof-linux.htm

There are also utilities specific to the individual chipset used on a given NIC which can change the MAC as well. Regardless of how you try to make the change, the chipset and driver must support this ability,

*Note that ISPs often use your MAC address as part of the information which authenticates you as a valid customer. Depending on your network/Internet configuration, changing your MAC addy might break your connection to your ISP.

Hi,

Wouldn't the MAC address on the Cable Modem / DSL device be the one tracked by the ISP? I know that on my systems here, there are various hops to get to the network. The ISP wouldn't care what NIC is in my Redhat box... they see the MAC on the cablemodem device.

Of course, the linux commands are not going to change the Cable Modem's information.

I have also thought of a reason why I would want to change a MAC address... so that I could have a wireless device filter for that MAC address.

Oh well.

Christian

Hi,

Wouldn't the MAC address on the Cable Modem / DSL device be the one tracked by the ISP? I know that on my systems here, there are various hops to get to the network. The ISP wouldn't care what NIC is in my Redhat box... they see the MAC on the cablemodem device.

Depending on your particular setup (and your ISP), the cable modem will acquire the MAC addy of the attached device and pass that on to the ISP. That's the reason many broadband gateway routers have a "spoof this computer's MAC address" (or similar) option.

I have also thought of a reason why I would want to change a MAC address... so that I could have a wireless device filter for that MAC address.

Yes. As wireless becomes more ubiquitous, that reason is becoming more common.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.