# 🏴󠁧󠁢󠁳󠁣󠁴󠁿 Changing the MAC address on Debian 🦄

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

```plaintext
sudo apt-get install macchanger
```

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

```plaintext
sudo macchanger -e eth0
```

Display the newly assigned mac:

```plaintext
sudo macchanger -s
```

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

```plaintext
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.
