Cannot change mac address

Login or Register for Dates, Times and to Reply

Thread Tools Search this Thread
# 1  
Signal Cannot change mac address

ubuntu / xubuntu 13.10 and 14.04 (this issue should exist in debian as well)

I use wifi to connect to internet. I would like to change the wifi card mac address before connecting. Let's call the original mac address, macA, and the new mac address, macB.
I do the following:

ifconfig wlan0 down && ifconfig wlan0 hw ether <macB> && ifconfig wlan0 up

then I check the new mac out:
watch -n 1 'ifconfig wlan0 | grep HW'

It works: macB appears

as long as I stay without trying to connect to internet, macB stays in place.
as soon as I try to connect to internet, the system gets back to macA instantaneously

So I disabled networking in Network Manager, and erased all existing connections. I performed the above operation, and enabled networking again in Network Manager, the issue remains

I have also tried:
ifconfig wlan0 down && ip link set wlan0 address <macB> && ifocnfig wlan0 up

I have also tried to put
'sudo service networking stop'

(which should be the same as disabling networking from Netwok Manager)., do all this, and start networking service again but the issue remains.

I absolutely need to understand what's happening in the system;

Even if you do not have the answer, please give me some leads I can dig in.

Thanx in advance folks!

---------- Post updated at 08:23 AM ---------- Previous update was at 08:20 AM ----------

just one more thing:

I used macchanger (which exists in ubuntu/xubuntu universe repositories) and have the exact same issue.

I asked the author a feedback regarding this issue but no answer so far.
# 2  
Maybe you should take a look at your arp cache before and after.... and also your arp cache TTLs
# 3  
thank you.

I start my laptop, so the cache should be empty , anyway, I issue:
arp -n

there is no entry for wlan0. Anyway, I flush everything:
sudo ip -s -s neigh flush all
-> msg: Nothing to flush

After that, the issue remains.

---------- Post updated at 09:31 AM ---------- Previous update was at 08:51 AM ----------

I could finally make it working !
It looks like my network manager did not stop correctly from gui:
so doing (as root)
service network-manager stop && ifconfig wlan0 down && macchanger -A && ifconfig wlan0 up && service network-manager start

it works!
I need to tcpdump just to be definitively sure the fake mac is given to the wifi spot.
thanx for reading guys.
Login or Register for Dates, Times and to Reply

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #908
Difficulty: Medium
If a Unix shell command line ends with the hashtag #, then the job runs in the background, and the shell does not wait for the job to terminate before printing the prompt and waiting for the next command line.
True or False?

10 More Discussions You Might Find Interesting

1. IP Networking

MAC Address - Four Interfaces with the same MAC Address

four interfaces with ifconfig all interfaces have the same mac. If is not set for unique. but it still works. what difference does it make to have all macs the same or different? (4 Replies)
Discussion started by: rrodgers
4 Replies

2. Shell Programming and Scripting

GREP mac address

Hi, mac.txt My mac address is <Mac Address>. How can i replace <Mac Address> with the actual of my computer? I try to GREP command as below but i am unable to grep it to replace just <Mac Address>. ifconfig eth0 | grep -o -E '(]{1,2}:){5}]{1,2}' Million in Advance. Please use... (7 Replies)
Discussion started by: derrickyee81
7 Replies

3. Programming

[C] Change IP and MAC address

Hello, I need to write a program using C language which allow me to change the IP and MAC addresses of a given interface... Now I fork the process and by exec I'm using the "ifconfig interf X.X.X.X" command... but i can't use this solution because i have to avoid the context switch... Can someone... (4 Replies)
Discussion started by: gilby985
4 Replies

4. IP Networking

Tracing a MAC address to IP address: Solaris

Hi there I lost connectivity to one of our remote systems and when I checked the messages log I found the following: Aug 10 23:42:34 host xntpd: time reset (step) 1.681729 s Aug 16 13:20:51 host ip: WARNING: node "mac address" is using our IP address x.x.x.x on aggr1 Aug 16 13:20:51 host... (9 Replies)
Discussion started by: notreallyhere
9 Replies

5. SCO

MAC address

hi every one please help i want to change mac address in sco unix 5.0.6 how can i do this (3 Replies)
Discussion started by: kaydream
3 Replies

6. Cybersecurity

MAC Address spoofing

There is a question in the SCO section asking for information on how to change the MAC address of a NIC. Is there a valid reason for wanting to change the MAC address? (1 Reply)
Discussion started by: jgt
1 Replies

7. Solaris

Get ip address from mac address

I have following message in my messages file on solaris 10 WARNING: e1000g3712000:3 has duplicate address (in use by 00:50:56:85:25:ef); disabled Now is there any way i can find which server has 00:50:56:85:25:ef mac address either IP or Hostname ? (6 Replies)
Discussion started by: fugitive
6 Replies

8. IP Networking

How to Achive IP address through MAC(Ethernet) address

Hi sir, i want to make such programe which takes MAC(Ethernet) address of any host & give me its IP address....... but i'm nt getting that how i can pass the MAC address to Frame........ Please give me an idea for making such program... Thanks & regards Krishna (3 Replies)
Discussion started by: krishnacins
3 Replies

9. UNIX for Dummies Questions & Answers

Mac address

Hi Can some one help me How do find out Mac address in Tru64 Unix Thank you (1 Reply)
Discussion started by: Syed_45
1 Replies

10. Programming

Get Mac Address

:( Hi I am trying to get Mac address of of my Sun server from my C program running on the host machine. Any suggestions . (1 Reply)
Discussion started by: ss_hpov
1 Replies

Featured Tech Videos