Skip to content

Instantly share code, notes, and snippets.

@maethor
maethor / fail2ban-shorewall-wrapper.conf
Created Oct 5, 2016
Fail2Ban action to use shorewall-drop-wrapper.sh
View fail2ban-shorewall-wrapper.conf
#
# Author: Guillaume Subiron
#
# Block using shorewall-drop-wrapper.sh
# https://gist.github.com/maethor/2661311b394c5a610a3d258e54d8ac2a
#
[Definition]
# Option: actionstart
@maethor
maethor / backups.yml
Created Jun 15, 2016
Example ansible playbook for backupninja + borg (incomplete)
View backups.yml
---
- hosts: backup-servers
tasks:
- name: Install rdiff-backup
apt: pkg=rdiff-backup state=installed
- name: Install borgbackup
apt: pkg=borgbackup state=installed
- hosts: all
vars:
@maethor
maethor / example.borg
Created Jun 15, 2016
BorgBackup handler for backupninja : example configuration file
View example.borg
##
## This is an example borgbackup configuration file.
##
## Here you can find all the possible borgbackup options, details of
## what the options provide and possible settings. The defaults are set
## as the commented out option, uncomment and change when
## necessary. Options which are uncommented in this example do not have
## defaults, and the settings provided are recommended.
##
## The defaults are useful in most cases, just make sure to configure the
@maethor
maethor / borg
Last active Sep 27, 2018
BorgBackup handler script for backupninja
View borg
# -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*-
# vim: set filetype=sh sw=3 sts=3 expandtab autoindent:
#
# borg handler script for backupninja
# requires borgbackup
#
# Guillaume Subiron, Sysnove, 2016
#
# Copyright 2016 Guillaume Subiron <guillaume@sysnove.fr>
# This work is free. You can redistribute it and/or modify it under the
@maethor
maethor / shorewall-drop-wrapper.sh
Last active Oct 5, 2016
Shorewall wrapper to manage a whitelist and a blacklist. Written for fail2ban multiban.
View shorewall-drop-wrapper.sh
#!/bin/bash
#
# Guillaume Subiron, Sysnove, 2016
#
# Description :
#
# This script uses shorewall drop and shorewall allow to manage a blacklist.
#
# Instead of allowing an IP everytime we call shorewall allow. This script
@maethor
maethor / letsencrypt-auto-renew.sh
Last active Jan 15, 2020
This script generates or regenerates SSL certificates using acme-tiny to sign the certificate signing requests found in /etc/letsencrypt/
View letsencrypt-auto-renew.sh
#!/bin/sh
#
# Guillaume Subiron, Sysnove, 2016
# Inspired by Benjamin Sonntag's https://github.com/octopuce/octopuce-goodies/blob/master/letsencrypt-renew/letsencrypt-auto-renew.sh
#
# Description :
#
# This script generates or regenerates SSL certificates using acme-tiny
# to sign the certificate signing requests found in /etc/letsencrypt/
@maethor
maethor / check_lsb_services.sh
Created Dec 3, 2014
This is a nagios/shinken plugin to check if all LSB services are running using the "service" command.
View check_lsb_services.sh
#!/bin/sh
#
# Guillaume Subiron, Sysnove, 2014
#
# Description :
#
# This plugin checks if all installed daemons are running.
# Works on Debian.
#
@maethor
maethor / debian_upgrade.yml
Created Jul 18, 2014
Ansible playbook to update and upgrade Debian hosts
View debian_upgrade.yml
---
- hosts: all
sudo: yes
tasks:
- name: Update packages list
apt: update_cache=yes
when: ansible_os_family == 'Debian'
- name: List packages to upgrade (1/2)
View check_nginx_status.php
<?php
#
# Copyright (c) 2014 Guillaume <maethor> Subiron (http://www.sysnove.fr/)
# Plugin: check_nginx_status
#
$colors = array(
'read' => '#5a3d99',
'write' => '#ff0000',
'wait' => '#e5ca44',
@maethor
maethor / check_kernel.sh
Last active Jan 7, 2018
This is a nagios/shinken plugin to check if a Debian host is running the last installed kernel.
View check_kernel.sh
#!/bin/sh
#
# Guillaume Subiron, Sysnove, 2013
#
# Description :
#
# This plugin checks if we're running the newest installed kernel.
# Works on Debian.
#
You can’t perform that action at this time.