Tuesday, December 1, 2020

mac spoofing

Hi together!

I have been playing around with mac spoofing lately and I noticed a strange behaviour dependent on the way I change the mac.

If I change the mac like this:

nmcli radio wifi off

sudo macchanger -r wlan0

nmcli radio wifi on

Everything is fine. The mac is changed, I get a new ip address and I can connect to the internet.

If I use

sudo ip link set wlan0 down

sudo macchanger -r wlan0

sudo ip link set wlan0 up

I don't get a new ip address my interface isn't even sending a request and sometimes I can't connect to the internet because my arp requests stay unanswered. By now I couldn't figure out when the arp requests stay unanswered and when everything works fine.

The major thing I don't get is why the nic does not request a new ip when using the second method. Where is the difference between these both methods. The logs of dmesg look the same to me.

Would be really glad if somebody could enlighten me. :)



No comments:

Post a Comment