Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Changing MAC address has no effect
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
CPUFan
n00b
n00b


Joined: 21 May 2015
Posts: 58

PostPosted: Mon Jul 11, 2016 8:47 pm    Post subject: Changing MAC address has no effect Reply with quote

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:

Code:
# 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.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Tue Jul 12, 2016 10:40 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7001

PostPosted: Tue Jul 12, 2016 10:53 am    Post subject: Reply with quote

you need net-analyzer/macchanger for that option, did you have it?
Back to top
View user's profile Send private message
CPUFan
n00b
n00b


Joined: 21 May 2015
Posts: 58

PostPosted: Tue Jul 12, 2016 7:25 pm    Post subject: Reply with quote

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...
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3652
Location: Hamburg

PostPosted: Tue Jul 12, 2016 8:09 pm    Post subject: Reply with quote

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 ...
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6738
Location: Blighty

PostPosted: Wed Jul 13, 2016 9:09 am    Post subject: Reply with quote

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?
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3652
Location: Hamburg

PostPosted: Wed Jul 13, 2016 9:27 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6738
Location: Blighty

PostPosted: Wed Jul 13, 2016 10:43 am    Post subject: Reply with quote

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 :)
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3380

PostPosted: Wed Jul 13, 2016 3:21 pm    Post subject: Reply with quote

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.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1361
Location: Montréal

PostPosted: Thu Jul 14, 2016 12:34 pm    Post subject: Reply with quote

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:
Code:
ip link set dev wlan0 address xx:xx:xx:xx:xx:xx

_________________
Paul
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum