/vpn-deploy-playbook

A collection of Ansible Playbooks to deploy VPN and proxy services.

Primary LanguageShell

VPN Deploy Playbook Build Status

A collection of Ansible Playbooks to deploy VPN and proxy services.

Playbooks:

  • auth.yml : setup FreeRadius server for authentication and accounting
  • pptp.yml : setup PPTP server
  • l2tp.yml : setup IPSec/L2TP server (with pre-shared key)
  • proxy-*.yml : setup Shadowsocks
  • cow-*.yml : setup COW
  • ipsec.yml : setup IPSec IKEv1/IKEv2 VPN server with StrongSwan
  • openconnect.yml : setup OpenConnect VPN server for Cisco AnyConnect client
  • spdy-proxy.yml : setup spdylay
  • openvpn.yml : setup OpenVPN server
  • apnp-*.yml : setup APNP (Squid + Shadowsocks tunnel)

How to use

  1. [sudo] pip install ansible install Ansible in control machine
  2. cp ansible_hosts{.example,} copy ansible_hosts.example to ansible_hosts
  3. edit the file to add your servers
  4. edit files in group_vars or create and edit host_vars/SERVER_NAME.yml to fit your needs
  5. run ansible-playbook PLAYBOOK_NAME.yml to setup servers

There are also some guides (in Chinese) in the Wiki

Testing

Vagrant

Simply clone this repo and make sure you have Vagrant + Virtual Box installed and...

vagrant up ubuntu --no-provision
vagrant provision ubuntu

It may take about 10 ~ 60 minutes depends on your network. Vagrant is using Ubuntu 14.04 (ubuntu/trusty64) for it's OS. If you'd like to test on Debian Wheezy:

vagrant up debian --no-provision
vagrant provision debian