Created
February 13, 2016 12:25
-
-
Save dimkr/4df8675778ed75a6b414 to your computer and use it in GitHub Desktop.
/etc/udev/rules.d/75-randomize-mac.rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="CURRENT, REAL MAC ADDRESS GOES HERE", RUN+="/bin/bash -c '/bin/ip link set dev %k address `/usr/bin/printf %02x $(($RANDOM % 255))`:`/usr/bin/printf %02x $(($RANDOM % 255))`:`/usr/bin/printf %02x $(($RANDOM % 255))`:`/usr/bin/printf %02x $(($RANDOM % 255))`:`/usr/bin/printf %02x $(($RANDOM % 255))`:`/usr/bin/printf %02x $(($RANDOM % 255))`'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment