Last active
October 18, 2016 21:15
-
-
Save p120ph37/10998096 to your computer and use it in GitHub Desktop.
A patch to vpnc-script to support $SPLIT_DNS when used with openconnect and a Cisco AnyConnect server.
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
--- vpnc-script.orig 2016-10-18 16:13:30.000000000 -0500 | |
+++ vpnc-script 2016-10-18 16:14:27.000000000 -0500 | |
@@ -435,10 +435,10 @@ | |
# DNS matching when available. When multiple DNS matching | |
# is present, anything reading the /etc/resolv.conf file | |
# directly will probably not work as intended. | |
- #if [ -z "$CISCO_DEF_DOMAIN" ]; then | |
+ if [ -z "$CISCO_DEF_DOMAIN" ]; then | |
# Cannot use multiple DNS matching without a domain | |
OVERRIDE_PRIMARY='d.add OverridePrimary # 1' | |
- #fi | |
+ fi | |
scutil >/dev/null 2>&1 <<-EOF | |
open | |
d.init | |
@@ -459,7 +459,7 @@ | |
get State:/Network/Service/$TUNDEV/DNS | |
d.add DomainName $CISCO_DEF_DOMAIN | |
d.add SearchDomains * $CISCO_DEF_DOMAIN | |
- d.add SupplementalMatchDomains * $CISCO_DEF_DOMAIN | |
+ d.add SupplementalMatchDomains * $CISCO_DEF_DOMAIN $SPLIT_DNS | |
set State:/Network/Service/$TUNDEV/DNS | |
close | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To apply it to vpnc-script, use this command:
patch -i vpnc-script.patch vpnc-script