Change MAC Address on a NIC

Jun 2, 2017
3
0
1
53
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.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!