Skip to content

Instantly share code, notes, and snippets.

Matt Rude mattrude

Block or report user

Report or block mattrude

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mattrude
mattrude / gnupg-updater.sh
Last active Aug 17, 2019
A simple script build for Ubuntu to download and install the current version of GnuPG.
View gnupg-updater.sh
#!/bin/bash
# ---------
# Script to build and install GnuPG 2.2.x
GNUPG="2.2.17"
LIBGPGERROR='1.36'
LIBGCRYPT='1.8.4'
LIBKSBA='1.3.5'
LIBASSUAN='2.5.3'
NTBTLS='0.1.2'
View gpg-wks-server.1.patch
diff --git a/tools/gpg-wks-server.c b/tools/gpg-wks-server.c
index 2082fb8..c159df8 100644
--- a/tools/gpg-wks-server.c
+++ b/tools/gpg-wks-server.c
@@ -1264,20 +1264,18 @@ send_congratulation_message (const char *mbox, const char *keyfile)
body);
es_fprintf (body,
- "Hello!\n\n"
- "The key for your address '%s' has been published\n"
@mattrude
mattrude / test-gpg-key-lookup.sh
Created Jun 11, 2019
A simple script that test if an address has a working GnuPG; DANE, PKA and WKD lookup key.
View test-gpg-key-lookup.sh
#!/bin/bash
Email=${1}
echo ""
echo "#############################################"
echo "Running for ${Email}"
for TEST in dane pka wkd
do
rm -f /tmp/test.gpg
echo ""
@mattrude
mattrude / update-gnupg.sh
Created May 28, 2019
Script to build and install GnuPG 2.2.x on Ubuntu
View update-gnupg.sh
#!/bin/bash
# ---------
# Script to build and install GnuPG 2.2.x
GNUPG='2.2.16'
LIBGPGERROR='1.36'
LIBGCRYPT='1.8.4'
LIBKSBA='1.3.5'
LIBASSUAN='2.5.3'
NTBTLS='0.1.2'
View Nginx-caching-config.md

start by creating the needed directorys and changing the permission to the nginx proccess (www-data on ubuntu)

mkdir -p /var/cache/nginx/sks /var/cache/nginx/temp
chown -R www-data:www-data /var/cache/nginx

Below is my config.

@mattrude
mattrude / Adding_systemd_for_SKS-Keyserver.md
Last active Feb 6, 2019
Adding systemd services for SKS-Keyserver on Ubuntu 18.04 LTS
View Adding_systemd_for_SKS-Keyserver.md

Adding systemd services for SKS-Keyserver on Ubuntu 18.04

This page will walk you threw installing the sks-keyserver systemd services on a Ubuntu 18.04 LTS, thou it will most likely work with any systemd server.

The systemd services provided on this page will auto start the sks daemon when the server is booted up, and will restart the daemon if it dies for some reason.

Note, this page assumes your sks daemon is located at /usr/local/bin/sks and your key directory is /var/lib/sks.

User Setup

@mattrude
mattrude / Building-a-SKS-Keyserver.md
Last active Jun 27, 2019
Building a SKS Keyserver on Ubuntu 18.04 LTS
View Building-a-SKS-Keyserver.md

A Key Server is used to distribute PGP/GPG keys between different users. One of the most popular key servers for use with pgp/gpg is the sks keyserver. This document will walk you through downloading, installing, and setting up a sks keyserver on Ubuntu 18.04 LTS.

Building your own PGP SKS Server

Building a SKS server is a pretty straight forward project if you are use to running servers.

To build a production SKS Server, you must...

@mattrude
mattrude / update-git-mirrors.sh
Created Feb 2, 2019
A simple script to update my local version of my git mirrors.
View update-git-mirrors.sh
#!/bin/bash
if [ "${SHELL}" != "/bin/bash" ]; then int="0"; else int="1"; fi
if [ "${int}" == "0" ]; then
sleep $(expr $RANDOM \% 900)
mkdir -p /var/lib/git
touch /var/lib/git/update-mirrors.log
exec 3>&1 4>&2; trap 'exec 2>&4 1>&3' 0 1 2 3
exec 1>>/var/lib/git/update-mirrors.log 2>&1
fi
@mattrude
mattrude / sks-build.md
Last active Aug 24, 2018
How to build SKS-Keyserver on Ubuntu 18.04 LTS
View sks-build.md
mkdir -p /var/src/
cd /var/src/
hg clone https://bitbucket.org/skskeyserver/sks-keyserver
cd sks-keyserver
eval $(opam config env)
cp Makefile.local.unused Makefile.local
sed -i 's/-ldb-4.6/-ldb-5.3/g' Makefile.local
curl -L https://gist.githubusercontent.com/mattrude/5c331f76c02060301874b376f3248774/raw/sks-keyserver_-_change_download_type_to_text.patch -o sks-keyserver_-_change_download_type_to_text.patch -s
curl -L https://gist.githubusercontent.com/mattrude/5c331f76c02060301874b376f3248774/raw/sks-keyserver_-_update_stats_page.patch -o sks-keyserver_-_update_stats_page.patch -s
@mattrude
mattrude / cloudkey-update-cert.sh
Last active Aug 9, 2019
Install a Let's Encrypt certificate on a UniFi Cloud Key controller
View cloudkey-update-cert.sh
#!/bin/sh
HOSTNAME="unifi.lan.therudes.com"
EMAIL="matt@mattrude.com"
# Update the System before we start
rm -f /tmp/installed-packages.txt
echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list
dpkg --get-selections |awk '{print $1}' |sed 's/:amd64//g' |sed 's/:armhf//g' > /tmp/installed-packages.txt
UPDATE="" # Start out with UPDATE being NULL
You can’t perform that action at this time.