
NEEDS FIXING

west:~#
 TESTNAME=ikev2-08-delete-notify
west:~#
 source /testing/pluto/bin/westlocal.sh
west:~#
 ping -n -c 1 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

--- 192.0.2.254 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 3.1/4.5/9.26 ms
west:~#
 iptables -A INPUT -i eth1 -s 192.0.2.0/24 -j DROP
west:~#
 ping -n -c 1 192.0.2.254
PING 192.0.2.254 (192.0.2.254): 56 data bytes

--- 192.0.2.254 ping statistics ---
1 packets transmitted, 0 packets received, 100% packet loss
west:~#
 ipsec setup start
ipsec_setup: Starting Libreswan IPsec VERSION
west:~#
 ipsec whack --whackrecord /var/tmp/ikev2.record
west:~#
 ipsec auto --add westnet-eastnet-ikev2
west:~#
 ipsec auto --status
000 using kernel interface: klips
000 interface ipsec0/eth1 192.1.2.45
000 debug raw+crypt+parsing+emitting+control+lifecycle+klips+dns+oppo+controlmore+pfkey+nattraversal+x509
000  
000 algorithm ESP encrypt: id=3, name=ESP_3DES, ivlen=64, keysizemin=192, keysizemax=192
000 algorithm ESP encrypt: id=12, name=ESP_AES, ivlen=128, keysizemin=128, keysizemax=256
000 algorithm ESP auth attr: id=1, name=AUTH_ALGORITHM_HMAC_MD5, keysizemin=128, keysizemax=128
000 algorithm ESP auth attr: id=2, name=AUTH_ALGORITHM_HMAC_SHA1, keysizemin=160, keysizemax=160
000 algorithm ESP auth attr: id=9, name=AUTH_ALGORITHM_AES_CBC, keysizemin=128, keysizemax=128
000  
000 algorithm IKE encrypt: id=3, name=OAKLEY_BLOWFISH_CBC, blocksize=8, keydeflen=128
000 algorithm IKE encrypt: id=5, name=OAKLEY_3DES_CBC, blocksize=8, keydeflen=192
000 algorithm IKE encrypt: id=7, name=OAKLEY_AES_CBC, blocksize=16, keydeflen=128
000 algorithm IKE encrypt: id=65004, name=OAKLEY_SERPENT_CBC, blocksize=16, keydeflen=128
000 algorithm IKE encrypt: id=65005, name=OAKLEY_TWOFISH_CBC, blocksize=16, keydeflen=128
000 algorithm IKE encrypt: id=65289, name=OAKLEY_TWOFISH_CBC_SSH, blocksize=16, keydeflen=128
000 algorithm IKE hash: id=1, name=OAKLEY_MD5, hashsize=16
000 algorithm IKE hash: id=2, name=OAKLEY_SHA1, hashsize=20
000 algorithm IKE hash: id=4, name=OAKLEY_SHA2_256, hashsize=32
000 algorithm IKE hash: id=6, name=OAKLEY_SHA2_512, hashsize=64
000 algorithm IKE dh group: id=2, name=OAKLEY_GROUP_MODP1024, bits=1024
000 algorithm IKE dh group: id=5, name=OAKLEY_GROUP_MODP1536, bits=1536
000 algorithm IKE dh group: id=14, name=OAKLEY_GROUP_MODP2048, bits=2048
000 algorithm IKE dh group: id=15, name=OAKLEY_GROUP_MODP3072, bits=3072
000 algorithm IKE dh group: id=16, name=OAKLEY_GROUP_MODP4096, bits=4096
000 algorithm IKE dh group: id=17, name=OAKLEY_GROUP_MODP6144, bits=6144
000 algorithm IKE dh group: id=18, name=OAKLEY_GROUP_MODP8192, bits=8192
000  
000 stats db_ops: {curr_cnt, total_cnt, maxsz} :context={0,0,0} trans={0,0,0} attrs={0,0,0} 
000  
000 "westnet--eastnet-ikev2": 192.0.1.0/24===192.1.2.45<192.1.2.45>[@west,S=C]...192.1.2.23<192.1.2.23>[@east,S=C]===192.0.2.0/24; unrouted; eroute owner: #0
000 "westnet--eastnet-ikev2":     myip=unset; hisip=unset;
000 "westnet--eastnet-ikev2":   ike_life: 3600s; ipsec_life: 28800s; rekey_margin: 540s; rekey_fuzz: 100%; keyingtries: 3
000 "westnet--eastnet-ikev2":   policy: RSASIG+ENCRYPT+TUNNEL+PFS+IKEV1_DISABLE+IKEv2ALLOW+IKEV2_PROPOSE; prio: 24,24; interface: eth1;
000 "westnet--eastnet-ikev2":   newest ISAKMP SA: #0; newest IPsec SA: #0;
000  
000  
west:~#
 ipsec whack --debug none --debug control --debug controlmore --debug parsing --debug crypt
west:~#
 /testing/pluto/bin/wait-until-pluto-started
west:~#
 echo done
done
west:~#
 ipsec auto --up  westnet-eastnet-ikev2
133 "westnet--eastnet-ikev2" #1: STATE_PARENT_I1: initiate
133 "westnet--eastnet-ikev2" #1: STATE_PARENT_I1: sent v2I1, expected v2R1
134 "westnet--eastnet-ikev2" #2: STATE_PARENT_I2: sent v2I2, expected v2R2 {auth=IKEv2 cipher=aes_128 integ=sha1 prf=oakley_sha group=modp2048}
004 "westnet--eastnet-ikev2" #2: STATE_PARENT_I3: PARENT SA established tunnel mode
west:~#
 ipsec look
west NOW
192.0.1.0/24       -> 192.0.2.0/24       => tun0xIPIP@192.1.2.23 esp0xESPSPI@192.1.2.23
ipsec0->eth1 mtu=16260(9999)->1500
tun0xTUN#@192.1.2.23 IPIP: dir=out src=192.1.2.45 natencap=none natsport=0 natdport=0  
esp0xKLIPSPIK@192.1.2.23 ESP_AES_HMAC_SHA1: dir=out src=192.1.2.45 iv_bits=128bits iv=0xIVISFORRANDOM000IVISFORRANDOM000 ooowin=64 alen=160 aklen=160 eklen=128 natencap=none natsport=0 natdport=0  
esp0xKLIPSPIK@192.1.2.45 ESP_AES_HMAC_SHA1: dir=in  src=192.1.2.23 iv_bits=128bits iv=0xIVISFORRANDOM000IVISFORRANDOM000 ooowin=64 alen=160 aklen=160 eklen=128 natencap=none natsport=0 natdport=0  
tun0xTUN#@192.1.2.45 IPIP: dir=in  src=192.1.2.23 policy=192.0.2.0/24->192.0.1.0/24 flags=0x8<> natencap=none natsport=0 natdport=0  
ROUTING TABLE
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 dev ipsec0  scope link 
default via 192.1.2.254 dev eth1 
west:~#
 echo done
done
west:~#
 

west:~#
west:~#
 ../bin/check-for-core.sh
west:~#

