Skip to content

Instantly share code, notes, and snippets.

@jfklingler
Created August 17, 2015 12:51
Show Gist options
  • Save jfklingler/aa9a3e34983109403295 to your computer and use it in GitHub Desktop.
Save jfklingler/aa9a3e34983109403295 to your computer and use it in GitHub Desktop.
Reset boot2docker network
#!/bin/bash
if_prefix=${VB_IF_PREFIX:-vboxnet}
if_name=$(ifconfig | grep $if_prefix | awk -F':' '{print $1}')
if [[ $if_name == "" ]]; then
echo "Couldn't find $if_prefix interface" >&2
exit 1
fi
sudo route delete -net 192.168.59
sudo route -nv add -net 192.168.59 -interface $if_name
boot2docker stop
boot2docker start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment