MAC address change

Report wireless and/or network connectivity problems in this forum.

Moderator: Moderators

Post Reply
User avatar
chigo58
Posts: 42
Joined: Wed Dec 22, 2010 5:09 am

MAC address change

Post by chigo58 »

Dear all,

I am attempting to change the mac address of the wifi interface using the traditional way of editing the /etc/config/wireless file and adding the option macaddr 'xx:xx:xx:xx:xx:73' line under 'radio0'.

The reason for this is that the router is connected as a WIFI client to my ISP and i wish to clone my MBP MAC address to the router.

Once I apply the change and reboot the router, the interface gets disabled and status is 'n/an/a'.

Can someone help me get this right?

Code: Select all

|----------------------------------------------------------------|
| Gargoyle version 1.6.1    | OpenWrt Attitude Adjustment branch |
| Gargoyle revision 87ce626 | OpenWrt revision r40423            |
| Built April 18, 2014      | Target  ar71xx/usb                 |
------------------------------------------------------------------
x2 Archer C5,C7 - Stock | x1 TL-WA730RE v1 - Openwrt 14.07 | x2 TL-WR1043ND v1.7 - Gargoyle v1.6.X http://goo.gl/VMbxcH | x2 WRT54GL v1.1 Tomato v1.28.7821 MIPSR1-Toastman-ND, 14929_vpn | x1 WHR-HP-G54 - Gargoyle 1.4.7

Spooky
Posts: 7
Joined: Mon Jan 12, 2015 10:42 am

Re: MAC address change

Post by Spooky »

Hi,

i know this thread is pretty old but I figured out how it works.

1. Connect to SSH

2. Install macchanger:

Code: Select all

opkg update

Code: Select all

opkg install macchanger
3. Disable Wifi Interface

Code: Select all

wifi down
4. Change MAC

For a random address:

Code: Select all

macchanger wifi0 -A
for a custom address:

Code: Select all

macchanger wifi0 -m BC:F4:11:6C:BC:58
5. Enable Wifi Interface again

Code: Select all

wifi up
6. Renew DHCP (via Webinterface for example)

Tested on Version 1.2.5 with FON2100

With the commands from 3. to 5. you could write a script to set the mac address at every boot

User avatar
chigo58
Posts: 42
Joined: Wed Dec 22, 2010 5:09 am

Re: MAC address change

Post by chigo58 »

Thank you :)
x2 Archer C5,C7 - Stock | x1 TL-WA730RE v1 - Openwrt 14.07 | x2 TL-WR1043ND v1.7 - Gargoyle v1.6.X http://goo.gl/VMbxcH | x2 WRT54GL v1.1 Tomato v1.28.7821 MIPSR1-Toastman-ND, 14929_vpn | x1 WHR-HP-G54 - Gargoyle 1.4.7

Spooky
Posts: 7
Joined: Mon Jan 12, 2015 10:42 am

Re: MAC address change

Post by Spooky »

Have a look at:

https://wiki.openwrt.org/doc/uci/wireless

It seems like you tried to edit the wifi-device configuration, which can't be used for changing the mac address:

macaddr MAC address yes/no (autodetected) Specifies the radio adapter associated to this section, it is not used to change the device mac but to identify the underlying interface.

You have to edit the wifi-iface Part to specify a custom mac address:

macaddr mac address no (hostapd/driver default) Overrides the MAC address used for the wifi interface.

option 'macaddr' '54:e6:fc:af:3b:1e'

for example.

I hope this helps too.

User avatar
ggravier
Posts: 14
Joined: Thu May 07, 2015 9:23 am
Location: Haute Savoie, France
Contact:

Re: MAC address change

Post by ggravier »

For some strange reason, with firmware 1.8.0, I can't install macchanger

Code: Select all

root@nzone:~# opkg update
Downloading package list for barrier_breaker_routing source...
Package list for barrier_breaker_routing downloaded successfully.

Downloading package list for gargoyle source...
Package list for gargoyle downloaded successfully.

Downloading package list for barrier_breaker_base source...
Package list for barrier_breaker_base downloaded successfully.

Downloading package list for barrier_breaker_packages source...
Package list for barrier_breaker_packages downloaded successfully.

Downloading package list for barrier_breaker_management source...
Package list for barrier_breaker_management downloaded successfully.

Downloading package list for barrier_breaker_telephony source...
Package list for barrier_breaker_telephony downloaded successfully.

root@nzone:~# opkg install macchanger
ERROR: No package named macchanger found, try updating your package lists

root@nzone:~#
Package removed? Possibility gone?

Cheers,
Gilles
Using Gargoyle on TP-Link TL-MR3040 v2 with custom WiFi MAC to run a Nintendo Zone router.

Post Reply