../../guestbin/swan-prep
west #
 # confirm that the network is alive
west #
 ../../pluto/bin/wait-until-alive 192.0.2.254 -I 192.0.1.254
destination 192.0.2.254 -I 192.0.1.254 is alive
west #
 ipsec start
Redirecting to: systemctl start ipsec.service
west #
 ../../pluto/bin/wait-until-pluto-started
west #
 echo "initdone"
initdone
west #
 ipsec auto --add westnet-eastnet-propnum
002 added connection description "westnet-eastnet-propnum"
west #
 ipsec auto --up westnet-eastnet-propnum
002 "westnet-eastnet-propnum" #1: initiating v2 parent SA
133 "westnet-eastnet-propnum" #1: STATE_PARENT_I1: initiate
133 "westnet-eastnet-propnum" #1: STATE_PARENT_I1: sent v2I1, expected v2R1
134 "westnet-eastnet-propnum" #2: STATE_PARENT_I2: sent v2I2, expected v2R2 {auth=IKEv2 cipher=3des_cbc_192 integ=md5_96 prf=md5 group=MODP2048}
002 "westnet-eastnet-propnum" #2: IKEv2 mode peer ID is ID_FQDN: '@east'
003 "westnet-eastnet-propnum" #2: Authenticated using RSA
002 "westnet-eastnet-propnum" #2: negotiated connection [192.0.1.0-192.0.1.255:0-65535 0] -> [192.0.2.0-192.0.2.255:0-65535 0]
004 "westnet-eastnet-propnum" #2: STATE_V2_IPSEC_I: IPsec SA established tunnel mode {ESP=>0xESPESP <0xESPESP xfrm=AES_CBC_128-HMAC_SHA1_96 NATOA=none NATD=none DPD=passive}
west #
 ipsec auto --delete westnet-eastnet-propnum
002 "westnet-eastnet-propnum": deleting non-instance connection
002 "westnet-eastnet-propnum" #2: deleting state (STATE_V2_IPSEC_I) and sending notification
005 "westnet-eastnet-propnum" #2: ESP traffic information: in=0B out=0B
002 "westnet-eastnet-propnum" #1: deleting state (STATE_PARENT_I3) and sending notification
west #
 : dump all emitted and parsed proposals onto the console
west #
 : weird pattern deals with optional length field
west #
 grep -B 1 -e '|    last proposal: ' -A 3 -e '|    prop #: ' /tmp/pluto.log
| ****emit IKEv2 Proposal Substructure Payload:
|    last proposal: v2_PROPOSAL_NON_LAST (0x2)
|    prop #: 1 (0x1)
|    proto ID: IKEv2_SEC_PROTO_IKE (0x1)
|    spi size: 0 (0x0)
|    # transforms: 5 (0x5)
--
| ****emit IKEv2 Proposal Substructure Payload:
|    last proposal: v2_PROPOSAL_LAST (0x0)
|    prop #: 2 (0x2)
|    proto ID: IKEv2_SEC_PROTO_IKE (0x1)
|    spi size: 0 (0x0)
|    # transforms: 4 (0x4)
--
| ****parse IKEv2 Proposal Substructure Payload:
|    last proposal: v2_PROPOSAL_LAST (0x0)
|    length: 40 (0x28)
|    prop #: 2 (0x2)
|    proto ID: IKEv2_SEC_PROTO_IKE (0x1)
|    spi size: 0 (0x0)
|    # transforms: 4 (0x4)
--
| ******emit IKEv2 Proposal Substructure Payload:
|    last proposal: v2_PROPOSAL_NON_LAST (0x2)
|    prop #: 1 (0x1)
|    proto ID: IKEv2_SEC_PROTO_ESP (0x3)
|    spi size: 4 (0x4)
|    # transforms: 4 (0x4)
--
| ******emit IKEv2 Proposal Substructure Payload:
|    last proposal: v2_PROPOSAL_LAST (0x0)
|    prop #: 2 (0x2)
|    proto ID: IKEv2_SEC_PROTO_ESP (0x3)
|    spi size: 4 (0x4)
|    # transforms: 3 (0x3)
--
| ***parse IKEv2 Proposal Substructure Payload:
|    last proposal: v2_PROPOSAL_LAST (0x0)
|    length: 40 (0x28)
|    prop #: 1 (0x1)
|    proto ID: IKEv2_SEC_PROTO_ESP (0x3)
|    spi size: 4 (0x4)
|    # transforms: 3 (0x3)
west #
west #
 ../bin/check-for-core.sh
west #
 if [ -f /sbin/ausearch ]; then ausearch -r -m avc -ts recent ; fi

