Last active
February 13, 2020 00:32
-
-
Save iklobato/d5d0220971f8ec0af55c9a25a693e0fa to your computer and use it in GitHub Desktop.
Request new local ip and mac addr
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
#!/bin/bash | |
sudo -s | |
service network-manager stop && service networking stop | |
for i in $(netstat -i | awk '{if (NR!=1 && NR!=2) print $1}'; do | |
ifconfig $i down; | |
macchanger -a $i; | |
dhclient -v -r $i | |
done | |
for i in $(netstat -i | awk '{if (NR!=1 && NR!=2) print $1}'; do | |
ifconfig $i up; | |
done | |
service network-manager start && service networking start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment