For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
#!/usr/bin/env python | |
import os, sys, json | |
def main (args): | |
file_input = None | |
if len(args) == 3 and "pyython" in args[0].lower(): | |
if "packs" in args[1].lower(): | |
file_input = args[2] |
configure | |
set vpn ipsec ipsec-interfaces interface eth0 # your WAN interface | |
set vpn ipsec auto-firewall-nat-exclude enable | |
set vpn ipsec nat-networks allowed-network 0.0.0.0/0 # check that's OK before you set it | |
set vpn l2tp remote-access authentication mode local | |
set vpn l2tp remote-access authentication local-users username <user> password <password> | |
set vpn l2tp remote-access client-ip-pool start <starting IP> | |
set vpn l2tp remote-access client-ip-pool stop <end IP> | |
set vpn l2tp remote-access dns-servers server-1 <DNS server IP> | |
set vpn l2tp remote-access ipsec-settings authentication mode pre-shared-secret |
# read more at https://terrty.net/2014/ssl-tls-in-nginx/ | |
# latest version on https://gist.github.com/paskal/628882bee1948ef126dd/126e4d1daeb5244aacbbd847c5247c2e293f6adf | |
# security test score: https://www.ssllabs.com/ssltest/analyze.html?d=terrty.net | |
# your nginx version might not have all directives included, test this configuration before using in production against your nginx: | |
# $ nginx -c /etc/nginx/nginx.conf -t | |
server { | |
# public key, contains your public key and class 1 certificate, to create: | |
# (example for startssl) | |
# $ (cat example.com.pem & wget -O - https://www.startssl.com/certs/class1/sha2/pem/sub.class1.server.sha2.ca.pem) | tee -a /etc/nginx/ssl/domain.pem > /dev/null |
// | |
// CustomCollectionFlowLayout.h | |
// evilapples | |
// | |
// http://stackoverflow.com/questions/13511733/how-to-make-supplementary-view-float-in-uicollectionview-as-section-headers-do-i | |
// | |
// | |
#import <UIKit/UIKit.h> |
# Example from: http://snipplr.com/view/37063/ | |
include Rails.application.routes.url_helpers | |
# set host in default_url_options: | |
default_url_options[:host] = "localhost" | |
# can then use: | |
url_for() |