# Changing MAC address has no effect

## CPUFan

My WLAN works perfectly, but when I set the mac address to "random-samekind" and reboot, the mac address is still the same (shown in ifconfig -a, under wlp4s2, "ether". alternatively, "arping" from another PC shows that my MAC address has not changed).

My /etc/conf.d/net:

```
# prefer wpa_supplicant over wireless-tools

modules_wlp4s2="wpa_supplicant"

config_wlp4s2="dhcp"

mac_wlp4s2="random-samekind"

dns_domain_lo="home"
```

Also, dmesg does not complain in any way.

Any ideas?

Thanks on adance.

----------

## Roman_Gruber

afaik ifconfig is deprecated

ip is the new tool. please try with that 

I have not tried mac spoofing for a few years. Any real reason why you need that?

----------

## krinn

you need net-analyzer/macchanger for that option, did you have it?

----------

## CPUFan

 *krinn wrote:*   

> you need net-analyzer/macchanger for that option, did you have it?

 

Oh, I did not see this.

Ok, I just used it manually by calling macchanger from the commandline. It worked for wired lan, but for wireless lan, I reveived "[ERROR] Could not change MAC: interface up or insufficient permissions: Device or resource busy". This can probably easily be fixed. Just shutting down the rc jobs of the wifi interface, dhcpcd and wpa_supplicant did not suffice, I'll have to try out some more things...

----------

## toralf

The most annoying thing w/ mac changing is probably a ADSL/modem WiFi router at home - it will always need to learn every new MAC address ...

----------

## UberLord

 *toralf wrote:*   

> The most annoying thing w/ mac changing is probably a ADSL/modem WiFi router at home - it will always need to learn every new MAC address ...

 

Why?

Do people still filter by MAC in this day and age and not trusting in WPA2/PSK?

----------

## toralf

 *UberLord wrote:*   

>  *toralf wrote:*   The most annoying thing w/ mac changing is probably a ADSL/modem WiFi router at home - it will always need to learn every new MAC address ... 
> 
> Why?
> 
> Do people still filter by MAC in this day and age and not trusting in WPA2/PSK?

 At my Fritz thingie I configured to only trust known devices - so I forced that ofc.

----------

## UberLord

So you know for sure new devices can't change their mac address to one that exists on your network?

Then, let's examine the thread title  :Smile: 

----------

## depontius

I can see two reasons for changing the MAC:

1 - A little bit of anonymity when traveling.

2 - A little (very little, I agree) of defense-in-depth on a home network.  My attitude toward security tends to be, sufficient impediment to send someone looking for easier pickings, but don't look like a challenge for someone interested in that side of things.  I figure any TLA is going to get me, one way or another, so being law-abiding and boring is my defense from them.  Plus we're all vulnerable to rubber-hose cryptoanalysis.

----------

## Logicien

When you have several operating systems installed on the same computer, change the MAC address of a network card allow you to have a unique MAC address for each operating system. One system use the real MAC address, others unique virtual MAC addresses.

You can than receive a unique IP address for each system from a DHCP server configure to always give the same unique IP address to a network card identified by it's MAC address. There is no possible confusion when you want to identify each operating system on the network by it's MAC address and it's IP address. It's more precise when you read log files too.

The ip command can change the MAC address:

```
ip link set dev wlan0 address xx:xx:xx:xx:xx:xx
```

----------

