3 CRYPTO_DEV=${CRYPTO_DEV:-'--vdev="crypto_aesni_mb0"'}
5 #generate cfg file for ipsec-secgw
8 cat <<EOF > ${SGW_CFG_FILE}
10 sp ipv4 in esp protect 7 pri 2 src ${REMOTE_IPV4}/32 dst ${LOCAL_IPV4}/32 \
11 sport 0:65535 dport 0:65535
12 sp ipv4 in esp bypass pri 1 sport 0:65535 dport 0:65535
15 sp ipv4 out esp protect 7 pri 2 src ${LOCAL_IPV4}/32 dst ${REMOTE_IPV4}/32 \
16 sport 0:65535 dport 0:65535
17 sp ipv4 out esp bypass pri 1 sport 0:65535 dport 0:65535
20 sp ipv6 in esp protect 9 pri 2 src ${REMOTE_IPV6}/128 dst ${LOCAL_IPV6}/128 \
21 sport 0:65535 dport 0:65535
22 sp ipv6 in esp bypass pri 1 sport 0:65535 dport 0:65535
25 sp ipv6 out esp protect 9 pri 2 src ${LOCAL_IPV6}/128 dst ${REMOTE_IPV6}/128 \
26 sport 0:65535 dport 0:65535
27 sp ipv6 out esp bypass pri 1 sport 0:65535 dport 0:65535
30 sa in 7 cipher_algo aes-128-cbc \
31 cipher_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
33 auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
36 sa in 9 cipher_algo aes-128-cbc \
37 cipher_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
39 auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
43 sa out 7 cipher_algo aes-128-cbc \
44 cipher_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
46 auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
50 sa out 9 cipher_algo aes-128-cbc \
51 cipher_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
53 auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
57 rt ipv4 dst ${REMOTE_IPV4}/32 port 0
58 rt ipv4 dst ${LOCAL_IPV4}/32 port 1
60 rt ipv6 dst ${REMOTE_IPV6}/128 port 0
61 rt ipv6 dst ${LOCAL_IPV6}/128 port 1
64 neigh port 0 ${REMOTE_MAC}
65 neigh port 1 ${LOCAL_MAC}