| 1 |
/testing/guestbin/swan-prep --userland strongswan |
| 2 |
west # |
| 3 |
# confirm that the network is alive |
| 4 |
west # |
| 5 |
../../guestbin/wait-until-alive -I 192.0.1.254 192.0.2.254 |
| 6 |
destination -I 192.0.1.254 192.0.2.254 is alive |
| 7 |
west # |
| 8 |
# ensure that clear text does not get through |
| 9 |
west # |
| 10 |
iptables -A INPUT -i eth1 -s 192.0.2.0/24 -j DROP |
| 11 |
west # |
| 12 |
iptables -I INPUT -m policy --dir in --pol ipsec -j ACCEPT |
| 13 |
west # |
| 14 |
# confirm clear text does not get through |
| 15 |
west # |
| 16 |
../../guestbin/ping-once.sh --down -I 192.0.1.254 192.0.2.254 |
| 17 |
down |
| 18 |
west # |
| 19 |
../../guestbin/strongswan-start.sh |
| 20 |
west # |
| 21 |
echo "initdone" |
| 22 |
initdone |
| 23 |
west # |
| 24 |
strongswan up westnet-eastnet-ikev1 |
| 25 |
initiating Main Mode IKE_SA westnet-eastnet-ikev1[1] to 192.1.2.23 |
| 26 |
generating ID_PROT request 0 [ SA V V V V V ] |
| 27 |
sending packet: from 192.1.2.45[500] to 192.1.2.23[500] (XXX bytes) |
| 28 |
received packet: from 192.1.2.23[500] to 192.1.2.45[500] (XXX bytes) |
| 29 |
parsed ID_PROT response 0 [ SA V V V ] |
| 30 |
received FRAGMENTATION vendor ID |
| 31 |
received DPD vendor ID |
| 32 |
received NAT-T (RFC 3947) vendor ID |
| 33 |
selected proposal: IKE:AES_CBC_128/HMAC_SHA2_256_128/PRF_HMAC_SHA2_256/ECP_256 |
| 34 |
generating ID_PROT request 0 [ KE No NAT-D NAT-D ] |
| 35 |
sending packet: from 192.1.2.45[500] to 192.1.2.23[500] (XXX bytes) |
| 36 |
received packet: from 192.1.2.23[500] to 192.1.2.45[500] (XXX bytes) |
| 37 |
parsed ID_PROT response 0 [ KE No NAT-D NAT-D ] |
| 38 |
generating ID_PROT request 0 [ ID HASH N(INITIAL_CONTACT) ] |
| 39 |
sending packet: from 192.1.2.45[500] to 192.1.2.23[500] (XXX bytes) |
| 40 |
received packet: from 192.1.2.23[500] to 192.1.2.45[500] (XXX bytes) |
| 41 |
parsed ID_PROT response 0 [ ID HASH ] |
| 42 |
IKE_SA westnet-eastnet-ikev1[1] established between 192.1.2.45[west]...192.1.2.23[east] |
| 43 |
scheduling reauthentication in XXXs |
| 44 |
maximum IKE_SA lifetime XXXs |
| 45 |
generating QUICK_MODE request 0123456789 [ HASH SA No KE ID ID ] |
| 46 |
sending packet: from 192.1.2.45[500] to 192.1.2.23[500] (XXX bytes) |
| 47 |
received packet: from 192.1.2.23[500] to 192.1.2.45[500] (XXX bytes) |
| 48 |
parsed QUICK_MODE response 0123456789 [ HASH SA No KE ID ID ] |
| 49 |
selected proposal: ESP:AES_CBC_128/HMAC_SHA1_96/MODP_2048/NO_EXT_SEQ |
| 50 |
CHILD_SA westnet-eastnet-ikev1{1} established with SPIs SPISPI_i SPISPI_o and TS 192.0.1.0/24 === 192.0.2.0/24 |
| 51 |
connection 'westnet-eastnet-ikev1' established successfully |
| 52 |
west # |
| 53 |
../../guestbin/ping-once.sh --up -I 192.0.1.254 192.0.2.254 |
| 54 |
up |
| 55 |
west # |
| 56 |
echo done |
| 57 |
done |
| 58 |
west # |
| 59 |
if [ -f /var/run/pluto/pluto.pid ]; then ../../guestbin/ipsec-kernel-state.sh ; fi |
| 60 |
west # |
| 61 |
if [ -f /var/run/pluto/pluto.pid ]; then ../../guestbin/ipsec-kernel-policy.sh ; fi |
| 62 |
west # |
| 63 |
if [ -f /var/run/charon.pid -o -f /var/run/strongswan/charon.pid ]; then strongswan status ; fi |
| 64 |
Shunted Connections: |
| 65 |
Bypass LAN 192.0.1.0/24: 192.0.1.0/24 === 192.0.1.0/24 PASS |
| 66 |
Bypass LAN 192.1.2.0/24: 192.1.2.0/24 === 192.1.2.0/24 PASS |
| 67 |
Security Associations (1 up, 0 connecting): |
| 68 |
westnet-eastnet-ikev1[1]: ESTABLISHED XXX second ago, 192.1.2.45[west]...192.1.2.23[east] |
| 69 |
westnet-eastnet-ikev1{1}: INSTALLED, TUNNEL, reqid 1, ESP SPIs: SPISPI_i SPISPI_o |
| 70 |
westnet-eastnet-ikev1{1}: 192.0.1.0/24 === 192.0.2.0/24 |
| 71 |
west # |
| 72 |
|