Skip to content

Instantly share code, notes, and snippets.

@Deadlyelder
Created September 7, 2020 07:58
Show Gist options
  • Save Deadlyelder/0f877013013c349fbc0ce5f2a128215d to your computer and use it in GitHub Desktop.
Save Deadlyelder/0f877013013c349fbc0ce5f2a128215d to your computer and use it in GitHub Desktop.
fx from config
resetntinf () {
echo "It will clean up the route tables for connectivity issues";
for i in $(ifconfig | egrep -o "^[a-z].+\d{1}:" | sed 's/://');
do
sudo ifconfig "$i" down;
done;
sudo route -n flush;
for i in $(ifconfig | egrep -o "^[a-z].+\d{1}:" | sed 's/://');
do
sudo ifconfig "$i" up;
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment