You are not logged in.

#1 2017-06-30 06:17:59

BasementHacker
Member
From: Thee Basement
Registered: 2017-06-19
Posts: 40
Website

[SOLVED] WiFi Dongle Changes MAC When Plugged In

Is there any way to stop my external wifi dongle (Alfa) to stop changing it's MAC address every single time I plug it in? Because ultimately I'd like to test changing my interface names from wlp2s0 to wlan0 for example. But this Wiki post says you need to include the MAC address in order to do so.

/etc/udev/rules.d/10-network.rules

SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="aa:bb:cc:dd:ee:ff", NAME="net1"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="ff:ee:dd:cc:bb:aa", NAME="net0"

Solution: Not really any solution. I just kept rebooting and changing the interface name and eventually it worked. Not sure why.

Last edited by BasementHacker (2017-06-30 18:51:12)

Offline

#2 2017-06-30 08:27:43

Gosi
Member
From: Vienna, Austria
Registered: 2010-02-25
Posts: 103

Re: [SOLVED] WiFi Dongle Changes MAC When Plugged In

In case you are using network manager:
NetworkManager#Configuring_MAC_Address_Randomization

Offline

#3 2017-06-30 08:36:31

spinnau
Member
Registered: 2017-06-05
Posts: 38

Re: [SOLVED] WiFi Dongle Changes MAC When Plugged In

The manufacturer alone does not give much information about your wifi dongle. Please post the relevant output for your wifi dongle from "lspci -k" or "lsusb -v" as explained in the wiki to get information about used chipset and driver.

The MAC address will be changed automatically if it is not valid. You should search your journalctl output for messages like "Invalid Mac address detected". And just to be sure, you don't have configured any kind of MAC address spoofing?

Offline

#4 2017-06-30 09:10:24

BasementHacker
Member
From: Thee Basement
Registered: 2017-06-19
Posts: 40
Website

Re: [SOLVED] WiFi Dongle Changes MAC When Plugged In

spinnau wrote:

The manufacturer alone does not give much information about your wifi dongle. Please post the relevant output for your wifi dongle from "lspci -k" or "lsusb -v" as explained in the wiki to get information about used chipset and driver.

The MAC address will be changed automatically if it is not valid. You should search your journalctl output for messages like "Invalid Mac address detected". And just to be sure, you don't have configured any kind of MAC address spoofing?

Thanks for the input. I have looked and it is not changing because the address is invalid. It seems to just. Both those commands give irrelavent outpput to the problem. This happens with different brands of wifi dongle's I have too. Alfa is just the one I use the most regularly (almost daily).

Offline

#5 2017-06-30 09:25:48

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] WiFi Dongle Changes MAC When Plugged In

BasementHacker wrote:
spinnau wrote:

Please post the relevant output for your wifi dongle from "lspci -k" or "lsusb -v" as explained in the wiki to get information about used chipset and driver.

Both those commands give irrelavent outpput to the problem.

That's not how it works here. Someone is volunteering their time to help you; so, in turn, you respect that courtesy by supplying the requested information, whether you think it is relevant or not.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2017-06-30 11:47:47

spinnau
Member
Registered: 2017-06-05
Posts: 38

Re: [SOLVED] WiFi Dongle Changes MAC When Plugged In

BasementHacker wrote:

Both those commands give irrelavent outpput to the problem. This happens with different brands of wifi dongle's I have too. Alfa is just the one I use the most regularly (almost daily).

It's much easier to look for driver issues or even config parameters if the used kernel module is known. Also the information that this happens with different wifi hardware was not available in your first post.

Normally the MAC address shouldn't change automatically. How do you manage your wifi connections? As mentioned by Gosi, NetworkManager has a default setting for randomization of the MAC address during scanning of available networks, but the connections (by default) will then be established using the MAC of the device (wifi.cloned-mac-address=preserve).

Offline

#7 2017-06-30 17:39:11

BasementHacker
Member
From: Thee Basement
Registered: 2017-06-19
Posts: 40
Website

Re: [SOLVED] WiFi Dongle Changes MAC When Plugged In

jasonwryan wrote:
BasementHacker wrote:
spinnau wrote:

Please post the relevant output for your wifi dongle from "lspci -k" or "lsusb -v" as explained in the wiki to get information about used chipset and driver.

Both those commands give irrelavent outpput to the problem.

That's not how it works here. Someone is volunteering their time to help you; so, in turn, you respect that courtesy by supplying the requested information, whether you think it is relevant or not.

You are absolutely right. I was not in a good mental state last night. I apologize. Here is the output you requested.
"lspci -k" - http://sprunge.us/FafT
"lsusb -v" - http://sprunge.us/IhaO

Again, my apologize for the rude reply.

Offline

#8 2017-06-30 20:06:33

BasementHacker
Member
From: Thee Basement
Registered: 2017-06-19
Posts: 40
Website

Re: [SOLVED] WiFi Dongle Changes MAC When Plugged In

Gosi wrote:

In case you are using network manager:
NetworkManager#Configuring_MAC_Address_Randomization

This doesn't seem to work at all. Every time I try to scan for networks it disables the interface, then brings it back up with a different MAC address. Any idea why?

Offline

Board footer

Powered by FluxBB