4 log="logger -t p1client-up[$$]"
7 . /etc/racoon/functions.sh
9 if [ -z "$SPLIT_INCLUDE_CIDR" ]; then
10 $log "Connection without server-pushed routing is not supported"
14 $log "Setting up tunnel to server $REMOTE_ADDR"
15 $log "Making tunnel(-s) to $SPLIT_INCLUDE_CIDR through $INTERNAL_ADDR4"
17 get_fieldval data dev "$(/usr/sbin/ip route get $REMOTE_ADDR)"
18 ip address add $INTERNAL_ADDR4/32 dev $data
21 config_get confIntZone racoon int_zone lan
22 config_get confExtZone racoon ext_zone wan
24 data=$(get_zoneiflist $confIntZone)
25 if [ -n "$data" ]; then
26 for item in $data ; do
27 network_get_subnet locnet $item
28 if [ -n "$locnet" ]; then
29 manage_sa add "$locnet" "$SPLIT_INCLUDE_CIDR" $REMOTE_ADDR $INTERNAL_ADDR4
31 $log "Can not find subnet on interface $item"
35 $log "Can not find interfaces in zone $confIntZone"
38 manage_fw add $confIntZone $confExtZone "$INTERNAL_ADDR4 $SPLIT_INCLUDE_CIDR"
41 # EOF /etc/racoon/p1client-up