Can somebody help me with script (MAC generator)?

Hi

Can somebody write MAC (and BSSID) randomiser script for me?

I am total noob in programming, I only know how to use SSH.

I need script that will randomise my MAC each reboot. Not necessary to be GUI one. Just script to put into init.d will be enough.

I want to change only MAC (and BSSID) on all visible interfaces, not IMEI, nor other information.

I will be extremely pleased if someone will help me with this.

"kernel": "5.15.134",    
        "system": "Qualcomm Atheros QCA9533 ver 2 rev 0",
        "model": "GL.iNet GL-E750",
        "board_name": "glinet,gl-e750",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.0",
                "revision": "r23497-6637af95aa",
                "target": "ath79/nand",
                "description": "OpenWrt 23.05.0 r23497-6637af95aa"

See if this suits your needs: How to randomize the WAN Mac address on each reboot? - #11 by LEDEuser

P.S. Can you change the title of this thread to include random MAC address

I don’t understand, it seems to change only WAN mac. How to change all MACs including BSSID?

Done!

The MAC of the radios is usually derived from the WAN MAC.
however changing it can have unwanted side effect if you are directly connected to a modem in bridge mode, in that case you have to restart the modem so that it can learn the new MAC address.

If you only want to change the MAC of the radios then you can set it under devices.

In the script substitute the WAN MAC for the radio device MAC

Changing MAC address presented to Network - #3 by pavelgl ?
LAN IP can be changed in the same manner.

I know that. When I changed it manually - no problems appeared. At all. Even devices not disconnected (Android). And yes I double checked. MAC really changed.

It is travel router, I don’t want someone to track my visits by MACs

you're aware your MAC isn't shared across internet, right ?

1 Like

Well in that case it can be advantageous that you also change WAN MAC

Not internet. Router broadcasts BSSID. By this I can be tracked

it is then shared across internet ?

1 Like

I am looking for script that will change MAC on all interfaces. There is plenty of methods to track user by MAC. That’s why phones have MAC randomisation.

Once more it is travel (not home) router. So it is needed. At home connections it is probably redundant

It is shared across near devices. They can track me when I connect as repeater mode.

not really, they randomize the MAC while "sniffing" the hotspots, not once they're connected.

and this is bad, because they can then see all your traffic (which is encrypted btw) ?

1 Like

Found this one (link) (uploaded to Proton Drive)

Found here

Needs to be tested by somebody. As I see it should be just run anywhere.

I will NOT recommend to use anything until someone from support or community will confirm that this works or no

Can somebody test please? I have no PC right now to revert back if something will go wrong…

This script will take all available interfaces/devices including the WAN and puts a randomized MAC on it not sure if that is what you want.

I did not test it though so no guarantee it does not wreak havoc

Radio macs can be randomized to confuse wifi assisted positioning, like to help with fitness tracker app on a rainy day. It is on AP config menus. Your provider can link your subscription to ip at any moment, no way out.

I need random BSSID, random Radio MAC, random WAN mac, random repeater MAC

Devices? Like modem? Or what?

No problem. I a using VPN. The main issue - that my TRAVEL router broadcasts BSSID that can be added to location database or WAN MAC when I connect as repeater mode which can be used to track myself…

In short I need as private as possible travel router that share as less real information as possible.

Openwrt can randomize AP MAC aka bssid on each radio restart
ap/advanced in lower section/mac address

I know. I need to randomise ALL MACs that can somehow be visible by someone