-
-
Save gnthibault/8eccfd0ae78587ab62ff52dbda602d0a to your computer and use it in GitHub Desktop.
DNS debugging on mac
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 | |
# From https://rakhesh.com/powershell/vpn-client-over-riding-dns-on-macos/ | |
# You can debug dns issues with: dns-sd -G v4v6 host.example.com | |
# You can put this file in home then crontab: | |
# @hourly /Users/yourname/fix_dns.sh | |
sudo scutil << EOF | |
get State:/Network/Service/gpd.pan/DNS | |
d.remove SearchDomains | |
d.remove ServerAddress | |
d.add ServerAddresses * 192.168.17.1 2001:8f8:172d:3ca9::1 | |
set State:/Network/Service/gpd.pan/DNS | |
exit | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment