Debian 9 で SoftEther VPN Server を インストールしようとすると make
が失敗する。
make[1]: Entering directory '/opt/vpnserver'
Preparing SoftEther VPN Server...
ranlib lib/libcharset.a
ranlib lib/libcrypto.a
ranlib lib/libedit.a
ranlib lib/libiconv.a
ranlib lib/libintelaes.a
ranlib lib/libncurses.a
ranlib lib/libssl.a
ranlib lib/libz.a
ranlib code/vpnserver.a
gcc code/vpnserver.a -O2 -fsigned-char -pthread -m64 -lm -ldl -lrt -lpthread -L./ lib/libssl.a lib/libcrypto.a lib/libiconv.a lib/libcharset.a lib/libedit.a lib/libncurses.a lib/libz.a lib/libintelaes.a -o vpnserver
/usr/bin/ld: code/vpnserver.a(vpnserver.o): relocation R_X86_64_32 against symbol `StopProcess' can not be used when making a shared object; recompile with -fPIC
~中略~
/usr/bin/ld: lib/libintelaes.a(intel_aes.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Makefile:18: recipe for target 'i_read_and_agree_the_license_agreement' failed
make[1]: *** [i_read_and_agree_the_license_agreement] Error 1
make[1]: Leaving directory '/opt/vpnserver'
どうやら OpenSSL のバージョンが新しくなったのが問題らしい。
https://github.com/SoftEtherVPN/SoftEtherVPN/issues/301#issuecomment-323595911
リリースノートにも書いてあった
https://ja.softether.org/5-download/history
オープンソース版: SoftEther VPN 4.23 Build 9647 Beta (2017/10/18)
製品版: PacketiX VPN 4.23 Build 9647 Beta
OpenSSL のバージョンを 1.0.2l にバージョンアップ。
ソースコードが OpenSSL 1.1.x に対応。TLS 1.2 の新たな暗号化方式である DHE-RSA-CHACHA20-POLY1305, ECDHE-RSA-CHACHA20-POLY1305 をサポート。(この新機能を使用するためには、OpenSSL 1.1.x を用いて自前でコンパイルが必要です。)
解決策
parrot のリポジトリに softether-vpnserver のパッケージがあったのでこれを使います。
echo 'deb http://archive.parrotsec.org/parrot parrot main' > /etc/apt/sources.list.d/parrot.list
wget -qO - https://archive.parrotsec.org/parrot/misc/parrotsec.gpg | apt-key add -
apt update
apt install softether-vpnserver