PDA

View Full Version : Trouble with mac changing in kali running on VM



guy3111
2017-08-23, 19:51
Hello. I am trying to find soludion for this problem. I am running kali on virtual machine. My computer is connected to the internet with ethernet cable. When I change my mac address to random one with macchanger, I lose internet connection and can't get it back unless I change mac address back to permanent one.

I tried to change my mac address this way:

service network-manager stop
ifconfig eth0 down
macchanger -r eth0
ifconfig eth0 up
service network-manager start

And different combinations with these commands. It did not worked. I also tried to physically disconnect and reconnect my machine by taking off the cable from the machine and plugging it back on.

I am new to Linux and networking, so maybe I miss something silly. I tried to do some research on the forums but it did not helped me.

My question is: How to change my mac address to random one (-r) on Kali that is running on virtual machine?

If you have any questions to me, please do ask.

Mister_X
2017-08-23, 21:53
The virtualization software most likely knows what MAC address is allocated to your VM because you can edit it.

To change the MAC in vmware workstation (and probably player/fusion), go to VM menu then click on Settings. From there, select the network adapter, click advanced and change the MAC. You might have to reboot the VM.

guy3111
2017-08-25, 21:23
I was looking the way to make Kali on VM generate it's mac address automatically every time I boot OS. I guess it is not possible or not that easy.
Internet works when I change mac address manually in VM settings. Thank you for your help, appreciate it.

mmusket33
2017-08-26, 08:08
To guy3111

The matter of macchanger versus network-manager(NM) is a long standing problem and well covered in this forum.

Your series of commands is actually bringing into play two(2) different macchanging systems; the manual macchanger commands you typed in the terminal window(TW) and the macchanging system embedded within NM itself. Hence you are changing the mac address thru the TW and then starting NM. When you start NM the mac address setting in NM for the device will override the TW commands

MTeams does not use VM or ethernet however here are some links to approach the problem. There are several solutions.


https://forums.kali.org/showthread.php?29913-Netmanmac1-3-released-for-general-use&highlight=netmanmac

https://forums.kali.org/showthread.php?21985-How-to-make-mac-address-random-at-each-boot-up


Of specific use to you, read the comments by hon3yb33 near the end of the second link above.

Musket Teams

guy3111
2017-08-26, 20:12
To mmusket33

The way I was trying to automatically change my mac address at booting is identical to hon3yb33 solution. The problem was that I had no internet connection after reboot. I partially solved this problem with a help from Mister_X.

Thank you for sharing information about the problem that I was completelly unaware of. I am learning and this information is going to be very usefull to me.