How to spoof the MAC on a wifi, Linux Mint 17, with NM?

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Luwu

How to spoof the MAC on a wifi, Linux Mint 17, with NM?

Post by Luwu »

Hey guys & girls.

I can't find a reliable way to spoof my mac.
If I use the "clone MAC address" on network manager (I use Linux Mint 17, Cinnamon), I can't connect to my wifi. I tried everything, unless I remove the cloned MAC address, I can't connect. There's no limit in place, no MAC address filtering on the access point.
I even tried setting it up using a script on boot (after removing the default network manager and installing wicd, since the default will impose its configuration when connecting).
Also, defining the config using /etc/network/interfaces.

All I got was intermitent results, I booted up, sometimes I had the spoofed MAC, sometimes the real one.

Anyone has been able to get consistent results by any means on this distro?

Thanks.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
1.618

Re: How to spoof the MAC on a wifi, Linux Mint 17, with NM?

Post by 1.618 »

Go into synaptic and install the package macchanger

then create a new script with

Code: Select all

sudo pluma /etc/init.d/macchanger 
and use these as the contents:
#!/bin/bash

# Disable the network devices
ifconfig eth0 down
ifconfig wlan0 down

# Spoof the mac addresses
/usr/bin/macchanger -r eth0
/usr/bin/macchanger -r wlan0

# Re-enable the devices
ifconfig eth0 up
ifconfig wlan0 up
Now that we have a script created in the /etc/init.d/ directory we need to set executable permissions on it by executing:

Code: Select all

sudo chmod +x /etc/init.d/macchanger
After this we need to enable the boot script with:

Code: Select all

sudo update-rc.d macchanger defaults 10
then in startup aplications you need to select machchanger,
( if it's not there then create a new start up app called 'macchanger' and use the following command

Code: Select all

/etc/init.d/macchanger
)

reboot and check your mac

Code: Select all

iwconfig
ifconfig
------------------

my start up looks like this
#!/bin/bash
sudo ifconfig eth0 down
sudo macchanger -m xx:xx:xx:xx:xx:xx eth0
sudo ifconfig eth0 up
exit 0


obviously my mac number isn't all x's so just insert whatever number you want there, for wifi change eth0 to wlan0 or whatever your card identifies itself as, use iwconfig if you need to find out.
PatH57

Re: How to spoof the MAC on a wifi, Linux Mint 17, with NM?

Post by PatH57 »

Hi,

once you have tried the previous post
Let us know if it works.
My router was clever enough to filter bogus MAC (found a table inside that blacklisted most commun non standard MAC it was filtering on the 6 first digits and kicking them out and except the obvious MAC filtering option nothing in the GUI nothing was pointing this out)

Good luck
Patrick
1.618

Re: How to spoof the MAC on a wifi, Linux Mint 17, with NM?

Post by 1.618 »

PatH57 wrote:Hi,

once you have tried the previous post
Let us know if it works.
My router was clever enough to filter bogus MAC (found a table inside that blacklisted most commun non standard MAC it was filtering on the 6 first digits and kicking them out and except the obvious MAC filtering option nothing in the GUI nothing was pointing this out)

Good luck
Patrick
My router has mac filtering but lets the fake macs through if i add them to the table....

are you making a random mac address up? you could something like this if you need to know what standard vendors use

https://code.wireshark.org/review/gitwe ... in;f=manuf
PatH57

Re: How to spoof the MAC on a wifi, Linux Mint 17, with NM?

Post by PatH57 »

Thanks,

my problem was fixed a year or so ago, I used a generator and fixed the 6 first digits to use standard known MAC (I think it is the scrypt provided) alas I was running Kali and backtrack not Mint.
It was just to point out that my router was clever enough to block my own connection when using a spoofed MAC :mrgreen:
Again please try the first post and let us know if it works,
Locked

Return to “Networking”