| 1 |
/testing/guestbin/swan-prep --x509 |
| 2 |
Preparing X.509 files |
| 3 |
east # |
| 4 |
ipsec certutil -D -n road |
| 5 |
east # |
| 6 |
cp east-ikev2-oe.conf /etc/ipsec.d/ikev2-oe.conf |
| 7 |
east # |
| 8 |
cp policies/* /etc/ipsec.d/policies/ |
| 9 |
east # |
| 10 |
echo "192.1.3.0/24" >> /etc/ipsec.d/policies/private-or-clear |
| 11 |
east # |
| 12 |
# don't start ipsec yet |
| 13 |
east # |
| 14 |
echo "initdone" |
| 15 |
initdone |
| 16 |
east # |
| 17 |
ipsec start |
| 18 |
Redirecting to: [initsystem] |
| 19 |
east # |
| 20 |
../../guestbin/wait-until-pluto-started |
| 21 |
east # |
| 22 |
# give OE policies time to load |
| 23 |
east # |
| 24 |
../../guestbin/wait-for.sh --match 'loaded 10,' -- ipsec auto --status |
| 25 |
Total IPsec connections: loaded 10, active 0 |
| 26 |
east # |
| 27 |
# trigger OE |
| 28 |
east # |
| 29 |
../../guestbin/ping-once.sh --forget -I 192.1.2.23 192.1.3.209 |
| 30 |
fired and forgotten |
| 31 |
east # |
| 32 |
../../guestbin/wait-for.sh --match private-or-clear -- ipsec trafficstatus |
| 33 |
#2: "private-or-clear#192.1.3.0/24"[1] ...192.1.3.209, type=ESP, add_time=1234567890, inBytes=0, outBytes=0, maxBytes=2^63B, id='C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=road.testing.libreswan.org, [email protected]' |
| 34 |
east # |
| 35 |
../../guestbin/ping-once.sh --up -I 192.1.2.23 192.1.3.209 |
| 36 |
up |
| 37 |
east # |
| 38 |
../../guestbin/ping-once.sh --up -I 192.1.2.23 192.1.3.209 |
| 39 |
up |
| 40 |
east # |
| 41 |
../../guestbin/ping-once.sh --up -I 192.1.2.23 192.1.3.209 |
| 42 |
up |
| 43 |
east # |
| 44 |
# traffic minus first packet should have flown through tunnel |
| 45 |
east # |
| 46 |
ipsec trafficstatus |
| 47 |
#2: "private-or-clear#192.1.3.0/24"[1] ...192.1.3.209, type=ESP, add_time=1234567890, inBytes=252, outBytes=252, maxBytes=2^63B, id='C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=road.testing.libreswan.org, [email protected]' |
| 48 |
east # |
| 49 |
# OE has been triggered. |
| 50 |
east # |
| 51 |
# there should be no %pass shunts on either side and an active tunnel and no partial IKE states |
| 52 |
east # |
| 53 |
ipsec status |grep STATE_ |
| 54 |
#1: "private-or-clear#192.1.3.0/24"[1] ...192.1.3.209:500 ESTABLISHED_IKE_SA (established IKE SA); REKEY in XXs; REPLACE in XXs; newest; idle; |
| 55 |
#2: "private-or-clear#192.1.3.0/24"[1] ...192.1.3.209:500 ESTABLISHED_CHILD_SA (established Child SA); REKEY in XXs; REPLACE in XXs; newest; eroute owner; IKE SA #1; idle; |
| 56 |
east # |
| 57 |
ipsec trafficstatus |
| 58 |
#2: "private-or-clear#192.1.3.0/24"[1] ...192.1.3.209, type=ESP, add_time=1234567890, inBytes=252, outBytes=252, maxBytes=2^63B, id='C=CA, ST=Ontario, L=Toronto, O=Libreswan, OU=Test Department, CN=road.testing.libreswan.org, [email protected]' |
| 59 |
east # |
| 60 |
ipsec shuntstatus |
| 61 |
Bare Shunt list: |
| 62 |
|
| 63 |
east # |
| 64 |
../../guestbin/ipsec-look.sh |
| 65 |
east NOW |
| 66 |
XFRM state: |
| 67 |
src 192.1.3.209 dst 192.1.2.23 |
| 68 |
proto esp spi 0xSPISPI reqid REQID mode tunnel |
| 69 |
replay-window 0 flag af-unspec esn |
| 70 |
aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128 |
| 71 |
lastused YYYY-MM-DD HH:MM:SS |
| 72 |
anti-replay esn context: |
| 73 |
seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX |
| 74 |
replay_window 128, bitmap-length 4 |
| 75 |
00000000 00000000 00000000 XXXXXXXX |
| 76 |
src 192.1.2.23 dst 192.1.3.209 |
| 77 |
proto esp spi 0xSPISPI reqid REQID mode tunnel |
| 78 |
replay-window 0 flag af-unspec esn |
| 79 |
aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128 |
| 80 |
lastused YYYY-MM-DD HH:MM:SS |
| 81 |
anti-replay esn context: |
| 82 |
seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX |
| 83 |
replay_window 128, bitmap-length 4 |
| 84 |
00000000 00000000 00000000 XXXXXXXX |
| 85 |
src 192.1.2.23 dst 192.1.3.209 |
| 86 |
proto esp spi 0x00000000 reqid 0 mode transport |
| 87 |
replay-window 0 |
| 88 |
sel src 192.1.2.23/32 dst 192.1.3.209/32 proto icmp type 8 code 0 dev eth1 |
| 89 |
XFRM policy: |
| 90 |
src 192.1.2.23/32 dst 192.1.2.253/32 |
| 91 |
dir out priority PRIORITY ptype main |
| 92 |
src 192.1.2.23/32 dst 192.1.2.254/32 |
| 93 |
dir out priority PRIORITY ptype main |
| 94 |
src 192.1.2.23/32 dst 192.1.3.209/32 |
| 95 |
dir out priority PRIORITY ptype main |
| 96 |
tmpl src 192.1.2.23 dst 192.1.3.209 |
| 97 |
proto esp reqid REQID mode tunnel |
| 98 |
src 192.1.2.23/32 dst 192.1.3.253/32 |
| 99 |
dir out priority PRIORITY ptype main |
| 100 |
src 192.1.2.23/32 dst 192.1.3.254/32 |
| 101 |
dir out priority PRIORITY ptype main |
| 102 |
src 192.1.2.253/32 dst 192.1.2.23/32 |
| 103 |
dir fwd priority PRIORITY ptype main |
| 104 |
src 192.1.2.253/32 dst 192.1.2.23/32 |
| 105 |
dir in priority PRIORITY ptype main |
| 106 |
src 192.1.2.254/32 dst 192.1.2.23/32 |
| 107 |
dir fwd priority PRIORITY ptype main |
| 108 |
src 192.1.2.254/32 dst 192.1.2.23/32 |
| 109 |
dir in priority PRIORITY ptype main |
| 110 |
src 192.1.3.209/32 dst 192.1.2.23/32 |
| 111 |
dir fwd priority PRIORITY ptype main |
| 112 |
tmpl src 192.1.3.209 dst 192.1.2.23 |
| 113 |
proto esp reqid REQID mode tunnel |
| 114 |
src 192.1.3.209/32 dst 192.1.2.23/32 |
| 115 |
dir in priority PRIORITY ptype main |
| 116 |
tmpl src 192.1.3.209 dst 192.1.2.23 |
| 117 |
proto esp reqid REQID mode tunnel |
| 118 |
src 192.1.3.253/32 dst 192.1.2.23/32 |
| 119 |
dir fwd priority PRIORITY ptype main |
| 120 |
src 192.1.3.253/32 dst 192.1.2.23/32 |
| 121 |
dir in priority PRIORITY ptype main |
| 122 |
src 192.1.3.254/32 dst 192.1.2.23/32 |
| 123 |
dir fwd priority PRIORITY ptype main |
| 124 |
src 192.1.3.254/32 dst 192.1.2.23/32 |
| 125 |
dir in priority PRIORITY ptype main |
| 126 |
src 192.1.2.23/32 dst 192.1.3.0/24 |
| 127 |
dir out priority PRIORITY ptype main |
| 128 |
tmpl src 0.0.0.0 dst 0.0.0.0 |
| 129 |
proto esp reqid 0 mode transport |
| 130 |
XFRM done |
| 131 |
IPSEC mangle TABLES |
| 132 |
iptables filter TABLE |
| 133 |
Chain INPUT (policy ACCEPT) |
| 134 |
target prot opt source destination |
| 135 |
Chain FORWARD (policy ACCEPT) |
| 136 |
target prot opt source destination |
| 137 |
Chain OUTPUT (policy ACCEPT) |
| 138 |
target prot opt source destination |
| 139 |
ROUTING TABLES |
| 140 |
default via 192.1.2.254 dev eth1 |
| 141 |
192.0.1.0/24 via 192.1.2.45 dev eth1 |
| 142 |
192.0.2.0/24 dev eth0 proto kernel scope link src 192.0.2.254 |
| 143 |
192.1.2.0/24 dev eth1 proto kernel scope link src 192.1.2.23 |
| 144 |
NSS_CERTIFICATES |
| 145 |
Certificate Nickname Trust Attributes |
| 146 |
SSL,S/MIME,JAR/XPI |
| 147 |
mainca CT,, |
| 148 |
east u,u,u |
| 149 |
hashsha1 P,, |
| 150 |
nic P,, |
| 151 |
north P,, |
| 152 |
west P,, |
| 153 |
west-ec P,, |
| 154 |
east # |
| 155 |
|