Change MAC Address on a NIC

Jun 2, 2017
3
0
1
54
I need to change the MAC address on a NIC on a Proxmox 4.4 host. It seems that it is NOT correct to use /etc/network/interfaces since Proxmox manages its content directly - but I'm just a newbie so feel free to point out my ignorance ;)

At this stage I am handling the situation via a CRON job:

*/5 * * * * /sbin/ifconfig eth0 hw ether a2a3a4a5a6a7

...but I am not happy with this solution.

Can anyone suggest a more appropriate way to do this?
 
you could put the ifconfig snippet in /etc/rc.local
this will be executed once at boot, which should be enough to change the mac address
output of anything you put in /etc/rc.local will be displayed on the console when you boot
 
Hi Manu,

I could not find a rc.local file under etc folder.
Could you please help in understanding, what can be done for changing a MAC address permanently for a NIC.

Thank you.