Skip to content

Instantly share code, notes, and snippets.

View arreyder's full-sized avatar

Christopher Rhodes arreyder

View GitHub Profile
@arreyder
arreyder / conntrack_full.pl
Last active August 28, 2018 00:26
Collectd Exec Plugin to get the full conntrack stats
#!/usr/bin/perl
# The user this runs as under the collectd exec plugin must
# have sudo to run contrack.
#
# Something like:
#
# my_user ALL = NOPASSWD: /usr/sbin/conntrack
#
# contrack must also be in the users path. Example collectd config:
#

Keybase proof

I hereby claim:

  • I am arreyder on github.
  • I am arreyder (https://keybase.io/arreyder) on keybase.
  • I have a public key ASBhSghbJorZdONv0r9NaHso68cXri03f3Y2HKSkiW0n8Ao

To claim this, I am signing this object:

Edit nginx.conf and set the servername, this will be the 'origin' defined for the access fabric app. and certbot should find it and request a cert for it. Make sure port 80 is open right now because it's used afor the crt request validation process.

curl -O https://dl.eff.org/certbot-auto
chmod +x certbot-auto
sudo certbot-auto
@arreyder
arreyder / aws-linux-build.sh
Last active January 19, 2018 20:04
Building Access Fabric Nginx Module on AWS Linux
#!/bin/bash
# Tested on Amazon Linux AMI release 2017.09
# Install necessary builddeps.
sudo yum install git wget pcre-devel zlib-devel libcurl-devel jansson-devel openssl-devel redhat-rpm-config rpm-build gperftools-devel GeoIP-devel gd-devel perl-devel libxslt-devel perl-ExtUtils-Embed -y
sudo yum groupinstall "Development Tools" -y
# Prepare local rpm build env.
mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
# This spec file for libxjwt will work on Centos6 or AWS-Linux
wget https://gist.githubusercontent.com/arreyder/b444db3d950856aa4582d1e5aebfc98d/raw/73e84b4b13f363a6d2567ac62f5926fa52bfa605/libxjwt.spec
@arreyder
arreyder / nginx-aws-linux.spec.patch
Last active January 19, 2018 16:28
Nginx Access Fabric Module Spec file patch for AWS Linux rpm build.
--- /tmp/nginx.spec 2018-01-19 15:19:20.654132824 +0000
+++ nginx.spec 2018-01-19 15:58:02.496368245 +0000
@@ -30,6 +30,7 @@
URL: http://nginx.org/
Source0: https://nginx.org/download/nginx-%{version}.tar.gz
+Source1: https://github.com/ScaleFT/nginx_auth_accessfabric/archive/v1.0.0.tar.gz
Source10: nginx.service
Source11: nginx.logrotate
Source12: nginx.conf
@arreyder
arreyder / libxjwt.spec
Last active January 19, 2018 19:59
Centos 6 spec for libxjwt
Name: libxjwt
Version: 1.0.2
Release: 1%{?dist}
Summary: Minimal C library for validation of real-world JWTs
License: Apache 2.0
Group: System/Libraries
Source0: https://github.com/ScaleFT/libxjwt/releases/download/v%{version}/libxjwt-%{version}.tar.gz

Keybase proof

I hereby claim:

  • I am arreyder on github.
  • I am arreyder (https://keybase.io/arreyder) on keybase.
  • I have a public key ASC82WXzVLePpuXxor3fJD0wjuEjlBCH011XtFJnFiaTdQo

To claim this, I am signing this object:

@arreyder
arreyder / gist:8778ab3af7b2375692379563bbf35894
Created March 9, 2017 20:55
aws nginx, banno.com error sample
2017/03/09 20:50:42 [error] 19451#0: *90513945 connect() failed (111: Connection refused) while connecting to upstream, client: 10.10.0.164, server: banno.com, request: "GET /a/monitor/api/badge/monitor-badge-light.png HTTP/1.1", upstream: "http://127.0.0.1:9094/a/monitor/api/badge/monitor-badge-light.png", host: "banno.com", referrer: "https://www.reelfootbank.com/"
2017/03/09 20:50:51 [error] 19452#0: *90514113 connect() failed (111: Connection refused) while connecting to upstream, client: 10.10.0.164, server: banno.com, request: "GET /a/monitor/api/last-check?url=https%3A%2F%2Fwww.northwestsavingsbank.com%2F&callback=jha.monitor.badgeCallback HTTP/1.1", upstream: "http://127.0.0.1:9094/a/monitor/api/last-check?url=https%3A%2F%2Fwww.northwestsavingsbank.com%2F&callback=jha.monitor.badgeCallback", host: "banno.com", referrer: "https://www.northwestsavingsbank.com/"
2017/03/09 20:50:55 [error] 19451#0: *90514060 connect() failed (111: Connection refused) while connecting to upstream, client: 10.10.2.83, serv
@arreyder
arreyder / masters
Created May 20, 2016 13:48
masters
10.3.0.29:node219.banno.com:masters
10.1.0.219
10.3.0.30:node34.banno.com:masters
localhost
10.3.0.32:node58.banno.com:masters
localhost
10.3.0.31:node214.banno.com:masters
root@mythtv:/home/lisa# apache2ctl -S
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
192.168.1.150:80 is a NameVirtualHost
default server arreyder.com (/etc/apache2/sites-enabled/arreyder.conf:1)
port 80 namevhost arreyder.com (/etc/apache2/sites-enabled/arreyder.conf:1)
port 80 namevhost muddypawfarm.com (/etc/apache2/sites-enabled/arreyder.conf:13)
alias www.muddypawfarm.com
port 80 namevhost 192.168.1.150 (/etc/apache2/sites-enabled/mythweb.conf:29)
ServerRoot: "/etc/apache2"