Skip to content

Instantly share code, notes, and snippets.

View Fleshgrinder's full-sized avatar
💀

Richard Fussenegger Fleshgrinder

💀
View GitHub Profile
@Fleshgrinder
Fleshgrinder / ufw.sh
Last active August 29, 2015 14:05
Install and configure UFW firewall on Debian for easy firewall management.
#!/bin/sh
# Install ufw and its dependencies.
export DEBIAN_FRONTEND=noninteractive
aptitude install -q -y ufw
# SEE: https://serverfault.com/questions/416727
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Configure ufw to allow SSH, HTTP and HTTPS and enable it.
@Fleshgrinder
Fleshgrinder / purge-logs.sh
Created September 1, 2014 14:15
Purge /var/log daily cron
#!/bin/sh
find /var/log -regextype posix-extended -regex '.*\.([0-9]|gz)$' -type f -exec rm -f {} \;
@Fleshgrinder
Fleshgrinder / validate-ocsp-stapling.md
Last active December 26, 2015 01:49
Validate OCSP Stapling

One can use OpenSSL’s c_client to validate that OCSP Stapling is working.

openssl s_client -connect 127.0.0.1:443 -tls1 -tlsextdebug -status
@Fleshgrinder
Fleshgrinder / opentracker.cfg
Created August 16, 2012 23:50
mrtg opentracker configuration file
enableIPv6: no
WorkDir: /var/www/tracker/
Options[_]:
YSize[_]: 150
pagetop[tracker-conn]: <h1>tracker - Connections/min</h1><hr>
target[tracker-conn]: `curl http://localhost:6969/stats?mode=conn`
maxbytes[tracker-conn]: 100000000
title[tracker-conn]: Connections/min
options[tracker-conn]: growright, nopercent, perminute
@Fleshgrinder
Fleshgrinder / crypt.pl
Created August 14, 2012 14:16
Generate htpasswd compatible password.
#!/usr/bin/perl
use strict;
chomp(my $filename=$ARGV[0]);
chomp(my $username=$ARGV[1]);
chomp(my $password=$ARGV[2]);
if (!$filename || !$username || !$password) {
print "USAGE: ./crypt.pl filename username password\n\n";
} else {