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 | |
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')
-rw-r--r-- | Source/scripts/alice-key.der | bin | 0 -> 1190 bytes | |||
-rw-r--r-- | Source/scripts/alice.der | bin | 0 -> 764 bytes | |||
-rw-r--r-- | Source/scripts/bob-key.der | bin | 0 -> 1187 bytes | |||
-rw-r--r-- | Source/scripts/bob.der | bin | 0 -> 759 bytes | |||
-rwxr-xr-x | Source/scripts/daemon-loop.sh | 13 | ||||
-rwxr-xr-x | Source/scripts/deleteline | 9 | ||||
-rwxr-xr-x | Source/scripts/replace | 9 | ||||
-rwxr-xr-x | Source/scripts/to-alice.sh | 28 | ||||
-rwxr-xr-x | Source/scripts/to-bob.sh | 19 |
9 files changed, 78 insertions, 0 deletions
diff --git a/Source/scripts/alice-key.der b/Source/scripts/alice-key.der Binary files differnew file mode 100644 index 000000000..5a8aef6cb --- /dev/null +++ b/Source/scripts/alice-key.der diff --git a/Source/scripts/alice.der b/Source/scripts/alice.der Binary files differnew file mode 100644 index 000000000..8154defd9 --- /dev/null +++ b/Source/scripts/alice.der diff --git a/Source/scripts/bob-key.der b/Source/scripts/bob-key.der Binary files differnew file mode 100644 index 000000000..f944dec9f --- /dev/null +++ b/Source/scripts/bob-key.der diff --git a/Source/scripts/bob.der b/Source/scripts/bob.der Binary files differnew file mode 100644 index 000000000..401611888 --- /dev/null +++ b/Source/scripts/bob.der diff --git a/Source/scripts/daemon-loop.sh b/Source/scripts/daemon-loop.sh new file mode 100755 index 000000000..9a361e012 --- /dev/null +++ b/Source/scripts/daemon-loop.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +while [ 1 ] +do + ip x p f + ip x s f + rm /var/run/charon.* + make + bin/charon + echo "" + echo "----------------------------" + echo "" +done diff --git a/Source/scripts/deleteline b/Source/scripts/deleteline new file mode 100755 index 000000000..9f529dccc --- /dev/null +++ b/Source/scripts/deleteline @@ -0,0 +1,9 @@ +#!/bin/bash + +FILES=`find . -name '*.[ch]'` +for FILE in $FILES +do + TMP=${FILE}_tmp + sed "/$1/d" < $FILE > $TMP + mv $TMP $FILE +done diff --git a/Source/scripts/replace b/Source/scripts/replace new file mode 100755 index 000000000..adfc8e09a --- /dev/null +++ b/Source/scripts/replace @@ -0,0 +1,9 @@ +#!/bin/bash + +FILES=`find . -name '*.[ch]'` +for FILE in $FILES +do + TMP=${FILE}_tmp + sed "s/$1/$2/g" < $FILE > $TMP + mv $TMP $FILE +done 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 diff --git a/Source/scripts/to-bob.sh b/Source/scripts/to-bob.sh new file mode 100755 index 000000000..012986484 --- /dev/null +++ b/Source/scripts/to-bob.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# enable ip forwarding for gateway +echo 1 > /proc/sys/net/ipv4/ip_forward + +# add connection to bob +MY_ADDR=192.168.0.1 # Address of local peer, also used as ID +OTHER_ADDR=192.168.0.2 # Address of remote peer, also used as ID +MY_CERT=alice.der # own certificate +OTHER_CERT=bob.der # certificate for remote peer +MY_NET=10.1.0.0 # protected local subnet +OTHER_NET=10.2.0.0 # protected remote subnet +MY_BITS=16 # size of subnet +OTHER_BITS=16 # size of subnet +CONN_NAME=to-bob # 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 +
\ No newline at end of file |