Skip to content

Instantly share code, notes, and snippets.

@maethor
maethor / shorewall-drop-wrapper.sh
Last active October 5, 2016 13:22
Shorewall wrapper to manage a whitelist and a blacklist. Written for fail2ban multiban.
#!/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 / borg
Last active September 27, 2018 11:18
BorgBackup handler script for backupninja
# -*- 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 <[email protected]>
# This work is free. You can redistribute it and/or modify it under the
@maethor
maethor / example.borg
Created June 15, 2016 09:20
BorgBackup handler for backupninja : example configuration file
##
## 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 / backups.yml
Created June 15, 2016 09:51
Example ansible playbook for backupninja + borg (incomplete)
---
- 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 / fail2ban-shorewall-wrapper.conf
Created October 5, 2016 13:20
Fail2Ban action to use shorewall-drop-wrapper.sh
#
# Author: Guillaume Subiron
#
# Block using shorewall-drop-wrapper.sh
# https://gist.github.com/maethor/2661311b394c5a610a3d258e54d8ac2a
#
[Definition]
# Option: actionstart