Automatically change network interface's mac address at boot
This is for presenting a false mac address (the ID of a wired or wireless network card). You might do this to preserve your anonymity online (some public networks track mac addresses).
Make sure some version of cron (I did this with cronie) and macchanger are installed. At the command line, verify the install location of macchanger (aka its full path) with the whereis command (I had to use sudo to find the location): Code:
sudo whereis macchanger Code:
ip link show Code:
1: lo: text-you-can-ignore Create a cron job with sudo aka for the root account (because macchanger must be run with root privileges): Code:
sudo crontab -e In the file, type: Code:
@reboot /full/path/to/macchanger -options interface_name Code:
@reboot /sbin/macchanger -r eth0 Save and close the file. Check cron man page for running the job at other times/intervals and check macchanger man page for other options. Optional: If your system has no cron log file and you want to check errors/output of this cron job, create a log file at the same time you create the cron job (or edit the existing cron job by typing Code:
sudo crontab -e Code:
@reboot /path/to/macchanger -options interface_name >> /full/path/to/some_textfile > 2>&1 |
All times are GMT -5. The time now is 07:28 PM. |