0

Prior to raspbian stretch, the best way to configure an ethernet interface MAC address was within /etc/network/interfaces, adding the line hwaddress ether 00:e0:4c:53:44:50.

At the moment I am having to set them via root crontab e.g. @restart ifconfig eth1 down && ifconfig eth1 hw ether 00:e0:4c:53:44:50 && ifconfig eth1 up

Can I configure an interface within /etc/dhcpcd.conf to achieve the same result, as attempting the old way causes havoc.....

David
  • 29
  • 1
  • 4

1 Answers1

0

Thanks to Dmitry Grigoryev, I followed his link to solve as follows:

sudo nano /etc/systemd/network/00-mac.link

[Match] MACAddress=original MAC [Link] MACAddress=spoofed MAC NamePolicy=kernel database onboard slot path

I had previously tried macchanger, but it mysteriously reverted back to original for no apparent reason.

David
  • 29
  • 1
  • 4