Skip to content

Instantly share code, notes, and snippets.

🐙

Johannes Schriewer dunkelstern

🐙
Block or report user

Report or block dunkelstern

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
@dunkelstern
dunkelstern / style.xsl
Created Sep 21, 2016
nginx rtmp status style sheet
View style.xsl
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" omit-xml-declaration="yes" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
@dunkelstern
dunkelstern / nginx.conf
Created Sep 21, 2016
nginx RTMP config
View nginx.conf
user rtmp;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
@dunkelstern
dunkelstern / logcat.py
Created Sep 7, 2016
ScribeJS commandline logfile dumper and filtering tool (python 3)
View logcat.py
#!/usr/bin/env python
import json
import argparse
import itertools
import time
from dateutil.parser import parse
import datetime
@dunkelstern
dunkelstern / vpn_setup.ps1
Created Aug 8, 2016
VPN Setup script for windows powershell
View vpn_setup.ps1
# Set these to the correct values
$server_address = "vpn.example.com"
$connection_name = "VPN Connection"
$certificate_path = "certificate.p12"
$ca_cert_path = "strongswanCert.pem"
$password = ConvertTo-SecureString -String "P12 passphrase" -AsPlainText -Force
# Import machine cert
Import-PfxCertificate -FilePath $certificate_path -CertStoreLocation Cert:\LocalMachine\My\ -Password $password
@dunkelstern
dunkelstern / create_vpn_user.sh
Created Aug 7, 2016
Create certificates for a new machine for an IKEv2 vpn
View create_vpn_user.sh
#!/bin/bash
if [ "$1" = "" ] ; then
echo "Usage: $0 <machine_name>"
exit 1
fi
machinename=$1
# configure these to the visible public values of the server
@dunkelstern
dunkelstern / rc.local
Created Aug 7, 2016
iptables rules for vpn config
View rc.local
# for ISAKMP (handling of security associations)
iptables -A INPUT -p udp --dport 500 --j ACCEPT
# for NAT-T (handling of IPsec between natted devices)
iptables -A INPUT -p udp --dport 4500 --j ACCEPT
# for ESP payload (the encrypted data packets)
iptables -A INPUT -p esp -j ACCEPT
# for the routing of packets on the server
iptables -t nat -A POSTROUTING -j SNAT --to-source %IP% -o eth0
# internet access
iptables -t nat -A POSTROUTING -s 10.0.42.0/24 -o eth0 -m policy --dir out --pol ipsec -j ACCEPT
@dunkelstern
dunkelstern / vpn.conf
Created Aug 7, 2016
sysctl config for ip packet forwarding
View vpn.conf
# ipv4
net.ipv4.ip_forward=1
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.icmp_ignore_bogus_error_responses = 1
@dunkelstern
dunkelstern / ipsec.conf
Created Aug 7, 2016
StrongSWAN ipsec config for IKEv2 VPN
View ipsec.conf
# ipsec.conf - strongSwan IPsec configuration file
config setup
charondebug="ike 4, knl 4, cfg 4, net 4, esp 4, dmn 4, mgr 4"
conn %default
keyexchange=ike
ike=aes128-sha1-modp1024,aes128-sha1-modp1536,aes128-sha1-modp2048,aes128-sha256-ecp256,aes128-sha256-modp1024,aes128-sha256-modp1536,aes128-sha256-modp2048,aes256-aes128-sha256-sha1-modp2048-modp4096-modp1024,aes256-sha1-modp1024,aes256-sha256-modp1024,aes256-sha256-modp1536,aes256-sha256-modp2048,aes256-sha256-modp4096,aes256-sha384-ecp384,aes256-sha384-modp1024,aes256-sha384-modp1536,aes256-sha384-modp2048,aes256-sha384-modp4096,aes256gcm16-aes256gcm12-aes128gcm16-aes128gcm12-sha256-sha1-modp2048-modp4096-modp1024,3des-sha1-modp1024!
esp=aes128-aes256-sha1-sha256-modp2048-modp4096-modp1024,aes128-sha1,aes128-sha1-modp1024,aes128-sha1-modp1536,aes128-sha1-modp2048,aes128-sha256,aes128-sha256-ecp256,aes128-sha256-modp1024,aes128-sha256-modp1536,aes128-sha256-modp2048,aes128gcm12-aes128gcm16-aes256gcm12-aes256gcm16-modp2048-modp4096-modp
@dunkelstern
dunkelstern / conemu_bash.xml
Created Aug 6, 2016
Conemu config for bash
View conemu_bash.xml
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2016-08-06 22:39:37" build="160724">
<value name="StartType" type="hex" data="02"/>
<value name="CmdLine" type="string" data=""/>
<value name="StartTasksFile" type="string" data=""/>
<value name="StartTasksName" type="string" data="{Bash::bash}"/>
<value name="StartFarFolders" type="hex" data="00"/>
<value name="StartFarEditors" type="hex" data="00"/>
@dunkelstern
dunkelstern / Project.sublime-project
Created Mar 21, 2016
Sublime project file for anarchytools based swift build
View Project.sublime-project
{
"folders":
[
{
"path": ".",
"folder_exclude_patterns": [ ".atllbuild", "bin", "user" ],
"file_exclude_patterns": [ ".gitignore" ]
},
],
"build_systems": [
You can’t perform that action at this time.