Skip to content

Instantly share code, notes, and snippets.

@NiceRath
NiceRath / nftables_tproxy_example.nft
Last active March 19, 2024 02:55
NFTables TPROXY - proxy input and output
#!/usr/sbin/nft -f
# see also:
# https://wiki.nftables.org/wiki-nftables/index.php/Netfilter_hooks
# https://docs.kernel.org/networking/tproxy.html
# https://powerdns.org/tproxydoc/tproxy.md.html
# http://git.netfilter.org/nftables/commit/?id=2be1d52644cf77bb2634fb504a265da480c5e901
# http://wiki.squid-cache.org/Features/Tproxy4
# https://serverfault.com/questions/1052717/how-to-translate-ip-route-add-local-0-0-0-0-0-dev-lo-table-100-to-systemd-netw
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/net/netfilter/nft_tproxy.c
@NiceRath
NiceRath / linux_boot_sync.md
Created April 26, 2023 10:46
Setup redundant EFI boot partitions on debian-based systems

Script to sync redundant boot paritions

Grub does not seem to support EFI boot on software raid (MD) yet. See: wiki.debian.org

Make sure the target disks (sda and sdb in this example) are empty and can be overwritten.

Install

Boot system from recovery image to install grub on two separate disks:

@NiceRath
NiceRath / migration_mysql5.7_mariadb10.6.md
Last active April 26, 2023 08:10
In-Place migration of MySQL-5.7 to MariaDB-10.6

Notes for in-place migration of MySQL 5.7 to MariaDB 10.6

Removal of MySQL

apt remove mysql-apt-config
apt purge mysql-apt-config
apt remove mysql-server mysql-community-server mysql-community-client mysql-common mysql-client