TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Randomize your WiFi MAC address on Ubuntu

211 pointsby paulfurleyover 7 years ago

24 comments

kawsperover 7 years ago
NSA MAC address prefix is 00:20:91, you can combine this knowledge with the one from the article to scare your sysadmins.
评论 #15839982 未加载
评论 #15839226 未加载
评论 #15838464 未加载
conradkover 7 years ago
I&#x27;ve found GNU macchanger to be the easiest way to do that kind of stuff. It&#x27;s as simple as:<p>macchanger -r &lt;interface&gt;<p>Interesting article about macchanger on the Arch Wiki: <a href="https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;index.php&#x2F;MAC_address_spoofing" rel="nofollow">https:&#x2F;&#x2F;wiki.archlinux.org&#x2F;index.php&#x2F;MAC_address_spoofing</a>
评论 #15838208 未加载
krrrhover 7 years ago
It’s worth noting that iOS has randomized MAC addresses in WiFi probes since iOS 8.[1] As far as I know your real MAC address is exposed upon connection. I’m curious to what extent other vendors have implemented this strategy.<p>[1] <a href="https:&#x2F;&#x2F;arstechnica.com&#x2F;gadgets&#x2F;2014&#x2F;06&#x2F;ios8-to-stymie-trackers-and-marketers-with-mac-address-randomization&#x2F;" rel="nofollow">https:&#x2F;&#x2F;arstechnica.com&#x2F;gadgets&#x2F;2014&#x2F;06&#x2F;ios8-to-stymie-track...</a>
评论 #15841230 未加载
评论 #15839774 未加载
评论 #15840036 未加载
digganover 7 years ago
I&#x27;ve used <a href="https:&#x2F;&#x2F;github.com&#x2F;feross&#x2F;SpoofMAC" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;feross&#x2F;SpoofMAC</a> 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&#x27;re usually dealing with multiple different OSes and don&#x27;t want to remember how to do it for each.
评论 #15837509 未加载
评论 #15838230 未加载
racer-vover 7 years ago
Note that your MAC address is only one part of the identifying information your computer gives to the DHCP server. For another approach check out DHCPcAnon:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;juga0&#x2F;dhcpcanon" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;juga0&#x2F;dhcpcanon</a><p>You can contribute to the development of this project by helping to integrate it with your favorite WiFi manager.
评论 #15840375 未加载
评论 #15839515 未加载
microcolonelover 7 years ago
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).<p>NetworkManager also includes more advanced modes which make the MAC address stable for a given hotspot, but random between them.<p><a href="https:&#x2F;&#x2F;blogs.gnome.org&#x2F;thaller&#x2F;2016&#x2F;08&#x2F;26&#x2F;mac-address-spoofing-in-networkmanager-1-4-0&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blogs.gnome.org&#x2F;thaller&#x2F;2016&#x2F;08&#x2F;26&#x2F;mac-address-spoof...</a>
评论 #15838325 未加载
throwmenow_0140over 7 years ago
Here is the code I use for my mac to randomize my mac address:<p><pre><code> interface=&quot;en0&quot; new_mac=$(openssl rand -hex 6 | sed &#x27;s&#x2F;\(..\)&#x2F;\1:&#x2F;g; s&#x2F;:$&#x2F;&#x2F;; s&#x2F;.&#x2F;0&#x2F;2&#x27;) # from stackoverflow sudo ifconfig $interface ether $new_mac </code></pre> Edit: What&#x27;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&#x27;t track me with my randomized mac addresses. So why would I prefer to keep a stable but randomized mac address for each network I connect to for a day?
评论 #15839442 未加载
评论 #15839700 未加载
评论 #15838426 未加载
dbolgheroniover 7 years ago
In OpenBSD, it&#x27;s just:<p><pre><code> # ifconfig iwn0 lladdr random </code></pre> Of course, <i>iwn0</i> is your interface.
评论 #15838317 未加载
microcolonelover 7 years ago
On systemd-networkd, you can add<p><pre><code> [Link] MACAddressPolicy=random </code></pre> and (for RFC 7844[13] DHCP Anonymity Profiles)<p><pre><code> [DHCP] Anonymize=true </code></pre> to your network unit or link.
bgaluszkaover 7 years ago
Here <a href="https:&#x2F;&#x2F;blogs.gnome.org&#x2F;thaller&#x2F;2016&#x2F;08&#x2F;26&#x2F;mac-address-spoofing-in-networkmanager-1-4-0&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blogs.gnome.org&#x2F;thaller&#x2F;2016&#x2F;08&#x2F;26&#x2F;mac-address-spoof...</a> is how you can do it with newer NetworkManager.
评论 #15838338 未加载
JepZover 7 years ago
Btw. if you want to use a random mac address just for one specific network you can simply add the following to the [wifi] section of the config file for that network (&#x2F;etc&#x2F;NetworkManager&#x2F;system-connections&#x2F;):<p><pre><code> cloned-mac-address=random </code></pre> That way every time you connect to that network you will have a new, valid mac address.
评论 #15840308 未加载
larrykwgover 7 years ago
This seems like a good idea until you realize that you are the only one using a random mac address. (There is a vendor prefix at the beginning of every mac) Better would be to take a bit more care in choosing a more realistic address.
评论 #15838490 未加载
评论 #15838225 未加载
buildbuildbuildover 7 years ago
Be aware that this technique could be illegal or appear suspicious in some jurisdictions. MAC address randomization was mentioned in Aaron Swartz&#x27;s indictment for wire fraud.<p>See page 7: <a href="https:&#x2F;&#x2F;www.wired.com&#x2F;images_blogs&#x2F;threatlevel&#x2F;2012&#x2F;09&#x2F;swartzsuperseding.pdf" rel="nofollow">https:&#x2F;&#x2F;www.wired.com&#x2F;images_blogs&#x2F;threatlevel&#x2F;2012&#x2F;09&#x2F;swart...</a>
评论 #15838941 未加载
partycoderover 7 years ago
Your router MAC address is tracked by Google Location services. They do this with their wardriving vehicles and from Android phones.
评论 #15839405 未加载
PascLeRascover 7 years ago
Will these new randomized MACs also be lookupable [1] to find the model? If I&#x27;m the feds running honeypot wifi and I see a different Dell Chromebook doing things interesting to me every day, this isn&#x27;t a good cover.<p>[1] <a href="https:&#x2F;&#x2F;www.macvendorlookup.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.macvendorlookup.com&#x2F;</a>
评论 #15838460 未加载
评论 #15838458 未加载
just1nnover 7 years ago
Where would MAC address capture occur on the network? MACs are local to L2 traffic, so once a frame turns into a packet and is routed, the sMAC of your PC is no longer present in the data. If you&#x27;re on your home network, this has no impact what so ever.
评论 #15839934 未加载
评论 #15839494 未加载
mobilemidgetover 7 years ago
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?
评论 #15837531 未加载
pedrocrover 7 years ago
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&#x27;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.
评论 #15838628 未加载
评论 #15837376 未加载
评论 #15839573 未加载
throwaway613834over 7 years ago
Confused, I thought many chips (like some&#x2F;many Intel ones) don&#x27;t let you spoof the MAC address?
评论 #15839596 未加载
andrewshaduraover 7 years ago
Unfortunately, this isn&#x27;t compatible with a bunch of popular wireless cards, mostly from Realtek.
评论 #15840966 未加载
评论 #15839561 未加载
jimmaswellover 7 years ago
I recently noticed that Windows 10 has that feature too, which came as a surprise to me
emmelaichover 7 years ago
What about bluetooth? And does NFC have an hardware address?
SubiculumCodeover 7 years ago
Is there a good (trustworthy) one for android?
L_user6871over 7 years ago
How do you do that? &lt;&#x2F;p&gt;