/testing/guestbin/swan-prep
road #
 # ensure that clear text does not get through
road #
 iptables -A INPUT -i eth0 -s 192.0.2.0/24 -j DROP
road #
 iptables -I INPUT -m policy --dir in --pol ipsec -j ACCEPT
road #
 ipsec start
Redirecting to: [initsystem]
road #
 ../../guestbin/wait-until-pluto-started
road #
 ipsec auto --add road-eastnet-nonat
002 "road-eastnet-nonat": added IKEv2 connection
road #
 ipsec auto --status | grep road-eastnet-nonat
000 "road-eastnet-nonat": 192.0.2.219/32===192.1.3.209[@road]---192.1.3.254...192.1.2.23[@east]===192.0.2.0/24; unrouted; eroute owner: #0
000 "road-eastnet-nonat":     oriented; my_ip=192.0.2.219; their_ip=unset; my_updown=ipsec _updown;
000 "road-eastnet-nonat":   xauth us:none, xauth them:none,  my_username=[any]; their_username=[any]
000 "road-eastnet-nonat":   our auth:rsasig(RSASIG+RSASIG_v1_5), their auth:RSASIG+ECDSA+RSASIG_v1_5, our autheap:none, their autheap:none;
000 "road-eastnet-nonat":   modecfg info: us:none, them:none, modecfg policy:push, dns:unset, domains:unset, cat:unset;
000 "road-eastnet-nonat":   sec_label:unset;
000 "road-eastnet-nonat":   ike_life: 28800s; ipsec_life: 28800s; ipsec_max_bytes: 2^63B; ipsec_max_packets: 2^63; replay_window: 128; rekey_margin: 540s; rekey_fuzz: 100%; keyingtries: 0;
000 "road-eastnet-nonat":   retransmit-interval: 9999ms; retransmit-timeout: 99s; iketcp:no; iketcp-port:4500;
000 "road-eastnet-nonat":   initial-contact:no; cisco-unity:no; fake-strongswan:no; send-vendorid:no; send-no-esp-tfc:no;
000 "road-eastnet-nonat":   policy: IKEv2+RSASIG+ECDSA+RSASIG_v1_5+ENCRYPT+TUNNEL+PFS+IKE_FRAG_ALLOW+ESN_NO+ESN_YES;
000 "road-eastnet-nonat":   v2-auth-hash-policy: SHA2_256+SHA2_384+SHA2_512;
000 "road-eastnet-nonat":   conn_prio: 32,24; interface: eth0; metric: 0; mtu: unset; sa_prio:auto; sa_tfc:none;
000 "road-eastnet-nonat":   nflog-group: unset; mark: unset; vti-iface:unset; vti-routing:no; vti-shared:no; nic-offload:auto;
000 "road-eastnet-nonat":   our idtype: ID_FQDN; our id=@road; their idtype: ID_FQDN; their id=@east
000 "road-eastnet-nonat":   liveness: passive; dpdaction:hold; dpddelay:0s; retransmit-timeout:60s
000 "road-eastnet-nonat":   nat-traversal: encaps:auto; keepalive:20s
000 "road-eastnet-nonat":   newest IKE SA: #0; newest IPsec SA: #0; conn serial: $1;
road #
 ipsec whack --impair suppress-retransmits
road #
 echo "initdone"
initdone
road #
 ipsec auto --up road-eastnet-nonat
1v2 "road-eastnet-nonat" #1: initiating IKEv2 connection
1v2 "road-eastnet-nonat" #1: sent IKE_SA_INIT request to 192.1.2.23:500
1v2 "road-eastnet-nonat" #1: sent IKE_AUTH request {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=MODP2048}
003 "road-eastnet-nonat" #1: initiator established IKE SA; authenticated peer '2nnn-bit RSASSA-PSS with SHA2_512' digital signature using preloaded certificate '@east'
004 "road-eastnet-nonat" #2: initiator established Child SA using #1; IPsec tunnel [192.0.2.219-192.0.2.219:0-65535 0] -> [192.0.2.0-192.0.2.255:0-65535 0] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE DPD=passive}
road #
 ../../guestbin/ping-once.sh --up 192.0.2.254
up
road #
 ipsec whack --trafficstatus
006 #2: "road-eastnet-nonat", type=ESP, add_time=1234567890, inBytes=84, outBytes=84, maxBytes=2^63B, id='@east'
road #
 echo done
done
road #
 hostname | grep east > /dev/null && ipsec whack --rekey-ipsec --name road-eastnet-nonat
road #
 
