How to change the Mac Address

Hi.

My net provider filters a mac addresses of devices which are connected into the network.
How can I change the mac address using the preseed, or any other tool.

I know that I can do it by:

sudo ifconfig eth0 down
sudo ifconfig eth0 hw ether 00:11:22:33:44:55
sudo ifconfig eth0 up

but I don’t want to do that each time I restart the raspberry.

Can anyone help me with it?

Best regards,
MiloszeS

Have a look at this page:

https://wiki.archlinux.org/index.php/MAC_address_spoofing

I haven’t tried any of their methods but I think the one most likely to work with OSMC is Method 2: systemd-udevd.

Note, OSMC has the ip command at /bin/ip not /usr/bin/ip as shown in that example but otherwise I think it would work.

Method 3 may also work, but Method 1 will not because we use connman not systemd-networkd.

Good luck.

Does the cmdline.txt mechanism work?
http://elinux.org/RPiconfig#Network

Probably! Wasn’t aware of that method… :slight_smile:

If it does, that would be the logical way to do it.

with my Raspberry Pi 3 B+ the cmdline.txt method didn’t work