我在VirtualBox中有一个Ubuntu Server 16.04 VM,使用以下命令下载并安装了strongSwan:
sudo apt-get install gcc make libgmp3-dev build-essential
wget http://download.strongswan.org/strongswan-5.6.0.tar.bz2
tar xjvf strongswan-5.6.0.tar.bz2
cd strongswan-5.6.0
./configure --prefix=/usr --sysconfdir=/etc
sudo make
sudo make install
在sudo make
之后,它声明将安装vici插件:
strongSwan will be built with the following plugins
-----------------------------------------------------
libstrongswan: aes des rc2 sha2 sha1 md5 random nonce x509 revocation constraints pubkey pkcs1 pkcs7 pkcs8 pkcs12 pgp dnskey sshkey pem fips-prf gmp curve25519 xcbc cmac hmac
libcharon: attr kernel-netlink resolve socket-default stroke vici updown xauth-generic
libtnccs:
libtpmtss:
但是在构建和安装swanctl --stats
输出之后:
connecting to 'unix:///var/run/charon.vici' failed: No such file or directory
Error: connecting to 'default' URI failed: No such file or directory
strongSwan 5.6.0 swanctl
一切都在strongSwan Installation Documentation上一步一步完成。它不工作的可能原因是什么?
答案 0 :(得分:-2)
问题的解决方案是启动charon守护程序并启用strongswan服务(因此重启后它将自动启动)。对于我的安装,我需要使用这些命令:
sudo /usr/libexec/ipsec/charon &
sudo systemctl enable strongswan.service
另外,我将此选项添加到配置中,因为我使用带有systemd的Ubuntu Server 16.04:
sudo ./configure --prefix=/usr --sysconfdir=/etc --with-systemdsystemunitdir=/lib/systemd/system