0

So I want to spoof my MAC address. However when I do so I am unable to connect to any networks. After changing it back to the physical MAC address of the network card, it works just fine.

It worked on Windows, so it can't be a problem with my router.

Please do not ask me why I want to spoof it, that won't help anyone.

Running Ubuntu MATE 15.04 connecting through WLAN.

2
  • what method are you using; are you using macchanger, network-manager, or both?
    – mchid
    Jun 23, 2015 at 2:08
  • sudo ifconfig wlan0 hw ether 00:11:22:33:44:55
    – Ketchup901
    Jun 25, 2015 at 9:00

1 Answer 1

0

First, change everything back to default so that everything is in working order.

Next, run the following commands to install macchanger; macchanger is a command line tool developed for the purpose of changing your mac address:

sudo apt-get update
sudo apt-get install macchanger

You may be asked if you want to run automatically. You can choose yes or no.

For testing purposes, I have selected no, however, you may find this option useful. There is no guarantee the real MAC address will not be leaked. This option can be changed or set by editing the file /etc/default/macchanger, setting to ENABLE_ON_POST_UP_DOWN=true or ENABLE_ON_POST_UP_DOWN=false . Again, for testing purposes here, I have this set to ENABLE_ON_POST_UP_DOWN=false.


Usage:

To set the MAC address of wlan0 to 00:11:22:33:44:55, run the following commands:

sudo ifconfig wlan0 down
sudo macchanger --mac 00:11:22:33:44:55 wlan0
sudo service network-manager restart

Then, to show the current MAC address:

macchanger -s wlan0

For a list of options:

macchanger -h

Also, you may want to look into the "pretend to be a burned in address" -bia option.


Finally, I'm not sure how your IPV6 address will be impacted so that may be something you might want to pay attention to.


See also:

man macchanger

the GUI version: macchanger-gtk

and:

anonscm.debian.org/cgit/collab-maint/macchanger.git

github.com/alobbs/macchanger

www.gnu.org/software/macchanger

5
  • sudo macchanger --mac 00:11:22:33:44:55 wlan0 returned Current MAC: 24:fd:52:63:8a:1d (Liteon Technology Corporation) Permanent MAC: 24:fd:52:63:8a:1d (Liteon Technology Corporation) [ERROR] Could not change MAC: interface up or insufficient permissions: Too many open files in system However when I check it either using ifconfig or macchanger -s wlan0 the MAC address appears to have changed, and upon restarting the network service it prompts me for a network password. After I enter the password, it thinks for a while and then prompts me again. This continues in an infinite loop.
    – Ketchup901
    Jun 26, 2015 at 14:44
  • As mentioned, when I switch back to the permanent MAC address using the same command, it starts working again. I have tried the graphical "Network Connections" menu from the Control Center. Same problem there.
    – Ketchup901
    Jun 26, 2015 at 14:47
  • @AdamGenell try rebooting first. I have tested this myself, you MUST first run sudo ifconfig wlan0 down then run sudo macchanger --mac 00:11:22:33:44:55 wlan0 then run sudo service network-manager restart. They must be run in that specific order and must not be run with any other commands or changes to configuration. In fact, network-manager should automatically connect to the network and should already be using the spoofed MAC automatically.
    – mchid
    Jun 28, 2015 at 2:42
  • @AdamGenell to increase your file limit set to 1024 by default, you can run the following command to increase the file limit to 2024 for the current user: sudo sh -c "ulimit -n 2024 && exec su $USER". And then you should be able to run the commands without the ERROR.
    – mchid
    Jun 28, 2015 at 4:05
  • @AdamGenell to increase it for root user: sudo su; ulimit -n 2024
    – mchid
    Jun 28, 2015 at 4:17

You must log in to answer this question.

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