Hi,

vpnc did not work here, so i did a little fix. There was much unreadable stff 
in 
the old vpnc-script which i removed. Currently my idea of vpnc is that 
after setting up the tunnel, no traffic is routed through it. The user must 
first edit /etc/vpnc/vpnc-route apropriatly (inserting some "ip route add 
target/mask dev tun0") to use the tunnel. Maybe setting the default route in 
there by default is a good choice. I didn't do that because i do not use my 
vpnc 
as a default route. Only a little part is routed through my tunnel.

/etc/reslv.conf is not yet edited. Maybe someone could give me a hint how to 
sort out the lines when closing the tunnel. I didn't have any good idea other 
than using backup-files which is not a good idea if network interfaces are 
deconfigured in different orders than they are configred.

Clemens
Index: package/vpnc/files/vpnc-route
===================================================================
--- package/vpnc/files/vpnc-route       (Revision 0)
+++ package/vpnc/files/vpnc-route       (Revision 0)
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+#* VPNGATEWAY                   -- vpn gateway address (always present)
+#* TUNDEV                       -- tunnel device (always present)
+#* INTERNAL_IP4_ADDRESS         -- address (always present)
+
+
+# Set up the routing table for the kernel.
+# This script must be modified in order to route the traffic through the
+# VPN tunnel.
+
+if [ "x$TUNDEV" == "x" ]; then
+       echo "No TUNDEV given. Script must be called from vpnc-script"
+       exit 1;
+fi
+
+case "$1" in
+       start)
+               ip route add 140.98.193.0/24 dev $TUNDEV
+       ;;
+       stop)
+               ip route del 140.98.193.0/24
+       ;;
+esac;
+
+
+exit 0;

Eigenschafts?nderungen: package/vpnc/files/vpnc-route
___________________________________________________________________
Name: svn:executable
   + *
  
Index: package/vpnc/ipkg/vpnc.conffiles
===================================================================
--- package/vpnc/ipkg/vpnc.conffiles    (Revision 2354)
+++ package/vpnc/ipkg/vpnc.conffiles    (Arbeitskopie)
@@ -1,2 +1,4 @@
 /etc/vpnc/vpnc.conf
 /etc/vpnc/vpnc-script
+/etc/vpnc/vpnc-route
+
Index: package/vpnc/Makefile
===================================================================
--- package/vpnc/Makefile       (Revision 2354)
+++ package/vpnc/Makefile       (Arbeitskopie)
@@ -27,5 +27,6 @@
 
 post-install:
        ${CP} ${WRKINST}/* ${IDIR_VPNC}/
+       ${CP} files/vpnc-route ${IDIR_VPNC}/etc/vpnc/
 
 include ${TOPDIR}/mk/pkg-bottom.mk
_______________________________________________
freewrt-developers mailing list
[email protected]
https://www.freewrt.org/lists/listinfo/freewrt-developers

Reply via email to