2014年10月24日金曜日

SoftEther VPN on Gentoo

SoftEther VPN is an opensource VPN client/server software, which supports multiple vpn protocols like their own protocol, L2TP/IPsec, OpenVPN, and MS-SSTP. Its client and server software runs on multiple platform including Window, Linux and BSD. Simply saying it's awesome.

Maybe because the software is originally developed on Windows, some part of its behavior is not unix-style.
  • logs are saved in the same directory as the binary locates
  • config file is saved in the same directory as the binary locates

And no ebuild in the gentoo portage exists. That's why I make my portage overlay.
It is available at my github repository.

The ebuild includes several patches that I think not appropriate to merged in mainline.
  1. pid file and log file are saved in /var/run and /var/log/softeher respectively.
  2. disable override /proc/sys/kernel/threads-max setting
  3. activate all features including X.509 authentication that are disabled on original source

How to use my overlay: 

  • emerge layman
  • enable the line of "overlay_defs" in /etc/layman/layman.cfg
  • wget https://raw.githubusercontent.com/yTakatsukasa/misc/master/layman/yutetsu.xml -O /etc/layman/overlays/yutetsu.xml
  • layman -a yutetsu

How to install softether-vpn

After my overlay is enabled,
# emerge softether-vpn
# rc-update add vpnserver
# /etc/init.d/vpnserver start
Then configure the vpnserver. I recommend to use Server Management program on windows to configure the server.