Live data from Hacker News

Randomize your WiFi MAC address on Ubuntu

paulfurley.com

1–10 of 108 posts

Re: Randomize your WiFi MAC address on Ubuntu

#2
This seems like it should be a default indeed. It does make it harder to assign fixed addresses to your devices in your home network. At least openwrt only seems to have static DHCP leases based on MAC and not on the advertised DHCP name. For most devices this doesn't matter as it does add a DNS entry with whatever IP it assigned. But when you then want to add a firewall rule to port forward something to a device a fixed IP is much nicer.

Re: Randomize your WiFi MAC address on Ubuntu

#3
post #2

This seems like it should be a default indeed. It does make it harder to assign fixed addresses to your devices in your home network. At least openwrt only seems to have static DHCP leases based on MAC and not on the advertised DHCP name. For most devices this doesn't matter as it does add a DNS entry with whatever IP it assigned. But when you then want to add a firewall rule to port forward something to a device a f…

True - I could update the script to allow for whitelisting certain networks so they receive a stable-forever MAC address..?

Re: Randomize your WiFi MAC address on Ubuntu

#4
post #2

This seems like it should be a default indeed. It does make it harder to assign fixed addresses to your devices in your home network. At least openwrt only seems to have static DHCP leases based on MAC and not on the advertised DHCP name. For most devices this doesn't matter as it does add a DNS entry with whatever IP it assigned. But when you then want to add a firewall rule to port forward something to a device a f…

True - I could update the script to allow for whitelisting certain networks so they receive a stable-forever MAC address..?

That would probably make a lot of sense. Can the network manager setting also be changed per network? It would be nice to do this with the normal config in the future.

Re: Randomize your WiFi MAC address on Ubuntu

#5
post #4

Earlier quoted context omitted.

True - I could update the script to allow for whitelisting certain networks so they receive a stable-forever MAC address..?

That would probably make a lot of sense. Can the network manager setting also be changed per network? It would be nice to do this with the normal config in the future.

Yes, in network manager 1.4.1+ (ubuntu 17.04+) you can set each network to `random` or `stable` as well as a global default for new networks. This config file updates the global default (but I can't use it yet!): https://gist.github.com/paulfurley/978d4e2e0cceb41d67d017a66...

Re: Randomize your WiFi MAC address on Ubuntu

#7
I've used https://github.com/feross/SpoofMAC in the past, which is a simple python tool for doing just this, cross-platform. Used it a lot in airports and can warmly recommend using it if you're usually dealing with multiple different OSes and don't want to remember how to do it for each.

Re: Randomize your WiFi MAC address on Ubuntu

#8
post #7

I've used https://github.com/feross/SpoofMAC in the past, which is a simple python tool for doing just this, cross-platform. Used it a lot in airports and can warmly recommend using it if you're usually dealing with multiple different OSes and don't want to remember how to do it for each.

Looks cool. I wish there was something like this for iPhone/iPad - which is much more likely to be with me everywhere and leak my MAC...

side note/question: do I need to actively connect to a WIFI network for them to know my MAC or does it leak even when my phone scans for neighbouring SSIDs? EDIT: looks like MAC would leak even if I don't connect to any access point, but my Wifi is on... At least according to [0]

EDIT 2: looks like iPhone and Android use MAC randomization when scanning WIFI. (not sure after they connect though). But even this randomization can be defeated[1]?

[0] https://www.crc.id.au/tracking-people-via-wifi-even-when-not... [1] https://www.theregister.co.uk/2017/03/10/mac_address_randomi...

Re: Randomize your WiFi MAC address on Ubuntu

#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.
Post reply on HN