../../guestbin/prep.sh
'ipsec.conf' -> '/etc/ipsec.conf'
'ipsec.secrets' -> '/etc/ipsec.secrets'
rise #
 ../../guestbin/ip.sh link add dev ipsec1 type xfrm dev eth2 if_id 1
rise #
 ../../guestbin/ip.sh addr add 198.18.12.12/24 dev ipsec1
rise #
 ../../guestbin/ip.sh link set ipsec1 up
rise #
 ../../guestbin/ip.sh addr show ipsec1
X: ipsec1@eth2: <NOARP,UP,LOWER_UP> mtu 1500 state UNKNOWN
    inet 198.18.12.12/24 scope global ipsec1
       valid_lft forever preferred_lft forever
    inet6 fe80::xxxx/64 scope link stable-privacy proto kernel_ll
       valid_lft forever preferred_lft forever
rise #
 ../../guestbin/ip.sh link show ipsec1
X: ipsec1@eth2: <NOARP,UP,LOWER_UP> mtu 1500 state UNKNOWN
rise #
 ../../guestbin/ipsec-kernel-policy.sh
rise #
 ip -4 route add 198.18.15.0/24 dev ipsec1
rise #
 ipsec start
Redirecting to: [initsystem]
rise #
 ../../guestbin/wait-until-pluto-started
rise #
 ipsec add rise-set
"rise-set": added IKEv2 connection
rise #
 ipsec up rise-set
"rise-set" #1: initiating IKEv2 connection to 198.18.1.15 using UDP
"rise-set" #1: sent IKE_SA_INIT request to 198.18.1.15:UDP/500
"rise-set" #1: processed IKE_SA_INIT response from 198.18.1.15:UDP/500 {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=DH19}, initiating IKE_AUTH
"rise-set" #1: sent IKE_AUTH request to 198.18.1.15:UDP/500
"rise-set" #1: initiator established IKE SA; authenticated peer using authby=secret and ID_FQDN '@east'
"rise-set" #2: initiator established Child SA using #1; IPsec tunnel [198.18.15.0/24===192.19.12.0/24] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA1_96 DPD=passive}
rise #
 ../../guestbin/ping-once.sh --up -I 198.18.12.12 198.18.15.15
down UNEXPECTED
# ping -n -c 1  -i 6 -w 5   -I 198.18.12.12 198.18.15.15
PING 198.18.15.15 (198.18.15.15) from 198.18.12.12 : 56(84) bytes of data. From 198.18.12.12 icmp_seq=1 Destination Host Unreachable --- 198.18.15.15 ping statistics --- 1 packets transmitted, 0 received, +1 errors, 100% packet loss, time XXXX
rise #
 ../../guestbin/ipsec-kernel-state.sh
src 198.18.1.12 dst 198.18.1.15
	proto esp spi 0xSPISPI reqid REQID mode tunnel
	replay-window 0 flag af-unspec esn
	output-mark 0x1/0xffffffff
	auth-trunc hmac(sha1) 0xHASHKEY 96
	enc cbc(aes) 0xENCKEY
	anti-replay esn context:
	 seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX
	 replay_window 0, bitmap-length 0
	if_id 0x1
src 198.18.1.15 dst 198.18.1.12
	proto esp spi 0xSPISPI reqid REQID mode tunnel
	replay-window 0 flag af-unspec esn
	output-mark 0x1/0xffffffff
	auth-trunc hmac(sha1) 0xHASHKEY 96
	enc cbc(aes) 0xENCKEY
	anti-replay esn context:
	 seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX
	 replay_window 128, bitmap-length 4
	 00000000 00000000 00000000 XXXXXXXX 
	if_id 0x1
rise #
 ../../guestbin/ipsec-kernel-policy.sh
src 192.19.12.0/24 dst 198.18.15.0/24
	dir fwd priority PRIORITY ptype main
	tmpl src 198.18.1.15 dst 198.18.1.12
		proto esp reqid REQID mode tunnel
	if_id 0x1
src 192.19.12.0/24 dst 198.18.15.0/24
	dir in priority PRIORITY ptype main
	tmpl src 198.18.1.15 dst 198.18.1.12
		proto esp reqid REQID mode tunnel
	if_id 0x1
src 198.18.15.0/24 dst 192.19.12.0/24
	dir out priority PRIORITY ptype main
	tmpl src 198.18.1.12 dst 198.18.1.15
		proto esp reqid REQID mode tunnel
	if_id 0x1
src ::/0 dst ::/0 proto ipv6-icmp type 135
	dir fwd priority PRIORITY ptype main
src ::/0 dst ::/0 proto ipv6-icmp type 135
	dir in priority PRIORITY ptype main
src ::/0 dst ::/0 proto ipv6-icmp type 135
	dir out priority PRIORITY ptype main
src ::/0 dst ::/0 proto ipv6-icmp type 136
	dir fwd priority PRIORITY ptype main
src ::/0 dst ::/0 proto ipv6-icmp type 136
	dir in priority PRIORITY ptype main
src ::/0 dst ::/0 proto ipv6-icmp type 136
	dir out priority PRIORITY ptype main
rise #
 #../../guestbin/ip.sh xfrm state flush
rise #
 #../../guestbin/ip.sh link delete ipsec1
rise #
 
