Jump to content

How to change wlan0 mac address after reboot ?


Dill

Recommended Posts

Hello,

I'd like to hide original pineapple mac addresses, even after a reboot.

Of course, by defaut eth0, wlan0 and br-lan have the same mac address (00:13:37:A5:0F:01).

So I added in /etc/init.d/network, in start() function :

macchanger --mac=01:02:03:04:05:06 eth0
macchanger --mac=01:02:03:04:05:06 wlan0

...where 01:02:03:04:05:06 is the new mac address I chose.

At reboot, the eth0 and br-lan interfaces are well configured, with the 01:02:03:04:05:06 mac address.

But the wlan0 interface keeps it's original mac address (00:13:37:A5:0F:01). :(

So I tried to fix the wlan0 mac address in /etc/config/wireless, and I used :

config wifi-device 'radio0'
    option type 'mac80211'
    option hwmode '11ng'
    option macaddr '01:02:03:04:05:06'
    [...]

But after a reboot the wlan0 interface keeps it's original mac address (00:13:37:A5:0F:01), and in the file /etc/config/wireless new configurations were automatically added at the bottom :

config wifi-device 'radio2'
    option type 'mac80211'
    option hwmode '11ng'
    option macaddr '00:13:37:A5:0F:01'
    [...]

config wifi-iface
    option device 'radio2'
    [...]

So, how to fix the mac address for wlan0, even after a reboot ?

Regards.

Link to comment
Share on other sites

Hi,

Thanks you ! That's perfect.

It works as requested.

Have a good day !

PS: for those who just want the simplicity, in the /etc/config/wireless write the

option macaddr '01:02:03:04:05:06'

not in the config wifi-device 'radio0'

but write it in the config wifi-iface section corresponding to radio0

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...