0

This question already has an answer here:

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.....

marked as duplicate by Milliways, Dmitry Grigoryev, Ingo, Community Oct 23 '18 at 1:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.