๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ Changing the MAC address on Debian ๐Ÿฆ„

๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ Changing the MAC address on Debian ๐Ÿฆ„

Simple Installation of macchanger for Modifying MAC Address on Debian

ยท

1 min read

The utility macchanger will be used which is installed as follows:

sudo apt-get install macchanger

Configure eth0 with a random mac address but maintain the vendor:

sudo macchanger -e eth0

Display the newly assigned mac:

sudo macchanger -s

Create a service to make this permanent (use the new mac address created above):

sudo nano /etc/systemd/system/macfix@.service

[Unit]
Description=Spoofing MAC address on %I
Wants=network-pre.target
Before=network-pre.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device

[Service]
ExecStart=/usr/bin/macchanger -m 8c:1f:64:63:36:cf %I
Type=oneshot

[Install]
WantedBy=multi-user.target

sudo systemctl enable macfix@eth0.service

Now the device will always reboot with the changed mac.

ย