Linux installation notes (tested under Ubuntu 14.04LTS/12.04LTS), assuming VirtualBox is already installed on host.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
route add 0.0.0.1/1 mask 0.0.0.1 192.168.229.1 | |
route add 128.0.0.1/1 mask 0.0.0.1 192.168.229.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/sbin/runscript | |
DAEMON=/usr/local/sbin/ocserv | |
PIDFILE=/var/run/ocserv.pid | |
LOGFILE=/var/log/ocserv.log | |
DAEMON_ARGS="-f -d 1" | |
extra_commands="debug" | |
depend() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
''' | |
Created on 2013-1-31 | |
@author: lwx | |
''' | |
import cookielib, urllib2, urllib, sys, time, json, os | |
class fetion: | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from http.client import HTTPSConnection | |
from base64 import b64encode | |
#This sets up the https connection | |
c = HTTPSConnection("example.org") | |
#we need to base 64 encode it | |
#and then decode it to acsii as python 3 stores it as a byte string | |
userAndPass = b64encode(b"username:password").decode("ascii") | |
headers = { 'Authorization' : 'Basic %s' % userAndPass } | |
#then connect | |
c.request('GET', '/', headers=headers) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[peername] | |
proto = nacltai | |
proto_publickey = LOCAL_PUBKEY | |
proto_privatekey = REMOTE_PRIKEY | |
local = tuntap | |
local_interface = tunnel | |
local_tunmode = 1 | |
peer = udp | |
peer_localaddr = REMOTE_IP | |
peer_localport = 8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
acl Safe_ports port 80 21 443 563 70 210 280 488 591 777 1025-65535 | |
acl SSL_ports port 443 563 | |
acl CONNECT method CONNECT | |
http_access deny !Safe_ports | |
http_access deny CONNECT !SSL_ports | |
http_access allow all | |
http_port 0.0.0.0:21 | |
via off | |
request_header_access Allow allow all | |
request_header_access Authorization allow all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# for KVM and XEN, modification required for OpenVZ | |
apt-get -y update | |
apt-get -y upgrade | |
apt-get -y install libpam0g-dev libssl-dev make gcc | |
wget http://download.strongswan.org/strongswan-5.3.0.tar.gz | |
tar zxvf strongswan-5.3.0.tar.gz | |
cd strongswan-5.3.0 | |
./configure --enable-eap-identity --enable-eap-md5 --enable-eap-mschapv2 --enable-eap-tls --enable-eap-ttls --enable-eap-peap --enable-eap-tnc --enable-eap-dynamic --enable-eap-radius --enable-xauth-eap --enable-xauth-pam --enable-dhcp --enable-openssl --enable-addrblock --enable-unity --enable-certexpire --enable-radattr --enable-tools --enable-openssl --disable-gmp | |
make |
Amazon EC2 user-data file for automatic configuration of IPsec/L2TP VPN server on a Ubuntu or Debian instance. Tested with Ubuntu 14.04 & 12.04 and Debian 8 (Jessie).
With minor modifications, this script can also be used on dedicated servers or any KVM- or XEN- based Virtual Private Server (VPS) from other providers.
Alternative VPN script for CentOS/RHEL
Original post by Thomas Sarlandie
NewerOlder