]> git.ipfire.org Git - thirdparty/strongswan.git/blame - programs/charon/scripts/to-alice.sh
- import of strongswan-2.7.0
[thirdparty/strongswan.git] / programs / charon / scripts / to-alice.sh
CommitLineData
8bc96e08
MW
1#!/bin/bash
2
3# enable ip forwarding for gateway
4echo 1 > /proc/sys/net/ipv4/ip_forward
5
6# add connection to alice
13e4a62f
MW
7MY_ADDR=192.168.0.2 # Address of local peer
8OTHER_ADDR=192.168.0.1 # Address of remote peer
9MY_ID="C=CH, O=Linux strongSwan, CN=bob" # ID of local peer
10OTHER_ID="C=CH, O=Linux strongSwan, CN=alice" # ID of remote peer
11MY_NET=10.2.0.0 # protected local subnet
12OTHER_NET=10.1.0.0 # protected remote subnet
13MY_BITS=16 # size of subnet
14OTHER_BITS=16 # size of subnet
15CONN_NAME=to-alice # connection name
8bc96e08 16
13e4a62f 17bin/stroke add $CONN_NAME "$MY_ID" "$OTHER_ID" $MY_ADDR $OTHER_ADDR $MY_NET $OTHER_NET $MY_BITS $OTHER_BITS
8bc96e08
MW
18
19# initiate
20i=0
21LIMIT=1
22
23while [ "$i" -lt "$LIMIT" ]
24do
25 bin/stroke up $CONN_NAME
26 let "i += 1"
27done