Skip to content

Instantly share code, notes, and snippets.

# Run squid
# docker run --name squid -d --restart=always \
# --publish 3128:3128 \
# sameersbn/squid:3.5.27-2
import requests
# from urllib3.contrib import pyopenssl
# pyopenssl.extract_from_urllib3()

Keybase proof

I hereby claim:

  • I am splashx on github.
  • I am splashx (https://keybase.io/splashx) on keybase.
  • I have a public key ASCpx-UrAHU26ZdD1516Gqy7lIPkb2sbGVR6jAnqQt5KeQo

To claim this, I am signing this object:

Build a OS image with QEMU and Ubuntu Cloud Image

Prerequirements

  • Packer
  • QEMU
  • Docker

Build an image of cloud-init settings

splash@deployer:~/terraform-test$ terraform apply
2017/03/20 23:06:29 [INFO] Terraform version: 0.9.0 dev 89acb5811a25e59e6a9d55cf5a2429846e3b5982+CHANGES
2017/03/20 23:06:29 [INFO] CLI args: []string{"/usr/local/bin/terraform-dev", "apply"}
2017/03/20 23:06:29 [DEBUG] Detected home directory from env var: /home/splash
2017/03/20 23:06:29 [DEBUG] Detected home directory from env var: /home/splash
2017/03/20 23:06:29 [DEBUG] Attempting to open CLI config file: /home/splash/.terraformrc
2017/03/20 23:06:29 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2017/03/20 23:06:29 [DEBUG] command: loading backend config file: /home/splash/terraform-test
2017/03/20 23:06:29 [DEBUG] command: no data state file found for backend config
2017/03/20 23:06:29 [DEBUG] New state was assigned lineage "e9827c23-9931-40fb-965c-95d37f5286b4"
$ terraform apply
2017/03/20 23:03:31 [INFO] Terraform version: 0.9.0 dev 89acb5811a25e59e6a9d55cf5a2429846e3b5982+CHANGES
2017/03/20 23:03:31 [INFO] CLI args: []string{"/usr/local/bin/terraform-dev", "apply"}
2017/03/20 23:03:31 [DEBUG] Detected home directory from env var: /home/splash
2017/03/20 23:03:31 [DEBUG] Detected home directory from env var: /home/splash
2017/03/20 23:03:31 [DEBUG] Attempting to open CLI config file: /home/splash/.terraformrc
2017/03/20 23:03:31 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2017/03/20 23:03:31 [DEBUG] command: loading backend config file: /home/splash/terraform-test
2017/03/20 23:03:31 [DEBUG] command: no data state file found for backend config
2017/03/20 23:03:31 [DEBUG] New state was assigned lineage "357ee596-95cc-4235-a60f-e8890efe36d5"
[2017-01-16 09:16:32,448][11892][140347854698240][DEBUG][privacyidea.lib.config:72] The singleton <class 'privacyidea.lib.config.ConfigClass'> already exists.
[2017-01-16 09:16:32,453][11892][140347854698240][ERROR][privacyidea.app:1423] Exception on /auth [POST]
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1473, in full_dispatch_request
# cat /etc/squid/squid.conf
shutdown_lifetime 1 second
auth_param basic program /lib/squid/basic_ncsa_auth /etc/squid/.htpasswd
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
#!/bin/sh
#
VPN_GW=80.249.164.89
if [ "${5:-}" = "${VPN_GW}" ]
then
/sbin/route add 80.249.164.0/24 $4 &> /tmp/ip-up
fi
2016/04/22 - 13:34:58 DEBUG {140607291250432} [routes.middleware][__call__ #100] Matched GET /selfservice/index
2016/04/22 - 13:34:58 DEBUG {140607291250432} [routes.middleware][__call__ #102] Route path: '/selfservice/{action}', defaults: {'controller': u'selfservice'}
2016/04/22 - 13:34:58 DEBUG {140607291250432} [routes.middleware][__call__ #103] Match dict: {'action': u'index', 'controller': u'selfservice'}
2016/04/22 - 13:34:58 DEBUG {140607291250432} [pylons.wsgiapp][setup_app_env #163] Setting up Pylons stacked object globals
2016/04/22 - 13:34:58 DEBUG {140607291250432} [pylons.wsgiapp][resolve #230] Resolved URL to controller: u'selfservice'
2016/04/22 - 13:34:58 DEBUG {140607291250432} [pylons.wsgiapp][dispatch #303] Controller appears to be a class, instantiating
2016/04/22 - 13:34:58 DEBUG {140607291250432} [linotp.lib.security.provider][getSecurityModule #369] [getSecurityModule] getting new Session (140607291250432) from pool [{'session': 0, 'obj': <linotp.lib.security.default.DefaultSecurityMod
Macintosh:~ splash$ kinit --anonymous
Macintosh:~ splash$ klist -A
Credentials cache: API:F4CE5CCF-9BC5-44C8-B2F5-9A2A29C88A2D
Principal: WELLKNOWN/ANONYMOUS@WELLKNOWN:ANONYMOUS
Issued Expires Principal
Apr 7 23:59:52 2016 Apr 8 09:59:52 2016 krbtgt/REALM.COM@REALM.COM
Macintosh:~ splash$ KRB5_TRACE=/dev/stdout kinit --fast-armor-cache=API:F4CE5CCF-9BC5-44C8-B2F5-9A2A29C88A2D d_santos@REALM.COM