diff options
author | Martin Willi <martin@strongswan.org> | 2006-04-20 07:06:39 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2006-04-20 07:06:39 +0000 |
commit | 8bc96e08cb0c613edc35bcc6c3e8028b4db9e0aa (patch) | |
tree | 01f156479d22c765f0d99df0a5c4a07bcfe2c3f5 /Source/scripts/to-alice.sh | |
parent | ec6582ccaa59e38cb83650c7c6b8312dc9768e87 (diff) | |
download | strongswan-8bc96e08cb0c613edc35bcc6c3e8028b4db9e0aa.tar.bz2 strongswan-8bc96e08cb0c613edc35bcc6c3e8028b4db9e0aa.tar.xz |
- fixed log-to-syslog behavior
- added patch against strongswan-2.6.4
Diffstat (limited to 'Source/scripts/to-alice.sh')
-rwxr-xr-x | Source/scripts/to-alice.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Source/scripts/to-alice.sh b/Source/scripts/to-alice.sh new file mode 100755 index 000000000..fa2f84dd0 --- /dev/null +++ b/Source/scripts/to-alice.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +# enable ip forwarding for gateway +echo 1 > /proc/sys/net/ipv4/ip_forward + +# add connection to alice +MY_ADDR=192.168.0.2 # Address of local peer, also used as ID +OTHER_ADDR=192.168.0.1 # Address of remote peer, also used as ID +MY_CERT=bob.der # own certificate +OTHER_CERT=alice.der # certificate for remote peer +MY_NET=10.2.0.0 # protected local subnet +OTHER_NET=10.1.0.0 # protected remote subnet +MY_BITS=16 # size of subnet +OTHER_BITS=16 # size of subnet +CONN_NAME=to-alice # connection name + +bin/stroke add $CONN_NAME $MY_ADDR $OTHER_ADDR $MY_CERT $OTHER_CERT \ + $MY_ADDR $OTHER_ADDR $MY_NET $OTHER_NET $MY_BITS $OTHER_BITS + +# initiate +i=0 +LIMIT=1 + +while [ "$i" -lt "$LIMIT" ] +do + bin/stroke up $CONN_NAME + let "i += 1" +done |