00001 #!/bin/bash
00002 #
00003 # Proxy-CSCF SA for Incoming Requests ( US -> PC )
00004 #
00005 # \author Dragos Vingarzan vingarzan -at- fokus dot fraunhofer dot de
00006 #
00007
00008 ue=$1
00009 port_us=$2
00010 pcscf=$3
00011 port_pc=$4
00012
00013 spi_pc=$5
00014
00015 ealg=$6
00016 ck=$7
00017 alg=$8
00018 ik=$9
00019
00020 if [ "$6" = "null" ]
00021 then
00022 ck=""
00023 fi
00024
00025 setkey -c << EOF
00026 spdadd $ue/32[$port_us] $pcscf/32[$port_pc] tcp -P in ipsec esp/transport
00027 spdadd $ue/32[$port_us] $pcscf/32[$port_pc] udp -P in ipsec esp/transport
00028 add $ue $pcscf esp $spi_pc -m transport -E $ealg $ck -A $alg $ik ;
00029 EOF
00030