blob: 2e38fbabca2e52a15f82b0d324ac3f2cd9cfc595 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/bash
echo "Initialization Docker 2 - SSWAN in kernel"
# tested only with 5.9.5 and 5.9.6 version of strongSwan
VERSION_SSWAN=5.9.6
curl -o ./strongswan-${VERSION_SSWAN}.tar.gz -LO https://github.com/strongswan/strongswan/archive/${VERSION_SSWAN}.tar.gz;
tar -zxof ./strongswan-${VERSION_SSWAN}.tar.gz
cd /root/strongswan-${VERSION_SSWAN}
./autogen.sh
./configure --prefix=/usr --sysconfdir=/etc --enable-libipsec --enable-systemd --enable-swanctl --disable-gmp --enable-openssl
make -j$(nproc)
sudo make install
sudo cp /root/vpp_sswan/docker/configs/swanctl_docker2.conf /etc/swanctl/conf.d/swanctl.conf
sudo systemctl daemon-reload
sudo systemctl restart strongswan.service
echo "### Loaded plugin in strogswan"
sudo swanctl --stats
|