Project created to enhance privacy of desktop linux by randomising the MAC address everytime the system is booted.
-
sudo apt install macchanger
-
systemd(included in most of the popular distros)This automation tool was written with systemd as target. If you do not have systemd, you can use crontab.
-
Clone this repo and cd into it
git clone https://github.com/ShobanChiddarth/randomised_mac_linux.git cd randomised_mac_linux -
Make the script as executable
chmod +x ./randomise_MACs.sh
-
Copy the script into
/usr/binsudo cp randomise_MACs.sh /usr/bin/
-
Copy the systemd service file into
/etc/systemd/systemsudo cp randomise_MACs.service /etc/systemd/system/
-
Reload systemd
sudo systemctl daemon-reload
-
Enable the service to run on boot
sudo systemctl enable randomise_MACs -
Note down the MAC addresses of alive network interfaces
sudo ifconfig
-
Start the systemd service right now to check if the MAC addresses are actually being changed
sudo systemctl start randomise_MACs
-
Run
ifconfigagain and compare the output with the previous runsudo ifconfig
-
If it is different, it means the script is working and your MAC addresses will change on each boot.