How to change WLAN MAC ADDRESS Permanently

hello, sorry about my noob question. I just started playing with OpenWRT, and I did some experiments on changing MAC Address, I can change Mac Address of interface and BSSID wireless. but I can't change MacAddress on the Associated Stations tab.

let me explain my condition, I have an ISP with username and password needed. but they also need specific MAC ADDRESS in order to validate my username and password, I watched tutorials but most of them are using Breed to change the MAC, and I spend 45 minutes just try to enter Breed and stills can't. so is there a way to change WLAN MAC by modifying a file? Thank you.

Do you connect via WiFi to your ISP? If not, the WiFi MAC address is irrelevant and you need to change the MAC address of your wan interface.

1 Like

yes I connect it via WiFi.

OK, then please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network
cat /etc/config/wireless

But basically, you need to add an option macaddr 'xx:xx:xx:xx:xx:xx' to your client's wifi-iface stanza as described here

1 Like

/etc/config/network

config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'

config globals 'globals'
	option ula_prefix 'xxxx:xxxx:xxxx::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0.1'
	option proto 'static'
	option netmask 'xx.xx.xx.0'
	option ip6assign 'xx'
	option ipaddr 'xx.xx.xx.xx'

config device 'lan_eth0_1_dev'
	option name 'eth0.1'
	option macaddr 'xx:xx:xx:xx:xx:xx'

config interface 'wan'
	option ifname 'eth0.2'
	option proto 'dhcp'
	option metric '30'
	option type 'bridge'

config device 'wan_eth0_2_dev'
	option name 'eth0.2'
	option macaddr 'xx:xx:xx:xx:xx:xx'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option ports '0 1 2 3 6t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '4 6t'

config interface 'wwan1'
	option proto 'dhcp'
	option metric '10'

config interface 'wwan2'
	option proto 'dhcp'
	option metric '20'

config interface 'wwan'
	option proto 'dhcp'

/etc/config/wireless

config wifi-device 'radio0'
	option type 'mac80211'
	option hwmode '11a'
	option path 'pci0000:00/0000:00:00.0/0000:01:00.0'
	option rts '2304'
	option beacon_int '50'
	option distance '2'
	option frag '1000'
	option country '00'
	option channel 'auto'
	option disabled '1'

config wifi-device 'radio1'
	option type 'mac80211'
	option hwmode '11g'
	option path 'platform/10180000.wmac'
	option htmode 'HT20'
	option rts '2347'
	option beacon_int '100'
	option distance '2000'
	option frag '2346'
	option channel 'auto'
	option country '00'

config wifi-iface 'wifinet0'
	option ssid 'NOT THIS ISP'
	option encryption 'none'
	option device 'radio1'
	option mode 'sta'
	option network 'wwan wan'

config wifi-iface 'wifinet1'
	option ssid 'THIS ISP'
	option device 'radio0'
	option mode 'sta'
	option network 'wwan'
	option password 'xxxx'
	option encryption 'wpa2'
	option eap_type 'peap'
	option identity 'xxxxxxx'
	option auth 'EAP-MSCHAPV2'


So you've got two client interfaces, wifinet0 and wifinet1 defined. Neither has option macaddr 'xx:xx:xx:xx:xx:xx' set. What happens if you add this option with the correct MAC address?

What are the interfaces wwan1 and wwan2?

1 Like

But basically, you need to add an option macaddr 'xx:xx:xx:xx:xx:xx' to your client's wifi-iface stanza as described here

Yes, I already did it, but it only changes the MAC of the Interface and if I change wifinet inside the wireless file it only changes the BSSID. and the Mac on the Associated Stations Tab still does not changed.

What are the interfaces wwan1 and wwan2 ?

I don't use them. Still learning, so I tried everything. sorry english is not my first language.

I think I need to use Breed in order to change the MAC. but I need to somehow inject it to my firmware.

I might missunderstand something, but the on the Associated Stations Tab you'll see only the MAC of the devices connected to your OpenWrt router.
Not the MAC of the wifi interface of your router itself.
Or was the picture only meant as an example?