../../guestbin/prep.sh
ipsec.conf -> PATH/etc/ipsec.conf
ipsec.secrets -> PATH/etc/ipsec.secrets
rise #
 ifconfig ipsec1 create reqid 100
rise #
 ifconfig ipsec1 inet tunnel 198.18.1.12 198.18.1.15
rise #
 ifconfig ipsec1 inet 198.18.12.12/24 198.18.15.15
rise #
 ifconfig ipsec1
ipsec1: flags=1008051<UP,POINTOPOINT,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 1400
	options=0
	tunnel inet 198.18.1.12 --> 198.18.1.15
	inet 198.18.12.12 --> 198.18.15.15 netmask 0xffffff00
	groups: ipsec
	reqid: 100
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
rise #
 ipsec _kernel state
No SAD entries.
rise #
 ipsec _kernel policy
0.0.0.0/0[any] 0.0.0.0/0[any] any
	in ipsec
	esp/tunnel/198.18.1.15-198.18.1.12/unique:100
	spid=1 seq=3 pid=PID scope=ifnet ifname=ipsec1
	refcnt=1
::/0[any] ::/0[any] any
	in ipsec
	esp/tunnel/198.18.1.15-198.18.1.12/unique:100
	spid=3 seq=2 pid=PID scope=ifnet ifname=ipsec1
	refcnt=1
0.0.0.0/0[any] 0.0.0.0/0[any] any
	out ipsec
	esp/tunnel/198.18.1.12-198.18.1.15/unique:100
	spid=2 seq=1 pid=PID scope=ifnet ifname=ipsec1
	refcnt=1
::/0[any] ::/0[any] any
	out ipsec
	esp/tunnel/198.18.1.12-198.18.1.15/unique:100
	spid=4 seq=0 pid=PID scope=ifnet ifname=ipsec1
	refcnt=1
rise #
 ipsec start
Redirecting to: [initsystem]
Initializing NSS database
Starting pluto.
rise #
 ../../guestbin/wait-until-pluto-started
rise #
 ipsec add rise-set
"rise-set": command "ifconfig": 'ifconfig' 'ipsec1'
"rise-set": command "ifconfig" output: ipsec1: flags=1008051<UP,POINTOPOINT,RUNNING,MULTICAST,LOWER_UP> metric 0 mtu 1400
"rise-set": command "ifconfig" output: \toptions=0
"rise-set": command "ifconfig" output: \ttunnel inet 198.18.1.12 --> 198.18.1.15
"rise-set": command "ifconfig" output: \tinet 198.18.12.12 --> 198.18.15.15 netmask 0xffffff00
"rise-set": command "ifconfig" output: \tgroups: ipsec
"rise-set": command "ifconfig" output: \treqid: 100
"rise-set": command "ifconfig" output: \tnd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
"rise-set": command "ifconfig": exited normally
"rise-set": added oriented IKEv2 connection
rise #
 ipsec up rise-set # sanitize-retransmits
"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 ke=DH19}, initiating IKE_AUTH
"rise-set" #1: sent IKE_AUTH request to 198.18.1.15:UDP/500 with shared-key-mac and FQDN '@west'; Child SA #2 {ESP <0xESPESP} [0.0.0.0/0===0.0.0.0/0]
"rise-set" #1: processing IKE_AUTH response from 198.18.1.15:UDP/500 containing SK{IDr,AUTH,SA,TSi,TSr}
"rise-set" #1: initiator established IKE SA; authenticated peer using authby=secret and FQDN '@east'
"rise-set" #2: BSD doesn't add kernel-policy to an ipsec-interface (ipsec1@vtnet0)
"rise-set" #2: command "ifconfig up": 'ifconfig' 'ipsec1' 'up'
"rise-set" #2: command "ifconfig up": exited normally
"rise-set" #2: BSD doesn't add kernel-policy to an ipsec-interface (ipsec1@vtnet0)
"rise-set" #2: initiator established Child SA using #1; IPsec tunnel [0.0.0.0/0===0.0.0.0/0] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA1_96 DPD=passive}
rise #
 sleep 10 # give fping some time
rise #
 ../../guestbin/ping-once.sh --up -I 198.18.12.12 198.18.15.15
up
rise #
 ipsec _kernel state
198.18.1.12 198.18.1.15
	esp mode=any spi=SPISPI(0xSPISPI) reqid=100(0x00000064)
	E: aes-cbc  XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
	A: hmac-sha1  XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
	seq=0x00000002 replay=16 flags=0x00000400 state=mature 
	created: TIMESTAMP	current: TIMESTAMP
	diff: N(s)	hard: 28800(s)	soft: 28800(s)
	last: TIMESTAMP	hard: 0(s)	soft: 0(s)
	current: 304(bytes)	hard: 0(bytes)	soft: 0(bytes)
	allocated: 2	hard: 0	soft: 0
	sadb_seq=1 pid=PID refcnt=1
198.18.1.15 198.18.1.12
	esp mode=any spi=SPISPI(0xSPISPI) reqid=100(0x00000064)
	E: aes-cbc  XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
	A: hmac-sha1  XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
	seq=0x00000002 replay=16 flags=0x00000400 state=mature 
	created: TIMESTAMP	current: TIMESTAMP
	diff: N(s)	hard: 28800(s)	soft: 28800(s)
	last: TIMESTAMP	hard: 0(s)	soft: 0(s)
	current: 168(bytes)	hard: 0(bytes)	soft: 0(bytes)
	allocated: 2	hard: 0	soft: 0
	sadb_seq=0 pid=PID refcnt=1
rise #
 ipsec _kernel policy
0.0.0.0/0[any] 0.0.0.0/0[any] any
	in ipsec
	esp/tunnel/198.18.1.15-198.18.1.12/unique:100
	spid=1 seq=3 pid=PID scope=ifnet ifname=ipsec1
	refcnt=1
::/0[any] ::/0[any] any
	in ipsec
	esp/tunnel/198.18.1.15-198.18.1.12/unique:100
	spid=3 seq=2 pid=PID scope=ifnet ifname=ipsec1
	refcnt=1
0.0.0.0/0[any] 0.0.0.0/0[any] any
	out ipsec
	esp/tunnel/198.18.1.12-198.18.1.15/unique:100
	spid=2 seq=1 pid=PID scope=ifnet ifname=ipsec1
	refcnt=1
::/0[any] ::/0[any] any
	out ipsec
	esp/tunnel/198.18.1.12-198.18.1.15/unique:100
	spid=4 seq=0 pid=PID scope=ifnet ifname=ipsec1
	refcnt=1
rise #
 ipsec delete rise-set
"rise-set": terminating SAs using this connection
"rise-set" #1: deleting IKE SA (ESTABLISHED_IKE_SA) and sending notification
"rise-set" #2: BSD doesn't add kernel-policy to an ipsec-interface (ipsec1@vtnet0)
"rise-set" #2: BSD doesn't add kernel-policy to an ipsec-interface (ipsec1@vtnet0)
"rise-set" #2: ESP traffic information: in=168B out=304B
rise #
 setkey -F
rise #
 ifconfig ipsec1 destroy
rise #
