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 3des-cbc \
32 de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
34 auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
37 sa in 9 cipher_algo 3des-cbc \
39 de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
41 auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
45 sa out 7 cipher_algo 3des-cbc \
47 de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
49 auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
53 sa out 9 cipher_algo 3des-cbc \
55 de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
57 auth_key de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef:de:ad:be:ef \
61 rt ipv4 dst ${REMOTE_IPV4}/32 port 0
62 rt ipv4 dst ${LOCAL_IPV4}/32 port 1
64 rt ipv6 dst ${REMOTE_IPV6}/128 port 0
65 rt ipv6 dst ${LOCAL_IPV6}/128 port 1
68 neigh port 0 ${REMOTE_MAC}
69 neigh port 1 ${LOCAL_MAC}