Netplan not spoofing MAC as expected
All right, I had the same problem but I finally got fixed by adding a match keyword in my script, my MAC address was 4c:ed:fe:32:de:22 and I had to specify it before changing it or forcing it. (I also added a renderer which is networkd)
network:
renderer: networkd
ethernets:
eno1:
addresses: []
dhcp4: true
optional: true
enp1s0:
match:
macaddress: 4c:ed:fe:32:de:22
macaddress: de:de:de:de:de:de
dhcp4: no
dhcp6: no
addresses: [172.30.0.58/24, ]
gateway4: 172.30.0.254
nameservers:
addresses: [208.67.222.222, 208.67.220.220]
version: 2
I sincerely hope this helps you buddy :)
I had the same problem that Netplan didn't override the MAC address on Ubuntu Server 18.04, although I used a match clause as described in the netplan reference before setting the new MAC address.
The workaround was to create a separate systemd link configuration under /etc/systemd/network/10-override-mac.link
to override the MAC address of the NIC and configure the rest via netplan.
[Match]
MacAddress=52:54:00:6b:3c:58
[Link]
MACAddress=52:54:00:6b:3c:59
I believe it only changes the MAC address that gets reported to the external connection. Running ifconfig locally will always give you the interface's real MAC address.