3 . ${DIR}/tun_aesgcm_common_defs.sh
5 SGW_CMD_XPRM='-e -w 300'
9 ssh ${REMOTE_HOST} ip xfrm policy flush
10 ssh ${REMOTE_HOST} ip xfrm state flush
12 ssh ${REMOTE_HOST} ip xfrm policy add \
13 src ${REMOTE_IPV4} dst ${LOCAL_IPV4} \
14 dir out ptype main action allow \
15 tmpl src ${REMOTE_IPV4} dst ${LOCAL_IPV4} \
16 proto esp mode tunnel reqid 1
18 ssh ${REMOTE_HOST} ip xfrm policy add \
19 src ${LOCAL_IPV4} dst ${REMOTE_IPV4} \
20 dir in ptype main action allow \
21 tmpl src ${LOCAL_IPV4} dst ${REMOTE_IPV4} \
22 proto esp mode tunnel reqid 2
24 ssh ${REMOTE_HOST} ip xfrm state add \
25 src ${REMOTE_IPV4} dst ${LOCAL_IPV4} \
26 proto esp spi 7 reqid 1 mode tunnel replay-window 64 flag esn \
27 aead "rfc4106\(gcm\(aes\)\)" \
28 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef 128
30 ssh ${REMOTE_HOST} ip xfrm state add \
31 src ${LOCAL_IPV4} dst ${REMOTE_IPV4} \
32 proto esp spi 7 reqid 2 mode tunnel replay-window 64 flag esn \
33 aead "rfc4106\(gcm\(aes\)\)" \
34 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef 128
36 ssh ${REMOTE_HOST} ip xfrm policy list
37 ssh ${REMOTE_HOST} ip xfrm state list
44 ssh ${REMOTE_HOST} ip xfrm policy add \
45 src ${REMOTE_IPV6} dst ${LOCAL_IPV6} \
46 dir out ptype main action allow \
47 tmpl src ${REMOTE_IPV6} dst ${LOCAL_IPV6} \
48 proto esp mode tunnel reqid 3
50 ssh ${REMOTE_HOST} ip xfrm policy add \
51 src ${LOCAL_IPV6} dst ${REMOTE_IPV6} \
52 dir in ptype main action allow \
53 tmpl src ${LOCAL_IPV6} dst ${REMOTE_IPV6} \
54 proto esp mode tunnel reqid 4
56 ssh ${REMOTE_HOST} ip xfrm state add \
57 src ${REMOTE_IPV6} dst ${LOCAL_IPV6} \
58 proto esp spi 9 reqid 3 mode tunnel replay-window 64 flag esn \
59 aead "rfc4106\(gcm\(aes\)\)" \
60 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef 128
62 ssh ${REMOTE_HOST} ip xfrm state add \
63 src ${LOCAL_IPV6} dst ${REMOTE_IPV6} \
64 proto esp spi 9 reqid 4 mode tunnel replay-window 64 flag esn \
65 aead "rfc4106\(gcm\(aes\)\)" \
66 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef 128
68 ssh ${REMOTE_HOST} ip xfrm policy list
69 ssh ${REMOTE_HOST} ip xfrm state list