LoginSignup
0

More than 5 years have passed since last update.

centos7にsoftetherをインストール(AES−NI対応)

Last updated at Posted at 2016-12-26

vpn proxyとしての構築方法です

前準備

ansibleを使っているのでansibleをインストールします

yum install -y epel-release
yum install -y git ansible

自動ビルドを実行します

bash
git clone https://github.com/you21979-storage/ansible-infra
cd ansible-infra/build
vi hosts
hosts
[all]
127.0.0.1
bash
ansible-playbook ./softether_aesni.yml -i ./hosts --connection local

起動

/etc/init.d/vpnserver start

終了

/etc/init.d/vpnserver stop

自動起動設定

ln -s /etc/init.d/vpnserver /etc/rc5.d/S99vpnserver

自動ビルドの内容

---
- hosts: all
  user: root

  vars:
    tmpdir: /tmp/softether
  tasks:
    - name: yum install
      yum: name={{item}} state=latest
      with_items:
        - git
        - gcc
        - unzip
        - readline-devel
        - ncurses-devel
        - openssl-devel
        - libselinux-python
    - name: git download softether
      git: repo=https://github.com/SoftEtherVPN/SoftEtherVPN.git dest={{tmpdir}}/softether
    - name: download intel aes-ni
      get_url: url=http://software.intel.com/sites/default/files/article/181731/intel-aesni-sample-library-v1.2.zip dest={{tmpdir}} mode=0440
    - name: unzip
      command: unzip -xo {{tmpdir}}/intel-aesni-sample-library-v1.2.zip chdir={{tmpdir}}
    - name: make
      command: ./mk_lnx64_all.sh chdir={{tmpdir}}/Intel_AESNI_Sample_Library_v1.2
    - name: prepare
      command: cp intel_aes_lib/lib/x64/intel_aes64.a {{tmpdir}}/softether chdir={{tmpdir}}/Intel_AESNI_Sample_Library_v1.2
    - name: configure
      copy: src=templates/softether_aesni/Makefile dest={{tmpdir}}/softether
    - name: make
      command: make chdir={{tmpdir}}/softether
    - name: install
      command: make install chdir={{tmpdir}}/softether
    - name: init script copy
      template: src=templates/softether_aesni/init.j2 dest=/etc/init.d/{{item}} mode=0755
      with_items:
        - vpnserver
        - vpnbridge
        - vpnclient

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0