Skip to content

Instantly share code, notes, and snippets.

View vpieper's full-sized avatar
🎯

Vincent Pieper vpieper

🎯
View GitHub Profile
@vpieper
vpieper / lvm-daily-snapshot.sh
Created May 4, 2019 17:29 — forked from olavmrk/lvm-daily-snapshot.sh
A script to take daily snapshots of a LVM volume.
#!/bin/bash
KEEP_DAYS=15
VG="vg" # LVM volume group we are snapshoting
LV="data-volume-name" # Name of LVM-volume to take a snapshot of
BACKUP_PREFIX="backup-volume-prefix-" # Prefix of snapshot volume name.
SIZE=40G # Amount of disk space to allocate for the snapshot
# Create new snapshot
@vpieper
vpieper / grafana.yml
Created May 14, 2020 17:43 — forked from CVJoint/grafana.yml
TIG Stack - (Grafana, Telegraf, and InfluxDB)
version: "3.7"
services:
## Follow install instructions below
## InfluxDB
# Create config file:
# mkdir ${USERDIR}/docker/influxdb
# docker run --rm influxdb influxd config > ${USERDIR}/docker/influxdb/influxdb.conf
# Consider adding a database (optional)
@vpieper
vpieper / README-fail2ban-openvpn.md
Created September 1, 2020 09:20 — forked from drmalex07/README-fail2ban-openvpn.md
Block unauthorized requests to OpenVPN using fail2ban. #openvpn #fail2ban

Block unauthorized requests to OpenVPN using fail2ban.

The following is based on https://stefan.angrick.me/block-unauthorized-openvpn-logins-using-fail2ban.

1. Create filter confifuration

Add a filter configuration under /etc/fail2ban/filter.d/openvpn.conf. The contents would be something like (regular expressions may need adjustments):

[INCLUDES]
before = common.conf
@vpieper
vpieper / .vimrc
Created November 5, 2020 19:24 — forked from simonista/.vimrc
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
@vpieper
vpieper / wireguard-over-tcp.md
Created February 25, 2021 11:54
WireGuard over TCP with udptunnel

WireGuard over TCP with udptunnel

udptunnel is a small program which can tunnel UDP packets bi-directionally over a TCP connection. Its primary purpose (and original motivation) is to allow multi-media conferences to traverse a firewall which allows only outgoing TCP connections.

Server

# udptunnel -s 443 127.0.0.1/51820

Client

@vpieper
vpieper / ip6tables_setup.bash
Created April 8, 2023 09:47 — forked from velizarn/ip6tables_setup.bash
Basic setup for ip6tables - drop all traffic except local, ICMP and DHCPv6 traffic.
#!/bin/bash
# http://serverfault.com/questions/410321/debian-ip6tables-rules-setup-for-ipv6/410327#410327
# http://ipset.netfilter.org/iptables.man.html
# https://www.sixxs.net/wiki/IPv6_Firewalling
# https://www.cyberciti.biz/faq/ip6tables-ipv6-firewall-for-linux/
# https://gist.github.com/thomasfr/9712418
# https://gist.github.com/SnakeDrak/f4150f6e517e5a1d525f
# http://www.thegeekstuff.com/2011/06/iptables-rules-examples
# http://www.thegeekstuff.com/scripts/iptables-rules