• WarmSoda@lemm.ee
    link
    fedilink
    arrow-up
    99
    ·
    1 year ago

    Let’s pretend someone didn’t know how to do that on an android. How would you explain it to them?

    • /home/pineapplelover@lemm.ee
      link
      fedilink
      arrow-up
      115
      ·
      1 year ago

      On android when you go to the wifi settings you’re currently connected to there should be a setting for randomizing mac address per connection or per network. If you change it to per connection, once you disconnect and reconnect your mac address should change. On per network, it will randomly generate the mac address for the first connection and keep that address for that wifi forever.

        • AnarchistArtificer@slrpnk.net
          link
          fedilink
          arrow-up
          4
          ·
          1 year ago

          Thanks for asking the question! I’ve never needed to know it, and I’ve done enough android tinkering that I’m fairly sure I could find it quite easily if needed, but I enjoy my social media being peppered with bits of learning wherever possible. I’m a big fan of ambient curiosity

        • /home/pineapplelover@lemm.ee
          link
          fedilink
          arrow-up
          3
          ·
          1 year ago

          Yeah, recently I was on school wifi and it kept bothering me to log in and figured I needed to switch to per network or it would bother me everytime to sign into the captive portal.

        • SuperIce@lemmy.world
          link
          fedilink
          English
          arrow-up
          31
          ·
          1 year ago

          On stock (Pixel) Android, if you enable Developer Options, there is a setting under Networking called “Wi-Fi non-persistent MAC randomization” that randomizes the MAC per connection for networks that have randomization enabled.

          • SteveTech@programming.dev
            link
            fedilink
            English
            arrow-up
            4
            ·
            1 year ago

            I don’t have a Samsung, but I’m pretty sure that’s still randomised per network, per connection can be enabled in the developer options somewhere.

            • derock@lemmy.derock.dev
              link
              fedilink
              English
              arrow-up
              6
              ·
              1 year ago

              I have a Samsung and it’s per network, even if you forget and rejoin it keeps the same random Mac address. You need to enable a developer setting to have it randomize when you join.

          • Tibert@compuverse.uk
            link
            fedilink
            arrow-up
            2
            ·
            1 year ago

            Per connexion would be pretty bad. Per network.

            Let’s say you want to set a static DHCP ip from your router. The only way to do so (from the router, I’m not talking from the phone), is by assigning an IP to a MAC address.

            If the address is randomised per connection, affecting a static DHCP ip would be impossible.

            Another thing a router often has is some sort of dhcp memory. It remembers the ip it gave to a certain MAC address for some time, then when the device connects back, it assigns the same IP it had before.

            So if the ip changes each time either the MAC address changes each time (not sure it’s default), or the router has no memory.

            • example@reddthat.com
              link
              fedilink
              arrow-up
              2
              ·
              1 year ago

              for a device without inbound connectors and no ip based lan firewall rules, which applies to most phones, random per connection macs seem like a pretty good default for privacy.

              some networks doing “unusual” things like hotel wifi limiting you to few devices (implemented by mac counting) may be thrown off though.

              • jasondj@ttrpg.network
                link
                fedilink
                arrow-up
                1
                ·
                1 year ago

                I’ve run samba servers from my phones in the past (android, at least) which was nice for a “portable file server” when out and about.

                • example@reddthat.com
                  link
                  fedilink
                  arrow-up
                  2
                  ·
                  1 year ago

                  I didn’t say there were no use cases for this, but the average phone user will not need it. someone using samba on their phone would likely be capable of switching the network config to not randomize every time.

            • Fosheze@lemmy.world
              link
              fedilink
              English
              arrow-up
              2
              arrow-down
              1
              ·
              edit-2
              1 year ago

              That’s the point though. The address is randomized per connection specifically so the device can’t be identified. It’s to prevent tracking, blocking, or assigning, anything based on mac address without the device owners knowledge. Every time your phone connects the network has to treat it like a new device. If it was randomized per network that would defeat the point.

              I personally can’t think of any reason you would need a static IP on your phone but if you did then you should know enough to know how to turn off the randomized mac address. You can even change the setting per network so if you need a static ip at home then you just set your phone to use a static mac address on your home network and continue using a randomized one on every other network.

    • Steeve@lemmy.ca
      link
      fedilink
      arrow-up
      100
      arrow-down
      6
      ·
      1 year ago

      Just google it you dumb piece of shit - Stack overflow user

      Marked as duplicate

    • FooBarrington@lemmy.world
      link
      fedilink
      arrow-up
      8
      arrow-down
      4
      ·
      1 year ago

      Most Android phones have an option to randomize MAC per WiFi, enabled by default. Maybe you can trigger a new MAC by forgetting the network and reconnecting?

      • SuperIce@lemmy.world
        link
        fedilink
        English
        arrow-up
        7
        ·
        1 year ago

        If you enable Developer Options, there is a setting under Networking called “Wi-Fi non-persistent MAC randomization” that randomizes the MAC per connection for networks that have randomization enabled.

    • notthebees@reddthat.com
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      There was a way to do it on older Android phones with a specific Mac address changer but it broke after android 6 got released.

  • jetsetdorito@lemm.ee
    link
    fedilink
    arrow-up
    62
    ·
    1 year ago

    fun fact, an early iPhone jailbreak would always change the phones wifi mac to the same address, so there was a meme for a while that if you had a jailbroken iPhone you couldn’t use airport wifi

    • cordlesslamp@lemmy.today
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      Why would anyone do that? If there’s 2 jailbreak iphones on the same network then non of them would have internet access due to IP conflict?

  • navi@lemmy.tespia.org
    link
    fedilink
    arrow-up
    49
    ·
    1 year ago

    This comes back to bite you when you purchase in-flight wifi which is tied to your MAC address. Make sure to disable that option for the in-flight access point!

    • derock@lemmy.derock.dev
      link
      fedilink
      English
      arrow-up
      20
      ·
      1 year ago

      on an AA flight I was recently on, they gave out free 20 mins of internet for watching a 15s ad, but this was once per device type of deal. In this case, turning on randomized mac addresses meant I get free inflight wifi for the entire flight!

      • mindbleach@lemmy.world
        link
        fedilink
        arrow-up
        25
        arrow-down
        1
        ·
        1 year ago

        Why, did they add a week-long quarantine in baggage check? It’s an airport. The whole point is to show up and leave. Even if the wait lasts longer than the flight.

        If your ass in there longer than 24 hours, the wifi should be considered an apology.

    • malloc@programming.dev
      link
      fedilink
      arrow-up
      5
      ·
      1 year ago

      Long time ago, it was probably due to overcrowding. Very easy to get shit quality of service once it hits a certain time of day.

      But with advances in wireless technology (backhaul, 5Ghz, MIMO, …) I think that’s no longer the case.

  • kool_newt@lemm.ee
    link
    fedilink
    English
    arrow-up
    12
    ·
    edit-2
    1 year ago

    I use this to make MACs for my VMs and virtual NICs. The 00:16:3E prefix means it’s Xen virtualization, so change this part as needed.

    #!/usr/bin/python
    
    # macgen.py script to generate a MAC address for guests on Xen
    
    import random
    
    def randomMAC():
    	mac = [ 0x00, 0x16, 0x3e,
    		random.randint(0x00, 0x7f),
    		random.randint(0x00, 0xff),
    		random.randint(0x00, 0xff) ]
    	return ':'.join(map(lambda x: "%02x" % x, mac))
    
    print (randomMAC())
    

    Use

    $ macgen.py 
    00:16:3e:17:ed:b1
    
  • radix@lemm.ee
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    In general, I thought IP addresses are mutable while MACs stay the same, and I thought that’s why the outside world uses IPs to identify networks while routers inside a network use MACs to identify specific devices. If you can change your MAC arbitrarily, doesn’t that risk making the router’s job more difficult? Why not just assign yourself a different internal IP?

    • ramjambamalam@lemmy.ca
      link
      fedilink
      arrow-up
      18
      arrow-down
      1
      ·
      edit-2
      1 year ago

      Changing your MAC will make older messages undeliverable, but that just means the connection will be momentarily interrupted until you establish new connections after re-connecting to the WiFi.

      Why not just assign yourself a different internal IP? Because a. the router probably wants to assign you one itself via DHCP; and b. the router isn’t looking at your IP address to lock you out; it’s looking at your MAC address.

      If your IP address is where in cyberspace you are, a MAC address is who you are. If you want to fool the bouncer, change your name, not your address.

      • radix@lemm.ee
        link
        fedilink
        arrow-up
        3
        ·
        1 year ago

        I see! Thanks for the explanation! Didn’t put two and two together to realize that the router basically reads MACs and writes IPs.

    • fneu@discuss.tchncs.de
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      The router recognizes a device based on its MAC and assigns an IP address. Traditionally, the MAC stays the same, so you’re right. In this case, OP doesn’t want to be recognized by the (airport) router. There is software for spoofing the MAC address for most platforms. Changing the MAC address has recently become more popular due to privacy concerns and on some operating systems it’s supported out of the box.

  • fidodo@lemm.ee
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    Are there airports that still do this? Every airport I’ve been to in the last decade has had free Wi-Fi.