Indlæg

Viser indlæg fra januar, 2011

Splitting VPNC connection

When using VPNC to connect through vpn it is possible to only route parts of the traffic from the NIC through vpn.

To do that you need to add a script to your VPNC configuration. It could be stored in this file /etc/vpnc/split

The script needs to be made executable:
chmod +x /etc/vpnc/split
The script is documented here and can look like this:

#!/bin/bash

#http://svn.unix-ag.uni-kl.de/vpnc/branches/vpnc-nortel/split_tunnel.txt

#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=8
        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.0         # pop3.mycom.…