Everytime I spoof my mac-adress on Ubuntu using different approaches including macchanger it auto resets as soon as I actually try to reconnect to the network.

This is what my problem looks like:
TERMINAL ENTRY before reconnection

root@M-Linux:~# macchanger -s wlp2s0
Current MAC:   XY (changed, obviously) (Hon Hai Precision Ind. Co.,Ltd.)
Permanent MAC: XY (Hon Hai Precision Ind. Co.,Ltd.)
root@M-Linux:~# ifconfig wlp2s0 down
root@M-Linux:~# macchanger -rb wlp2s0
Current MAC:   XY (Hon Hai Precision Ind. Co.,Ltd.)
Permanent MAC: XY (Hon Hai Precision Ind. Co.,Ltd.)
New MAC:       AB (unknown)
root@M-Linux:~# ifconfig wlp2s0 up
root@M-Linux:~# macchanger -s wlp2s0
Current MAC:   AB (unknown)
Permanent MAC: XY (Hon Hai Precision Ind. Co.,Ltd.)

Then I reconnect to the WIFI and then this happens

root@M-Linux:~# macchanger -s wlp2s0
Current MAC:   XY (Hon Hai Precision Ind. Co.,Ltd.)
Permanent MAC: XY (Hon Hai Precision Ind. Co.,Ltd.)

So the mac is back to normal.

I tried this on kubuntu 16.04.3 and another debian-based distro.

I tried it on my home and a public network. I tried it on two different machines: HP and Acer Notebooks.

Exact same results every time and NO information about the issue on the web.

What should I do?


3 Answers 3


This askubuntu Q&A suggest the following commands to be execute on Ubuntu:

sudo ifconfig wlan0 down
sudo macchanger -a wlan0
sudo ifconfig wlan0 up
  • I know, and it works. Until it's being resetted when I try to reconnect to the wifi network. So what I really need is a way to keep another program (I suppose NetworkManager) from resetting it
    – NoBullsh1t
    Commented Aug 14, 2017 at 13:52

I came across with this problem a few days ago after updating "Kali”.

I use Kali Linux 2016.2 (64 bit), by the way. Before updating/upgrading the system through its repositories, mac changer was working like a charm.

However, soon after the update, I tried to spoof my MAC address in order to bypass some MAC filtering I've set up in my own network, and every time I attempted to do it (and there were several tries), my MAC address was automatically reverted to, or its permanent burnt-in address, or a random one.

At first, I was not sure about what could be possibly causing it, but after doing some tests, using different devices, tools and setups, I found out that the issue was being originated by Network Manager, which I realized later being not an issue exactly, but just a different default configuration of the service than the one we were used to.

The latest versions of Network Manager, 1.4.2, in this particular case, implement several configuration options for MAC spoofing/cloning, and when put in use, these options tend to override any configurations set by tools like mac changer and macchito, making them practically useless.

It turns out that, in its newer versions (above 1.2, but more notably the versions above 1.4, which dispenses wpa_supplicant support for this purpose), NetworkManager default configurations are set to randomize your MAC address or revert it to the permanent one at the moment your interface scans the networks around you or attempt to connect into one of them. This new feature is very interesting for purposes of anonymity; for MAC spoofing, however, it can complicate the authentication process.

Disabling this feature is very simple, you'll just need to change some NetworkManager's configurations.

You can do this either by editing /etc/NetworkManager/NetworkManager.conf file or adding an additional .conf file to /etc/NetworkManager/conf.d directory (the .conf file can have any name).

Though I highly recommend the second option, given that when updated, Network Manager usually replaces its main .conf file, and if you choose the first option, your saved options may be overwritten when the service gets these updates from time to time.

Whatever option you choose, in the text editor, add the following lines: Code:



Then save the file, and inside the terminal, restart NetworkManager by typing in: Code:

service network-manager restart


systemctl restart NetworkManger

And it's done, the problem now should have been resolved.


When you restart the network interface, the network manager reloads the default configuration stored in /etc/network/interfaces. On Ubuntu, this is the standard way to change MAC address temporarily:

/etc/init.d/networking stop
ifconfig wlp2s0 hw ether 02:01:02:03:04:08
/etc/init.d/networking start 

If you want to add it permanently, add it to /etc/network/interfaces:

iface wlp2s0 inet static
hwaddress ether 02:01:02:03:04:08
  • Thank you, but unfortunately that didn't work. The first option is being resettet when I connect to the network, just as my way was before. The second option keeps the network from being connected to completely
    – NoBullsh1t
    Commented Aug 13, 2017 at 13:15
  • @NoBullsh1t what happens when you omit ether in the hwaddress line?
    – Nils
    Commented Jan 30, 2021 at 21:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .