/testing/guestbin/swan-prep --nokeys
Creating empty NSS database
west #
 ip tunnel add eth3 mode gre local 192.1.2.45 remote 192.1.2.23
west #
 ../../guestbin/ip.sh address add 192.1.3.2/24 dev eth3
west #
 ../../guestbin/ip.sh link set dev eth3 up
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec auto --add test1
"test1": added IKEv2 connection
west #
 ipsec auto --add test2
"test2": added unoriented IKEv2 connection (neither left=192.1.3.1 nor right=192.1.3.3 match an interface)
west #
 ipsec auto --add test3
"test3": added IKEv2 connection
west #
 ipsec auto --status | grep interface
using kernel interface: xfrm
interface lo 127.0.0.1:UDP/4500 (NAT)
interface lo 127.0.0.1:UDP/500
interface eth0 192.0.1.254:UDP/4500 (NAT)
interface eth0 192.0.1.254:UDP/500
interface eth1 192.1.2.45:UDP/4500 (NAT)
interface eth1 192.1.2.45:UDP/500
interface eth3 192.1.3.2:UDP/4500 (NAT)
interface eth3 192.1.3.2:UDP/500
"test1":   conn_prio: 32,32,0; interface: eth3; metric: 0; mtu: unset; sa_prio:auto; sa_tfc:none;
"test2":   conn_prio: 32,32,0; interface: ; metric: 0; mtu: unset; sa_prio:auto; sa_tfc:none;
"test3":   conn_prio: 32,32,0; interface: eth3; metric: 0; mtu: unset; sa_prio:auto; sa_tfc:none;
west #
 ipsec auto --status | grep "[.][.][.]"
"test1": 192.1.3.2...192.1.3.1; unrouted; my_ip=unset; their_ip=unset;
"test2": 192.1.3.1...192.1.3.3; unoriented; my_ip=unset; their_ip=unset;
"test3": 192.1.3.2...192.1.3.3; unrouted; my_ip=unset; their_ip=unset;
west #
 ipsec auto --up test1
"test1" #1: initiating IKEv2 connection to 192.1.3.1 using UDP
"test1" #1: sent IKE_SA_INIT request to 192.1.3.1:UDP/500
"test1" #1: processed IKE_SA_INIT response from 192.1.3.1:UDP/500 {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=DH19}, initiating IKE_AUTH
"test1" #1: WARNING: '192.1.3.2' PSK length of 9 bytes is too short for PRF HMAC_SHA2_512 in FIPS mode (32 bytes required)
"test1" #1: sent IKE_AUTH request to 192.1.3.1:UDP/500
"test1" #1: WARNING: '192.1.3.2' PSK length of 9 bytes is too short for PRF HMAC_SHA2_512 in FIPS mode (32 bytes required)
"test1" #1: initiator established IKE SA; authenticated peer using authby=secret and ID_IPV4_ADDR '192.1.3.1'
"test1" #2: initiator established Child SA using #1; IPsec tunnel [192.1.3.2/32===192.1.3.1/32] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE DPD=passive}
west #
 ../../guestbin/ping-once.sh --up -I 192.1.3.2 192.1.3.1
up
west #
 ipsec whack --trafficstatus
#2: "test1", type=ESP, add_time=1234567890, inBytes=84, outBytes=84, maxBytes=2^63B, id='192.1.3.1'
west #
 ../../guestbin/ip.sh address add 192.1.3.3/24 dev eth3
west #
 ipsec auto --ready
listening for IKE messages
adding interface eth3 192.1.3.3:UDP/500
adding interface eth3 192.1.3.3:UDP/4500 (NAT)
"test2": oriented IKEv2 connection (local: right=192.1.3.3  remote: left=192.1.3.1)
"test3": connection matches both right eth3 192.1.3.2 and left eth3 192.1.3.3
forgetting secrets
loading secrets from "/etc/ipsec.secrets"
west #
 ipsec auto --status |grep "[.][.][.]"
"test1": 192.1.3.2...192.1.3.1; routed-tunnel; my_ip=unset; their_ip=unset;
"test2": 192.1.3.3...192.1.3.1; unrouted; my_ip=unset; their_ip=unset;
"test3": 192.1.3.2...192.1.3.3; unoriented; my_ip=unset; their_ip=unset;
west #
 ipsec auto --up test2
"test2" #3: initiating IKEv2 connection to 192.1.3.1 using UDP
"test2" #3: sent IKE_SA_INIT request to 192.1.3.1:UDP/500
"test2" #3: processed IKE_SA_INIT response from 192.1.3.1:UDP/500 {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=DH19}, initiating IKE_AUTH
"test2" #3: WARNING: '192.1.3.3' PSK length of 9 bytes is too short for PRF HMAC_SHA2_512 in FIPS mode (32 bytes required)
"test2" #3: sent IKE_AUTH request to 192.1.3.1:UDP/500
"test2" #3: WARNING: '192.1.3.3' PSK length of 9 bytes is too short for PRF HMAC_SHA2_512 in FIPS mode (32 bytes required)
"test2" #3: initiator established IKE SA; authenticated peer using authby=secret and ID_IPV4_ADDR '192.1.3.1'
"test2" #4: initiator established Child SA using #3; IPsec tunnel [192.1.3.3/32===192.1.3.1/32] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE DPD=passive}
west #
 ../../guestbin/ping-once.sh --up -I 192.1.3.3 192.1.3.1
up
west #
 ipsec whack --trafficstatus
#2: "test1", type=ESP, add_time=1234567890, inBytes=84, outBytes=84, maxBytes=2^63B, id='192.1.3.1'
#4: "test2", type=ESP, add_time=1234567890, inBytes=84, outBytes=84, maxBytes=2^63B, id='192.1.3.1'
west #
 ../../guestbin/ip.sh address del 192.1.3.3/24 dev eth3
west #
 ipsec auto --ready
listening for IKE messages
shutting down interface eth3 192.1.3.3:4500
shutting down interface eth3 192.1.3.3:500
"test2": terminating SAs using this connection
"test2" #3: deleting IKE SA (ESTABLISHED_IKE_SA) and sending notification
ERROR: "test2" #3: send on eth3 from 192.1.3.3:500 to 192.1.3.1:500 using UDP failed in delete notification: Network is unreachable (errno 101)
"test2" #4: unroute-host output: RTNETLINK answers: Network is unreachable
"test2" #4: ESP traffic information: in=84B out=84B
"test3": oriented IKEv2 connection (local: right=192.1.3.2  remote: left=192.1.3.3)
forgetting secrets
loading secrets from "/etc/ipsec.secrets"
west #
 ipsec auto --status |grep "[.][.][.]"
"test1": 192.1.3.2...192.1.3.1; routed-tunnel; my_ip=unset; their_ip=unset;
"test2": 192.1.3.3...192.1.3.1; unoriented; my_ip=unset; their_ip=unset;
"test3": 192.1.3.2...192.1.3.3; unrouted; my_ip=unset; their_ip=unset;
west #
 ipsec auto --status | grep interface
using kernel interface: xfrm
interface lo 127.0.0.1:UDP/4500 (NAT)
interface lo 127.0.0.1:UDP/500
interface eth0 192.0.1.254:UDP/4500 (NAT)
interface eth0 192.0.1.254:UDP/500
interface eth1 192.1.2.45:UDP/4500 (NAT)
interface eth1 192.1.2.45:UDP/500
interface eth3 192.1.3.2:UDP/4500 (NAT)
interface eth3 192.1.3.2:UDP/500
"test1":   conn_prio: 32,32,0; interface: eth3; metric: 0; mtu: unset; sa_prio:auto; sa_tfc:none;
"test2":   conn_prio: 32,32,0; interface: ; metric: 0; mtu: unset; sa_prio:auto; sa_tfc:none;
"test3":   conn_prio: 32,32,0; interface: eth3; metric: 0; mtu: unset; sa_prio:auto; sa_tfc:none;
west #
 ipsec auto --status | grep "[.][.][.]"
"test1": 192.1.3.2...192.1.3.1; routed-tunnel; my_ip=unset; their_ip=unset;
"test2": 192.1.3.3...192.1.3.1; unoriented; my_ip=unset; their_ip=unset;
"test3": 192.1.3.2...192.1.3.3; unrouted; my_ip=unset; their_ip=unset;
west #
 ipsec auto --ready
listening for IKE messages
forgetting secrets
loading secrets from "/etc/ipsec.secrets"
west #
 ipsec auto --status | grep interface
using kernel interface: xfrm
interface lo 127.0.0.1:UDP/4500 (NAT)
interface lo 127.0.0.1:UDP/500
interface eth0 192.0.1.254:UDP/4500 (NAT)
interface eth0 192.0.1.254:UDP/500
interface eth1 192.1.2.45:UDP/4500 (NAT)
interface eth1 192.1.2.45:UDP/500
interface eth3 192.1.3.2:UDP/4500 (NAT)
interface eth3 192.1.3.2:UDP/500
"test1":   conn_prio: 32,32,0; interface: eth3; metric: 0; mtu: unset; sa_prio:auto; sa_tfc:none;
"test2":   conn_prio: 32,32,0; interface: ; metric: 0; mtu: unset; sa_prio:auto; sa_tfc:none;
"test3":   conn_prio: 32,32,0; interface: eth3; metric: 0; mtu: unset; sa_prio:auto; sa_tfc:none;
west #
 ipsec auto --status | grep "[.][.][.]"
"test1": 192.1.3.2...192.1.3.1; routed-tunnel; my_ip=unset; their_ip=unset;
"test2": 192.1.3.3...192.1.3.1; unoriented; my_ip=unset; their_ip=unset;
"test3": 192.1.3.2...192.1.3.3; unrouted; my_ip=unset; their_ip=unset;
west #
 ipsec whack --shutdown
Pluto is shutting down
west #
 ../../guestbin/ip.sh link set dev eth3 down
west #
 ip tunnel del eth3
west #
 
