Realisations/2006-2007/Projet/IpsecImplementation: ipsec_test.sh

File ipsec_test.sh, 1.4 KB (added by alladoum, 18 years ago)

Script de test du flux IPSec cote client

Line 
1#!/bin/sh
2#  $File: /home/chris/PRes/Postes_Rackables/ipsec_client1/ipsec_test.sh $
3#  $MD5: c9d655c19b2321c1770f37db6e23313b $
4#  $By Christophe Alladoum <christophe[dot]alladoum[at]gmail[dot]com>$
5#  $Last-Modified: Tue Apr 24 23:22:55 2007$
6
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15# GNU General Public License for more details.
16
17# You should have received a copy of the GNU General Public License
18# along with this program; if not, write to the Free Software
19# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
20
21#
22# Le client injecte des paquets dans le flux securise
23# du serveur1 sur le port 10987
24#
25NETCAT=$(which nc)
26PORT=10987
27IPSEC_IN_ESP='in ipsec esp/transport//use'
28IPSEC_IN_AH='in ipsec ah/transport//use'
29IPSEC_OUT_ESP='out ipsec esp/transport//use'
30IPSEC_OUT_AH='out ipsec ah/transport//use'
31TARGET="serveur1.ent2.p6"
32
33$NETCAT -e "$IPSEC_IN_ESP" \
34    -e "$IPSEC_IN_AH" \
35    -e "$IPSEC_OUT_ESP" \
36    -e "$IPSEC_OUT_AH" \
37    -p $PORT \
38    -D \
39    $TARGET < /dev/urandom
40