west:~#
 TESTNAME=transport-02
west:~#
 source /testing/pluto/bin/westlocal.sh
west:~#
 iptables -F INPUT
west:~#
 iptables -F OUTPUT
west:~#
 ping -n -c 4 192.0.2.254
PING 192.0.2.254 (192.0.2.254): 56 data bytes
64 bytes from 192.0.2.254: icmp_seq=0 ttl=257 time=999 ms
64 bytes from 192.0.2.254: icmp_seq=1 ttl=257 time=999 ms
64 bytes from 192.0.2.254: icmp_seq=2 ttl=257 time=999 ms
64 bytes from 192.0.2.254: icmp_seq=3 ttl=257 time=999 ms

--- 192.0.2.254 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 3.1/4.5/9.26 ms
west:~#
 telnet east-out 3 | wc -l
Connection closed by foreign host.
     30
west:~#
 iptables -A INPUT -i eth1 -s 192.1.2.23 -p tcp --sport 3 -j REJECT
west:~#
 iptables -A OUTPUT -o eth1 -d 192.1.2.23 -p tcp --dport 3 -j REJECT
west:~#
 ping -n -c 4 192.0.2.254
PING 192.0.2.254 (192.0.2.254): 56 data bytes
64 bytes from 192.0.2.254: icmp_seq=0 ttl=257 time=999 ms
64 bytes from 192.0.2.254: icmp_seq=1 ttl=257 time=999 ms
64 bytes from 192.0.2.254: icmp_seq=2 ttl=257 time=999 ms
64 bytes from 192.0.2.254: icmp_seq=3 ttl=257 time=999 ms

--- 192.0.2.254 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 3.1/4.5/9.26 ms
west:~#
 telnet east-out 3 | wc -l
telnet: Unable to connect to remote host: Connection refused
      1
west:~#
 ipsec setup start
ipsec_setup: Starting Libreswan IPsec VERSION
west:~#
 ipsec auto --add west--east-port3
west:~#
 ipsec auto --add west--east-pass
west:~#
 /testing/pluto/bin/wait-until-pluto-started
west:~#
 ipsec auto --route west--east-pass
west:~#
 ipsec eroute
0          192.1.2.45/32      -> 192.1.2.23/32      => %pass
west:~#
 ipsec whack --debug-control --debug-controlmore --debug-parsing --debug-crypt
west:~#
 echo done
done
west:~#
 ipsec auto --up  west--east-port3
104 "west--east-port3" #1: STATE_MAIN_I1: initiate
003 "west--east-port3" #1: received Vendor ID payload [Libreswan 
003 "west--east-port3" #1: received Vendor ID payload [Dead Peer Detection]
106 "west--east-port3" #1: STATE_MAIN_I2: sent MI2, expecting MR2
108 "west--east-port3" #1: STATE_MAIN_I3: sent MI3, expecting MR3
004 "west--east-port3" #1: STATE_MAIN_I4: ISAKMP SA established {auth=OAKLEY_RSA_SIG cipher=oakley_3des_cbc_192 prf=oakley_md5 group=modp1536}
117 "west--east-port3" #2: STATE_QUICK_I1: initiate
004 "west--east-port3" #2: STATE_QUICK_I2: sent QI2, IPsec SA established
west:~#

FIXME HERE FOR KNOWN GOOD OUTPUT

 telnet east-out 3 | wc -l
Connection closed by foreign host.
     30
west:~#
 telnet east-out 2 | wc -l
Connection closed by foreign host.
    834
west:~#
 ipsec look
west NOW
192.1.2.45/32      -> 192.1.2.23/32      => %pass
192.1.2.45/32      -> 192.1.2.23/32:3    => tun0xIPIP@192.1.2.23:6
ipsec0->eth1 mtu=16260(9999)->1500


esp0xKLIPSPIK@192.1.2.45 ESP_3DES_HMAC_MD5: dir=in  src=192.1.2.23 iv_bits=64bits iv=0xIVISFORRANDOM000 ooowin=64   alen=128 aklen=128 eklen=192  natencap=none natsport=0 natdport=0  
tun0xTUN#@192.1.2.45 IPIP: dir=in  src=192.1.2.23 policy=192.1.2.23/32->192.1.2.45/32 flags=0x8<>  natencap=none natsport=0 natdport=0  
ROUTING TABLE
192.1.2.23 dev ipsec0  scope link 
192.1.2.0/24 dev eth1  proto kernel  scope link  src 192.1.2.45 
192.1.2.0/24 dev ipsec0  proto kernel  scope link  src 192.1.2.45 
192.0.2.0/24 via 192.1.2.23 dev eth1 
default via 192.1.2.254 dev eth1 
west:~#
 echo done
done
west:~#
 

west:~#
west:~#
 if [ -f /tmp/core ]; then echo CORE FOUND; mv /tmp/core /var/tmp; fi
west:~#
 ipsec setup stop
IPSEC EVENT: KLIPS device ipsec0 shut down.
ipsec_setup: Stopping Libreswan IPsec...
west:~#
 kill `cat /var/run/klogd.pid`; cat /tmp/klog.log
klogd 1.3-3#33.1, log source = /proc/kmsg started.
west:~#
 halt -p -f
Power down.

