Skip to content

Instantly share code, notes, and snippets.

@Hexcles
Created March 24, 2012 12:41
Show Gist options
  • Save Hexcles/2182257 to your computer and use it in GitHub Desktop.
Save Hexcles/2182257 to your computer and use it in GitHub Desktop.
Restore original DNS settings (used with openvpn --down)
#!/bin/bash
# Restore original DNS settings
# used with openvpn --down
if [ -f /etc/resolv.conf.old ]
then
rm /etc/resolv.conf
mv /etc/resolv.conf.old /etc/resolv.conf
echo "resolv.conf restored"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment