Live data from Hacker News

Randomize your WiFi MAC address on Ubuntu

paulfurley.com

21–30 of 108 posts

Re: Randomize your WiFi MAC address on Ubuntu

#22
post #10

Are there any lawyers here that can speak about the legal side of this? I could imagine a wifi provider that offers 30 minutes free wifi e.g. airports, has this covered in their terms and conditions or a country that could consider this as fraudulent?

iPhones and Android phones do this for awhile already. If you read the article you'll notice that the MAC stays the same for a SSID for a working day. This makes sure it doesn't break networking and as a side effect captcha portal limits still work.

I believe iPhones and Android phones only do it while in scanning mode. Once connected, they use the real MAC address.

Re: Randomize your WiFi MAC address on Ubuntu

#24
MAC address randomization is in fact built in to NetworkManager (edit: 1.4), so none of this work is really necessary (edit: if you are on 1.4 or later).

NetworkManager also includes more advanced modes which make the MAC address stable for a given hotspot, but random between them.

https://blogs.gnome.org/thaller/2016/08/26/mac-address-spoof...

Re: Randomize your WiFi MAC address on Ubuntu

#25

MAC address randomization is in fact built in to NetworkManager (edit: 1.4), so none of this work is really necessary (edit: if you are on 1.4 or later). NetworkManager also includes more advanced modes which make the MAC address stable for a given hotspot, but random between them. https://blogs.gnome.org/thaller/2016/08/26/mac-address-spoof...

Unless you're using Ubuntu 16.04 LTS, in which case you're stuck with NetworkManager 1.2.

From the post: "I learned that NetworkManager 1.4.1+ can do MAC address randomization right out the box. If you’re using Ubuntu 17.04 upwards, you can get most of the way with this config file."

Re: Randomize your WiFi MAC address on Ubuntu

#26

Here https://blogs.gnome.org/thaller/2016/08/26/mac-address-spoof... is how you can do it with newer NetworkManager.

If anyone here's involved developing NetworkManager, it would be brilliant to see a 'stable-for-n-days' type setting. This would prevent a WiFi network tracking you over time, as well as between networks.

Re: Randomize your WiFi MAC address on Ubuntu

#27
post #12

Earlier quoted context omitted.

I am pretty sure that when iPhone connects to an access point it uses the real mac, I don't know about android but it is probably the same. Some access points need your real mac to connect because they use that to authorize you, I think schools/universities use this method a lot.

I do not understand though. Whitelisting MAC addresses is something you can do, but 99.99% of the wifi spots out there don't have it enabled. Why should my phone leak my MAC address needlessly instead of just generating a new one every 5 minutes or so?

If you connect to any hotspot with a captive portal, you would need to deal with the portal again every 5 minutes.

Re: Randomize your WiFi MAC address on Ubuntu

#28

Here is the code I use for my mac to randomize my mac address: interface="en0" new_mac=$(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/:$//; s/./0/2') # from stackoverflow sudo ifconfig $interface ether $new_mac Edit: What's the advantage of the solution in the post? If I just change my mac address every time I join a network (even the same one), they can't track me with my randomized mac addresses. So why would I pre…

Because maybe you had to pay to access the network and part of that involved binding your mac address.

For example, calling the hotel desk to get your device to work.

Post reply on HN