Skip to content

Instantly share code, notes, and snippets.

@acidjazz
Created January 22, 2013 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acidjazz/4592238 to your computer and use it in GitHub Desktop.
Save acidjazz/4592238 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Add one IP to the list of split tunnel
add_ip ()
{
export CISCO_SPLIT_INC_${CISCO_SPLIT_INC}_ADDR=$1
export CISCO_SPLIT_INC_${CISCO_SPLIT_INC}_MASK=255.255.255.255
export CISCO_SPLIT_INC_${CISCO_SPLIT_INC}_MASKLEN=32
export CISCO_SPLIT_INC=$(($CISCO_SPLIT_INC + 1))
}
# Initialize empty split tunnel list
export CISCO_SPLIT_INC=0
# Delete DNS info provided by VPN server to use internet DNS
# Comment following line to use DNS beyond VPN tunnel
#unset INTERNAL_IP4_DNS
# List of IPs beyond VPN tunnel
#add_ip 10.0.0.130 # pop3.mycom.com and smtp
#add_ip 10.0.14.1 # ldap.mycom.com
#add_ip 10.1.0.5 # proxy.mycom.com
add_ip 10.13.50.33 # sandwich
# Execute default script
. /etc/vpnc/vpnc-script
# End of script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment