OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / freeswan / klips / test / west-reject-02 / spi1.sh
1 #!/bin/sh
2 TZ=GMT export TZ
3
4 ipsec spi --clear
5 ipsec eroute --clear
6
7 ipsec klipsdebug --set pfkey
8 ipsec klipsdebug --set verbose
9
10 ipsec eroute --add --eraf inet --src 192.0.1.0/24 --dst 192.0.2.0/24 --said %reject
11
12 ipsec tncfg --attach --virtual ipsec0 --physical eth1
13 ifconfig ipsec0 inet 192.1.2.45 netmask 0xffffff00 broadcast 192.1.2.255 up
14
15 arp -s 192.1.2.23 10:00:00:64:64:45
16 arp -s 192.1.2.254 10:00:00:64:64:45
17 arp -s 192.0.1.2 10:00:00:64:64:45
18 arp -s 192.0.1.1 10:00:00:64:64:45
19
20 ipsec look
21
22 # magic route command
23 route add -host 192.0.2.1 gw 192.1.2.23 dev ipsec0
24