PDA

View Full Version : Cant connect to the web when using crontab and macchanger



pineapplelover
2017-04-24, 15:05
hey kali community ! :)

ive recently started participating in the 15hour hacking beginners course on youtube and im having a great time.slowly im getting used to the linux environment and the functions.



Now to my problem : in the mac-adress-chapter of the course,the teacher advises using "crontab -e" and setting following boot script in order to always use a random mac adress on startup: "@reboot macchanger -r eth0".So i open the textfile via nano,edit in the said line at the bottom and ctrl+o it.After that,i reboot. Now heres the strange part : when I use "macchanger -r eth0" in the terminal without the cron boot sequence,my mac changes and my connection still works. But when i use the automated script via crontab and reboot,my browser wont connect to the web and in the top right it tells me that "wired" is not connected.

Im using the newest and updated kali linux in virtualbox. If theres any more information i could provide you with regarding the problem i'll gladly do that !

(english is not my native language btw,so please excuse any mistakes :D)

P.S. : Ive already tried this solution,but it gave me the same error : https://forums.kali.org/showthread.php?36072-SOLVED-Could-not-change-MAC-amp-Setup-Macchanger-auto-spoofing-randomization-in-Kali

xsi.
2017-06-20, 11:13
I am in the same issue as you.

X003
2017-07-28, 23:48
Same here i have the exact same issue and i am also watching the 16 hour long video too lol.... did you try to do ifconfig eth0 down and then service network-manager stop and then change the mac then start up ifconfig eth0 up and service network-manager start?

youngrandom
2017-08-07, 16:38
[QUOTE=X003;73167]Same here i have the exact same issue and i am also watching the 16 hour long video too lol.... did you try to do ifconfig eth0 down and then service network-manager stop and then change the mac then start up ifconfig eth0 up and service network-manager start?[/QUOTE

I believe Network Manager is the culprit. This is what worked for me. Type this in terminal....

nano /etc/NetworkManager/Conf.d/MACfix.conf

type this in that file...

[device]
wifi.scan-rand-mac-address=no

[connection]
ethernet.cloned-mac-address=preserve
wifi.cloned-mac-address=preserve


ctrl-O to save...ctrl-X to exit

reboot and Network Manager should preserve the NEW "changed" MAC address. This took me a while to figure out. I also am following along in the same course. Lol