So I used macchanger to spoof my mac address with these commands:
sudo ifconfig (interface) down
sudo macchanger -m (mac_address) (interface)
sudo ifconfig (interface) up
If I stop here I will not be able to connect to the internet.
So I restart network-manager:
sudo service network-manager restart
A this point after the service restart is done the mac address is set to default meaning the real mac address.
I think the issue is relevant to ipv6 because I disabled ipv6 from boot loader /etc/default/grub:
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet splash"
Following guidance below that I should use
sudo macchanger -r (interface) or sudo machchanger -a (interface)
I tried all commands from -A random
to -M custom mac address
, again no access to the internet if I dont restart the service network-manager.
I'm using the network adapter awus036nha
service networking
or reload the interface withifdown/ifup <interface>