If you enable EPEL on Amazon Linux 2 and install strongSwan, strongSwan 5.7 will be installed. However, I could not find a way to install swanctl, so download and install strongSwan 5.9.1, which is the current release as of 2021/1 from the official website.
That said, all you have to do is configure
, make
, and make install
, but leave it as your own memorandum.
Download from the following site.
https://www.strongswan.org/download.html
It didn't work unless I installed it as the root user, so I did sudo su -
first.
sudo su - #Switch to root user
yum update -y
yum install wget gcc gmp-devel -y
wget https://download.strongswan.org/strongswan-5.9.1.tar.gz
md5sum strongswan-5.9.1.tar.gz #Check if the hash values match
tar xzvf strongswan-5.9.1.tar.gz
cd strongswan-5.9.1
./configure
make
make install
/etc/systemd/system/strongswan.service
[Unit]
Description=strongSwan
[Service]
Type=forking
ExecStart=/usr/local/sbin/ipsec start
ExecStop=/usr/local/sbin/ipsec stop
[Install]
WantedBy=multi-user.target
/usr/local/etc/strongswan.conf
charon {
(abridgement)
start-scripts {
swanctl = /usr/local/sbin/swanctl -q
}
(abridgement)
}
Place the swanctl configuration file in the following folder.
/usr/local/etc/swanctl/conf.d/xxx.conf
strongSwan Installation Documentation
Recommended Posts