Last active
November 14, 2024 14:29
-
-
Save tujlaky/067efdcfb74042b65a4cf5bfd90a3d6d to your computer and use it in GitHub Desktop.
Fix DNS after VPN (OpenVPN or Tunnelblick) disconnect issues
This file contains hidden or 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/sh | |
# https://github.com/Tunnelblick/Tunnelblick/issues/789 | |
echo-active-dns() { | |
echo Current DNS server: `scutil --dns | grep 'nameserver' | uniq | awk '{print \$3}'` | |
} | |
alias restart-dns="networksetup -setdnsservers Wi-Fi empty; echo-active-dns;" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment