- fixed log-to-syslog behavior
[strongswan.git] / Source / scripts / to-alice.sh
1 #!/bin/bash
2
3 # enable ip forwarding for gateway
4 echo 1 > /proc/sys/net/ipv4/ip_forward
5
6 # add connection to alice
7 MY_ADDR=192.168.0.2 # Address of local peer, also used as ID
8 OTHER_ADDR=192.168.0.1 # Address of remote peer, also used as ID
9 MY_CERT=bob.der # own certificate
10 OTHER_CERT=alice.der # certificate for remote peer
11 MY_NET=10.2.0.0 # protected local subnet
12 OTHER_NET=10.1.0.0 # protected remote subnet
13 MY_BITS=16 # size of subnet
14 OTHER_BITS=16 # size of subnet
15 CONN_NAME=to-alice # connection name
16
17 bin/stroke add $CONN_NAME $MY_ADDR $OTHER_ADDR $MY_CERT $OTHER_CERT \
18 $MY_ADDR $OTHER_ADDR $MY_NET $OTHER_NET $MY_BITS $OTHER_BITS
19
20 # initiate
21 i=0
22 LIMIT=1
23
24 while [ "$i" -lt "$LIMIT" ]
25 do
26 bin/stroke up $CONN_NAME
27 let "i += 1"
28 done