Why can't I change my MAC address?
14,850
To change the MAC adress of the wlan0
interface, run the following commands:
ifconfig wlan0 down
ifconfig wlan0 hw ether XX:XX:XX:XX:XX:XX
ifconfig wlan0 up
Verify:
ifconfig wlan0 |grep HWadd
Edit
Edit the 70-persistent-net.rules
configuration file:
nano /etc/udev/rules.d/70-persistent-net.rules
Change the MAC adress:
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:xx:xx:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
Replace xx:xx:xx:xx:xx:xx
then reboot your machine.
edit2
Using iproute2
Methode:
ip link set dev wlan0 down
ip link set dev wlan0 address XX:XX:XX:XX:XX:XX
ip link set dev wlan0 up
Author by
user3573987
Updated on September 18, 2022Comments
-
user3573987 over 1 year
I'm trying to change my MAC address using macchanger but it seems as if my device is not able to spoof a different address? I don't know but it seems as if no where has a solution to this.
root@kali:~# sudo macchanger -a wlan0 Current MAC: XX:XX:XX:XX:XX:XX (Apple) Permanent MAC: XX:XX:XX:XX:XX:XX (Apple) [ERROR] Could not change MAC: interface up or insufficient permissions: Too many open files in system root@kali:~#
What does this mean? 'interface up or insufficient permissions'. I've tried this:
sudo ifconfig wlan0 down sudo macchanger -a wlan0 sudo service network-manager restart
But I still get that error on the second command.
FYI:
root@kali:~# lspci | grep Wireless 03:00.0 Network controller: Broadcom Corporation BCM4360 802.11ac Wireless Network Adapter (rev 03) root@kali:~#
-
SarahG over 7 yearsAs a comment and not an answer, but not all hardware allows setting the mac address.
-
user3573987 over 7 yearsThe hardware is not the problem because I just tried it on OS X and it worked
-
-
user3573987 over 7 yearsSIOCSIFHWADDR: Too many open files in system
-
user3573987 over 7 yearsEven after running: ulimit -n 4096
-
user3573987 over 7 yearsroot@kali:/etc/udev/rules.d# ls 70-persistent-cd.rules 73-usb-net-by-mac.rules
-
user3573987 over 7 yearsand 70-persistent-cd.rules is empty. 73-usb-net-by-mac.rules is a bash file
-
GAD3R over 7 yearstry
systemd-udevd
wiki.archlinux.org/index.php/MAC_address_spoofing -
user3573987 over 7 yearsFile doesn't exist
-
user3573987 over 7 years(edit2): RTNETLINK answers: Too many open files in system. This is what happens. As you can see its the same answer everytime. 'Too many open files in system' Has this got something to do with there being extra drivers I didn't need to use still there?
-
user3573987 over 7 yearseven with SpoofMac, same thing: root@kali:~# spoof-mac.py randomize wlan0 RTNETLINK answers: Too many open files in system