Skip to content

Instantly share code, notes, and snippets.

View csamsel's full-sized avatar

Christian Samsel csamsel

View GitHub Profile
@csamsel
csamsel / igmpproxy.conf
Last active December 14, 2017 14:21
igmpproxy.conf for Telekom Entertain (DrayTek VigorNIC 132)
# do it faster
quickleave
# unstream network, eth0 = VigorNIC
phyint eth0.8 upstream
# internal network
phyint br0 downstream
@csamsel
csamsel / kernel-config-x86_64-4.14.10-gentoo-r1-hyperv
Created January 1, 2018 21:48
Kernel config for Gentoo with systemd running in HyperV
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.14.10-gentoo-r1 Kernel Configuration
#
#
# Gentoo Linux
#
CONFIG_GENTOO_LINUX=y
CONFIG_GENTOO_LINUX_UDEV=y
@csamsel
csamsel / dhcpcd-pd.conf
Last active February 20, 2018 12:56
dhcpcd configuration to get a prefix delegation from an external interface and distribute it to a lan
duid
noipv6rs
waitip 6
ipv6only
# dont run hooks
nohook resolv.conf, yp, hostname, ntp
interface ppp0 # WAN interface
@csamsel
csamsel / syslog-ng.conf
Created January 7, 2018 20:52
syslog-ng configuration for loghost (send)
log { source(src); destination(d_extern); };
destination d_extern { tcp("192.168.2.15"); };
@csamsel
csamsel / syslog-ng.conf
Last active January 26, 2018 20:42
syslog-ng configuration for loghost (receive)
source s_extern {
network(
transport("udp")
);
network(
transport("tcp")
);
};
@csamsel
csamsel / generate-ovpn.sh
Last active April 19, 2019 15:56
Generate ovpn file for mobile OpenVPN clients for easy-rsa directory
#/bin/sh
cp template.ovpn $1.ovpn
echo "<ca>" >>$1.ovpn
cat pki/ca.crt >>$1.ovpn
echo "</ca>" >>$1.ovpn
echo "<cert>" >>$1.ovpn
cat pki/issued/$1.crt >>$1.ovpn
echo "</cert>" >>$1.ovpn
echo "<key>" >>$1.ovpn
@csamsel
csamsel / gist:a0001e604035886a1839f307473e8bbd
Created January 29, 2018 18:17
Increase btrfs gpt partition after enlarging the virtual drive
oxygen-system-vm ~ # fdisk -l /dev/sda
GPT PMBR size mismatch (41943039 != 62914559) will be corrected by w(rite).
Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 10B93AE8-1045-434C-A36E-F7801B17CE32
Device Start End Sectors Size Type
@csamsel
csamsel / gist:4a45318fa94394acf124f7250e8fe31c
Created February 6, 2018 10:52
remove invalid VMs from ESXi inventory without vCenter
for a in $(vim-cmd vmsvc/getallvms 2>&1 |grep invalid |awk '{print $4}'|cut -d \' -f2);do vim-cmd vmsvc/unregister $a;done
@csamsel
csamsel / logrotate.conf
Last active March 2, 2023 15:42
use lzma for logrotate instead of gzip for better compression
# ...
# compress rotated log files.
compress
compresscmd lzma
uncompresscmd lzmadec
compressext .xz
delaycompress
# ...
@csamsel
csamsel / openvpn-udp.conf
Created February 7, 2018 12:58
secure OpenVPN configuration using easy-rsa
dev vpn0
port 5000
tls-server
key /etc/openvpn/easy-rsa/pki/private/openvpn.key
cert /etc/openvpn/easy-rsa/pki/issued/openvpn.crt
ca /etc/openvpn/easy-rsa/pki/ca.crt
dh /etc/openvpn/easy-rsa/pki/dh.pem
tls-crypt /etc/openvpn/easy-rsa/pki/openvpn.tlsauth
crl-verify /etc/openvpn/easy-rsa/pki/crl.pem