From 219a6dab8995aad9ac4860cc1a84d6f3509a03a4 Mon Sep 17 00:00:00 2001 From: wbx Date: Sun, 17 May 2009 14:41:34 +0200 Subject: Initial import --- package/vpnc/files/vpnc-route | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 package/vpnc/files/vpnc-route (limited to 'package/vpnc/files/vpnc-route') diff --git a/package/vpnc/files/vpnc-route b/package/vpnc/files/vpnc-route new file mode 100755 index 000000000..f39eb1355 --- /dev/null +++ b/package/vpnc/files/vpnc-route @@ -0,0 +1,30 @@ +#!/bin/sh + +#* VPNGATEWAY -- vpn gateway address (always present) +#* TUNDEV -- tunnel device (always present) +#* INTERNAL_IP4_ADDRESS -- address (always present) + +# define which traffic should be routed through the tunnel device +# any traffic that is not bound to a local interface will be +# mangled by the "main" routing table, so we add our rules to +# the main routing table + +# the setup for remote traffic and already bound traffic is done by +# the hotplug scripts. + +if [ "x$TUNDEV" == "x" ]; then + echo "No TUNDEV given. Script must be called from vpnc-script" + exit 1; +fi +case "$1" in + start) + # for each subnet that should be reached from this machine over the vpn tunnel, + # add a line like this: + # ip route add some.sub.net/msk dev $TUNDEV src $INTERNAL_IP4_ADDRESS + ;; + stop) + # remove the routing entries + ;; +esac; +exit 0; + -- cgit v1.2.3