Change Mac Address of centos 7.9

General support questions
Post Reply
adhsaab
Posts: 2
Joined: 2021/09/18 03:02:14

Change Mac Address of centos 7.9

Post by adhsaab » 2021/09/18 03:50:06

Hello Centosians :D :D
i am new on this forum , i have installed my first centos on vps.its pretty easy using tutorials.
but i am facing problem to change the mac address because my web app required particular mac. i tried all possible mac changing tutorials on the google but no solution it shows same in eth0 while using ifconfig command

Can you please help me guys to sort out the issue please?

Thank you

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Change Mac Address of centos 7.9

Post by TrevorH » 2021/09/18 09:08:00

Edit /etc/sysconfig/network-scripts/ifcfg-$interface (e.g. ifcfg-eth0) and add the line MACADDR=xx:yy:zz:aa:bb:cc to it, save it and restart the interface (or reboot).

However, if it's a VPS then your provider may have the system locked down so it can only use the MAC address they have assigned you and it may either not be possible to change it at all or you might lose all network access.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

adhsaab
Posts: 2
Joined: 2021/09/18 03:02:14

Re: Change Mac Address of centos 7.9

Post by adhsaab » 2021/09/18 12:15:20

Thank you Very Much TrevorH it worked on local pc ,but no success on vps i asked vps provider to change it :D :D

Post Reply