Skip to content

Instantly share code, notes, and snippets.

Avatar

Mfawa Alfred Onen muffycompo

View GitHub Profile
@muffycompo
muffycompo / server_certificates_to_pem.md
Created Oct 10, 2018 — forked from stevenhaddox/server_certificates_to_pem.md
Convert .crt & .key files into .pem file for HTTParty
View server_certificates_to_pem.md

Two ways to do it, but only worked for me so I'll put it first and the second for reference:

$ openssl pkcs12 -export -in hostname.crt -inkey hsotname.key -out hostname.p12
$ openssl pkcs12 -in hostname.p12 -nodes -out hostname.pem

Other options for this method in comments below:

# Note, the -certfile root.crt appends all CA certs to the export, I've never needed these so it's optional for my personal steps
$ openssl pkcs12 -export -in hostname.crt -inkey hsotname.key -certfile root.crt -out hostname.p12
# Note, I've always had my hostname.crt as part of my .pem, so I keep my certs but apparently you may not have to, hence the nocerts flag being an extra option in this sample
@muffycompo
muffycompo / Netfilter-IPTables-Diagrams.md
Created Jun 10, 2018 — forked from nerdalert/Netfilter-IPTables-Diagrams.md
Linux NetFilter, IP Tables and Conntrack Diagrams
View Netfilter-IPTables-Diagrams.md

Linux NetFilter, IP Tables and Conntrack Diagrams

IPTABLES TABLES and CHAINS

IPTables has the following 4 built-in tables.

1) Filter Table

Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.

View mkuser.sh
#!/usr/bin/bash
#title :mkuser.sh
#description :This script will make random password for root, new user, new user as sudo, clear history
#author :Trle94 @ Castlegem SRL
#date :03.04.2018
#version :0.1
#usage :./mkuser.sh
#--------------------------------------------------------------------------------
[ $EUID -eq 0 ] || { echo "This script needs to be ran with SUDO!"; exit 1; }
View import.sh
#!/bin/bash
USER="root"
PASSWORD=""
FILES="/Users/tenold/Backups/MySQL/*"
for f in $FILES
do
echo "Processing $f file..."
View working-default.chilli
START_CHILLI=0
CONFFILE="/etc/chilli.conf"
HS_USER="chilli"
View working-init.chilli
#! /bin/sh
### BEGIN INIT INFO
# Provides: chilli
# Required-Start: $remote_fs $syslog $network
# Required-Stop: $remote_fs $syslog $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start CoovaChilli daemon at boot time
# Description: Enable CoovaChilli service provided by daemon.
### END INIT INFO
View init.chilli
#!/bin/sh
#
# chilli - CoovaChilli
#
# chkconfig: 2345 65 35
# description: CoovaChilli
# Source function library.
. /etc/chilli/functions
. /lib/lsb/init-functions
View Keybase.md

Keybase proof

I hereby claim:

  • I am muffycompo on github.
  • I am muffycompoqm (https://keybase.io/muffycompoqm) on keybase.
  • I have a public key ASCGpd9St3Rok3b7qV1oKDssp9-IZmM_N8ze-8XkabKAbgo

To claim this, I am signing this object:

View coovachilli-build-options.txt
apt-get update
apt-get install -y g++ automake autoconf libtool libltdl-dev gengetopt make cmake libssl-dev libjson-c2 libjson-c-dev
git clone https://github.com/coova/coova-chilli
./bootstrap
./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info \
--sysconfdir=/etc --localstatedir=/var --enable-largelimits \
@muffycompo
muffycompo / coovachilli-build-steps-ubuntu-16.10.txt
Last active Sep 25, 2018
Building CoovaChilli 1.4 on Ubuntu 16.10
View coovachilli-build-steps-ubuntu-16.10.txt
apt-get update
apt-get install -y g++ automake autoconf libtool libltdl-dev gengetopt make cmake libssl-dev
git clone https://github.com/coova/coova-chilli
git checkout 1.4
./bootstrap
You can’t perform that action at this time.