summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore5
-rw-r--r--distcc/distcc/hosts6
-rw-r--r--fstab/fstab52
-rw-r--r--genkernel/genkernel.conf438
-rw-r--r--libvirt/libvirt/libvirtd.conf535
-rw-r--r--openrc/rc.conf322
-rwxr-xr-xportage/portage/conf-update.d/etckeeper32
-rw-r--r--portage/portage/env/1core.conf1
-rw-r--r--portage/portage/env/2cores.conf1
-rw-r--r--portage/portage/env/4cores.conf1
-rw-r--r--portage/portage/env/8cores.conf1
-rw-r--r--portage/portage/env/nodistcc.conf1
-rw-r--r--portage/portage/env/notmpfs.conf1
-rw-r--r--portage/portage/make.conf38
l---------portage/portage/make.profile1
-rw-r--r--portage/portage/package.accept_keywords60
-rw-r--r--portage/portage/package.license1
-rw-r--r--portage/portage/package.mask20
-rw-r--r--portage/portage/package.unmask7
-rw-r--r--portage/portage/package.use/00cpu-flags1
-rw-r--r--portage/portage/package.use/common38
-rw-r--r--portage/portage/repos.conf/eselect-repo.conf36
-rw-r--r--portage/portage/sets/ibase48
-rw-r--r--portage/portage/sets/icommon111
-rw-r--r--portage/portage/sets/ilaptop8
-rw-r--r--portage/portage/sets/ipc8
-rw-r--r--portage/portage/sets/svp7
-rw-r--r--snapper/snapper/configs/root63
-rw-r--r--swap/conf.d/swap14
-rw-r--r--sysctl/sysctl.d/README13
-rw-r--r--ufw/ufw/after.rules30
-rw-r--r--ufw/ufw/after6.rules27
-rw-r--r--ufw/ufw/before.rules75
-rw-r--r--ufw/ufw/before6.rules142
-rw-r--r--ufw/ufw/sysctl.conf57
-rw-r--r--ufw/ufw/ufw.conf10
-rw-r--r--ufw/ufw/user.rules56
-rw-r--r--ufw/ufw/user6.rules56
38 files changed, 2323 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0a1941c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+# I'd rather keep patched suckless programs in separate repos
+savedconfig
+
+# can be regenerated by portage
+zz-autounmask
diff --git a/distcc/distcc/hosts b/distcc/distcc/hosts
new file mode 100644
index 0000000..f2c033e
--- /dev/null
+++ b/distcc/distcc/hosts
@@ -0,0 +1,6 @@
+# --- /etc/distcc/hosts -----------------------
+# See the "Hosts Specification" section of
+# "man distcc" for the format of this file.
+#
+# By default, just test that it works in loopback mode.
+127.0.0.1
diff --git a/fstab/fstab b/fstab/fstab
new file mode 100644
index 0000000..647564a
--- /dev/null
+++ b/fstab/fstab
@@ -0,0 +1,52 @@
+# /etc/fstab: static file system information.
+#
+# noatime turns off atimes for increased performance (atimes normally aren't
+# needed); notail increases performance of ReiserFS (at the expense of storage
+# efficiency). It's safe to drop the noatime options if you want and to
+# switch between notail / tail freely.
+#
+# The root filesystem should have a pass number of either 0 or 1.
+# All other filesystems should have a pass number of 0 or greater than 1.
+#
+# See the manpage fstab(5) for more information.
+#
+
+# <fs> <mountpoint> <type> <opts> <dump/pass>
+
+# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
+#
+# NOTE: Even though we list ext4 as the type here, it will work with ext2/ext3
+# filesystems. This just tells the kernel to use the ext4 driver.
+#
+# NOTE: You can use full paths to devices like /dev/sda3, but it is often
+# more reliable to use filesystem labels or UUIDs. See your filesystem
+# documentation for details on setting a label. To obtain the UUID, use
+# the blkid(8) command.
+
+#LABEL=boot /boot ext4 noauto,noatime 1 2
+#UUID=58e72203-57d1-4497-81ad-97655bd56494 / ext4 noatime 0 1
+#LABEL=swap none swap sw 0 0
+#/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
+
+UUID=B36E-608F /boot vfat noatime 0 2
+
+UUID=6e72e954-c358-495c-90ae-48061ab0cbd8 / btrfs noatime,compress-force=zstd,autodefrag,subvol=@ 0 1
+UUID=6e72e954-c358-495c-90ae-48061ab0cbd8 /home btrfs noatime,compress-force=zstd,autodefrag,subvol=@home 0 2
+UUID=6e72e954-c358-495c-90ae-48061ab0cbd8 /.snapshots btrfs noatime,compress-force=zstd,autodefrag,subvol=@snapshots 0 2
+UUID=6e72e954-c358-495c-90ae-48061ab0cbd8 /.swap btrfs noatime,subvol=@swap 0 0
+/.swap/swapfile none swap sw,loop 0 0
+
+# /tmp is not mounted as tmpfs automatically by OpenRC
+tmpfs /tmp tmpfs rw,nosuid,noatime,nodev,size=4G,mode=1777,rootcontext=system_u:object_r:tmp_t 0 0
+
+# speeding up emerges
+tmpfs /var/tmp/portage tmpfs size=8G,uid=portage,gid=portage,mode=775,nosuid,noatime,nodev,rootcontext=system_u:object_r:tmp_t 0 0
+
+# /var/lock is automatically symlinked to /run
+#tmpfs /var/lock tmpfs rw,nosuid,noatime,nodev,size=64M,mode=1777,rootcontext=system_u:object_r:tmp_t 0 0
+# /var/run/ is automatically symlinked to /run
+# /run is mounted as tmpfs automatically by OpenRC
+#tmpfs /run tmpfs mode=0755,nosuid,nodev,rootcontext=system_u:object_r:var_run_t 0 0
+
+UUID=364f2509-45c3-4a5c-b232-2654160439a2 /media/wdblue ext4 rw,nofail,noatime 0 0
+
diff --git a/genkernel/genkernel.conf b/genkernel/genkernel.conf
new file mode 100644
index 0000000..75c6d39
--- /dev/null
+++ b/genkernel/genkernel.conf
@@ -0,0 +1,438 @@
+# Configuration file for genkernel
+
+# This file is sourced by genkernel at startup and determines which options
+# we will be using to compile our kernel. The order of precidence is simple,
+# with the internal settings being least important, configuration file
+# settings next, and command line options being most important.
+
+# =========COMMON COMMAND LINE OPTION DEFAULTS=========
+
+# Install to $BOOTDIR
+#INSTALL="yes"
+
+# Run 'make oldconfig' before compiling this kernel
+#OLDCONFIG="yes"
+
+# Run 'make menuconfig' before compiling this kernel
+#MENUCONFIG="no"
+
+# Run 'make gconfig' before compiling this kernel
+#GCONFIG="no"
+
+# Run 'make nconfig' (ncurses 'menuconfig') before compiling this kernel
+#NCONFIG="no"
+
+# Run 'make xconfig' before compiling this kernel
+#XCONFIG="no"
+
+# Run 'make mrproper' before compiling this kernel
+#MRPROPER="yes"
+
+# Run 'make clean' before compiling this kernel
+# Only needed if MRPROPER is set to NO because
+# MRPROPER implies 'make clean'.
+#CLEAN="yes"
+
+# Mount BOOTDIR automatically if it isn't mounted
+#MOUNTBOOT="yes"
+
+# Make symlinks in BOOTDIR automatically
+#SYMLINK="no"
+
+# Save the new configuration in /etc/kernels upon
+# successful compilation
+#SAVE_CONFIG="yes"
+
+# Enable color output in genkernel
+NOCOLOR="false"
+
+# Clear build cache dir on gernkernel start
+#CLEAR_CACHEDIR="no"
+
+# Clear all tmp files and caches after genkernel has run
+#POSTCLEAR="no"
+
+# Check for x MB free disk space in BOOTDIR
+#CHECK_FREE_DISK_SPACE_BOOTDIR=0
+
+# Check for x MB free disk space in kernel outputdir
+#CHECK_FREE_DISK_SPACE_KERNELOUTPUTDIR=0
+
+# Genkernel uses an independent configuration for MAKEOPTS, and does not source
+# /etc/portage/make.conf . You can override the default setting by uncommenting
+# and tweaking the following line. Default setting is set up by
+# ${GK_SHARE}/${ARCH_OVERRIDE}/config.sh . The recommended value for -j
+# argument is: <number of processors>*<number of cores per processor>+1
+#MAKEOPTS="$(portageq envvar MAKEOPTS)"
+
+# Run the kernel make at the following NICE level
+#NICE=10
+
+# Add bcache support
+#BCACHE="no"
+
+# Add LVM support
+#LVM="no"
+
+# Add LUKS support
+#LUKS="no"
+
+# Add GnuPG support
+#GPG="no"
+
+# Add keyctl support for loading LUKS passphrase into a keyring
+#KEYCTL="no"
+
+# Add in early microcode support: this sets the kernel options for early microcode loading
+# Possible values: empty/"no", "all", "intel", "amd"
+#MICROCODE="all"
+
+# Include early microcode in generated initramfs.
+# Only needed if system cannot load multiple initramfs.
+# NOTE: >=sys-boot/grub-2 will detect and auto-load {amd,intel}-uc.img file
+# provided by sys-firmware/intel-microcode[initramfs] or
+# sys-kernel/linux-firmware[initramfs].
+#MICROCODE_INITRAMFS="no"
+
+# Add NFS support
+#NFS="no"
+
+# Add DMRAID support
+#DMRAID="no"
+
+# Add SSH support
+#SSH="no"
+
+# Add b2sum support
+#B2SUM="no"
+
+# Include busybox in the initramfs. If included, busybox is rebuilt
+# if the cached copy is out of date.
+#BUSYBOX="yes"
+
+# Add MDRAID support
+#MDADM="no"
+
+# Specify a custom mdadm.conf.
+# By default the initramfs will be built *without* an mdadm.conf and will auto-detect
+# arrays during bootup. Usually, this should not be needed.
+#MDADM_CONFIG="/etc/mdadm.conf"
+
+# Add Multipath support
+#MULTIPATH="no"
+
+# Add iSCSI support
+#ISCSI="no"
+
+# Add e2fsprogs support
+#E2FSPROGS="no"
+
+# Include support for unionfs
+#UNIONFS="no"
+
+# Include support for zfs volume management. If unset, genkernel will attempt
+# to autodetect and enable this when rootfs is on zfs.
+#ZFS="no"
+
+# Add BTRFS support
+#BTRFS="no"
+
+# Add xfsprogs support
+#XFSPROGS="no"
+
+# Install firmware onto root filesystem
+# Will conflict with sys-kernel/linux-firmware package
+#FIRMWARE_INSTALL="no"
+
+# Add firmware(s) to initramfs
+#FIRMWARE="no"
+
+# Specify directory to pull from
+#FIRMWARE_DIR="/lib/firmware"
+
+# Specify a comma-separated list of firmware files or directories to include,
+# relative to FIRMWARE_DIR. If empty or unset, the full contents of
+# FIRMWARE_DIR will be included (if FIRMWARE option above is set to YES).
+#FIRMWARE_FILES=""
+
+# Add new kernel to grub
+# Possible values: empty/"no", "grub", "grub2"
+#BOOTLOADER="no"
+
+# Use sandbox when building initramfs
+#SANDBOX="yes"
+
+# Embed and set font early on boot
+# Possible values: empty/"none", "current", <PSF file>
+#BOOTFONT="none"
+
+# Add boot splash using splashutils
+#SPLASH="no"
+
+# Use this splash theme. If commented out - the "default" name theme is used.
+# Also, SPLASH="yes" needs to be enabled for this one to work.
+# This supersedes the "SPLASH_THEME" option in '/etc/conf.d/splash'.
+#SPLASH_THEME="gentoo"
+
+# Run "emerge @module-rebuild" automatically when possible and necessary
+# after kernel and modules have been compiled
+#MODULEREBUILD="yes"
+
+# Run the specified command in the current environment after the kernel and
+# modules have been compiled, useful to rebuild external kernel module
+# (see MODULEREBUILD above) or installing additional
+# files (use 'copy_image_with_preserve dtb path/to/dtb dtb <kernelname>')
+#CMD_CALLBACK=""
+
+
+# =========KEYMAP SETTINGS=========
+#
+# Force keymap selection at boot
+#DOKEYMAPAUTO="no"
+
+# Enables keymap selection support
+#KEYMAP="yes"
+
+
+# =========LOW LEVEL COMPILE SETTINGS=========
+#
+# Assembler to use for the kernel. See also the --kernel-as command line
+# option.
+#KERNEL_AS="as"
+
+# Archiver to use for the kernel. See also the --kernel-ar command line
+# option.
+#KERNEL_AR="ar"
+
+# Compiler to use for the kernel (e.g. distcc). See also the --kernel-cc
+# command line option.
+#KERNEL_CC="gcc"
+
+# Linker to use for the kernel. See also the --kernel-ld command line option.
+#KERNEL_LD="ld"
+
+# NM utility to use for the kernel. See also the --kernel-nm command line option.
+#KERNEL_NM="nm"
+
+# GNU Make to use for kernel. See also the --kernel-make command line option.
+#KERNEL_MAKE="make"
+
+# objcopy utility to use for the kernel. See also the --kernel-objcopy command
+# line option.
+#KERNEL_OBJCOPY="objcopy"
+
+# objdump utility to use for the kernel. See also the --kernel-objdump command
+# line option.
+#KERNEL_OBJDUMP="objdump"
+
+# ranlib utility to use for the kernel. See also the --kernel-ranlib command
+# line option.
+#KERNEL_RANLIB="ranlib"
+
+# readelf utility to use for the kernel. See also the --kernel-readelf command
+# line option.
+#KERNEL_READELF="readelf"
+
+# strip utility to use for the kernel. See also the --kernel-strip command line
+# option.
+#KERNEL_STRIP="strip"
+
+# Assembler to use for the utilities. See also the --utils-as command line
+# option.
+#UTILS_AS="as"
+
+# Archiver to use for the utilities. See also the --utils-ar command line
+# option.
+#UTILS_AR="ar"
+
+# C Compiler to use for the utilities (e.g. distcc). See also the --utils-cc
+# command line option.
+#UTILS_CC="gcc"
+
+# C++ Compiler to use for the utilities (e.g. distcc). See also the --utils-cxx
+# command line option.
+#UTILS_CXX="g++"
+
+# Linker to use for the utilities. See also the --utils-ld command line
+# option.
+#UTILS_LD="ld"
+
+# NM utility to use for the utilities. See also the --utils-nm command line option.
+#UTILS_NM="nm"
+
+# GNU Make to use for the utilities. See also the --utils-make command line
+# option.
+#UTILS_MAKE="make"
+
+# Target triple (i.e. aarch64-linux-gnu) to build for. If you do not
+# cross-compile, leave blank for auto detection.
+#CROSS_COMPILE=""
+
+# Target triple (i.e. aarch64-linux-gnu) to build kernel for. Utilities will be
+# built for the native target, not this target. If you do not cross-compile,
+# leave blank.
+#KERNEL_CROSS_COMPILE=""
+
+# Override default make target (bzImage). See also the --kernel-target
+# command line option. Useful to build a uImage on arm.
+#KERNEL_MAKE_DIRECTIVE_OVERRIDE="fooImage"
+
+# Override default kernel binary path. See also the --kernel-binary
+# command line option. Useful to install a uImage on arm.
+#KERNEL_BINARY_OVERRIDE="arch/foo/boot/bar"
+
+
+# =========GENKERNEL LOCATION CONFIGURATION=========
+#
+# Variables:
+# %%ARCH%% - Final determined architecture
+# %%CACHE%% - Final determined cache location
+
+# Set genkernel's temporary work directory
+#TMPDIR="/var/tmp/genkernel"
+
+# Set the boot directory, default is /boot
+#BOOTDIR="/boot"
+
+# Default share directory location
+GK_SHARE="${GK_SHARE:-/usr/share/genkernel}"
+
+# Location of the default cache
+CACHE_DIR="/var/cache/genkernel"
+
+# Location of DISTDIR, where our source tarballs are stored
+DISTDIR="${GK_SHARE}/distfiles"
+
+# Log output file
+LOGFILE="/var/log/genkernel.log"
+
+# Debug Level
+LOGLEVEL=1
+
+
+# =========COMPILED UTILS CONFIGURATION=========
+#
+# Default location of kernel source
+DEFAULT_KERNEL_SOURCE="/usr/src/linux"
+
+# Default kernel config (only use to override using
+# arch/%%ARCH%%/kernel-config-${VER}.${PAT} !)
+#DEFAULT_KERNEL_CONFIG="${GK_SHARE}/arch/%%ARCH%%/kernel-config"
+
+# Specifies a user created busybox config
+#BUSYBOX_CONFIG="/path/to/file"
+
+# NOTE: Since genkernel 3.4.41 the version of
+# busybox, lvm, mdadm, ... have been moved to
+# /usr/share/genkernel/defaults/software.sh in order to
+# reduce the merging you have to do during etc-update.
+# You can still override these settings in here.
+
+
+# =========MISC KERNEL CONFIGURATION=========
+#
+# Set kernel filename which will be used when kernel will be installed
+# into BOOTDIR. See man page to learn more about available placeholders.
+#KERNEL_FILENAME="vmlinuz-%%KV%%"
+
+# Set kernel symlink name which will be used when kernel will be installed
+# into BOOTDIR and SYMLINK option is enabled
+#KERNEL_SYMLINK_NAME="kernel"
+
+# This option will set kernel option CONFIG_LOCALVERSION.
+# Use special value "UNSET" to unset already set CONFIG_LOCALVERSION.
+#KERNEL_LOCALVERSION="-%%ARCH%%"
+
+# This option is only valid if kerncache is
+# defined. If there is a valid kerncache no checks
+# will be made against a kernel source tree.
+#KERNEL_SOURCES="yes"
+
+# Build a static (monolithic kernel)
+#BUILD_STATIC="no"
+
+# Make and install kernelz image (PowerPC)
+#GENZIMAGE="no"
+
+# Archive file created using tar containing kernel binary, content
+# of /lib/modules and the kernel config.
+# NOTE: Archive is created before the callbacks are run!
+#KERNCACHE="/path/to/file.tar.xz"
+
+# Prefix to kernel module destination, modules
+# will be installed in <prefix>/lib/modules
+#KERNEL_MODULES_PREFIX=""
+
+
+# =========MISC INITRAMFS CONFIGURATION=========
+#
+# Set initramfs filename which will be used when initramfs will be
+# installed into BOOTDIR. See man page to learn more about available
+# placeholders.
+#INITRAMFS_FILENAME="initramfs-%%KV%%.img"
+
+# Set initramfs symlink name which will be used when initramfs will be
+# installed into BOOTDIR and SYMLINK option is enabled
+#INITRAMFS_SYMLINK_NAME="initramfs"
+
+# Copy all compiled kernel modules to the initramfs
+#ALLRAMDISKMODULES="no"
+
+# Copy selected modules to the initramfs based on arch-specific modules_load file
+#RAMDISKMODULES="yes"
+
+# Archive file created using tar containing kernel and initramfs.
+# NOTE: No modules outside of the initramfs will be included!
+#MINKERNPACKAGE="/path/to/file.tar.xz"
+
+# Add additional modules to the initramfs using the module groups defined
+# in /usr/share/genkernel/defaults/modules_load (see this file for
+# more details). This would be used if, for example, you
+# required an additional crypto module or network device at boot
+# time and did not want to statically compile these in the kernel.
+# Options take the form AMODULES_{group} where {group} is one of
+# the groups in modules_load (which are in the form MODULES_{group}).
+# Use this with caution.
+#AMODULES_group="module-to-include another-module"
+
+# Override the default modules in the initramfs, for a given group, as defined by
+# /usr/share/genkernel/defaults/modules_load and the per-arch modules_load
+# files. You PROBABLY want to use AMODULES_* above, and NOT MODULES_* here.
+# If you use MODULES_* here, the default and per-arch modules will NOT be used.
+#MODULES_group1="some-module"
+#MODULES_group2="" # Load no modules for this group
+
+# Override the default used linuxrc script.
+#LINUXRC="/path/to/custom/linuxrc"
+
+# Archive file created using tar containing modules after
+# the callbacks have run
+#MODULESPACKAGE="/path/to/file.tar.xz"
+
+# Directory structure to include in the initramfs,
+# only available on >=2.6 kernels
+#INITRAMFS_OVERLAY=""
+
+# Build the generated initramfs into the kernel instead of
+# keeping it as a separate file
+#INTEGRATED_INITRAMFS="no"
+
+# Compress generated initramfs
+#COMPRESS_INITRD="yes"
+
+# Types of compression: best, xz, lzma, bzip2, gzip, lzop, lz4, zstd, fastest
+# "best" selects the best available compression method
+# "fastest" selects the fastest available compression method
+#COMPRESS_INITRD_TYPE="best"
+
+# wrap initramfs using mkimage for u-boot bootloader
+# WRAP_INITRD=no
+
+# Create a self-contained env in the initramfs
+#NETBOOT="no"
+
+
+# =========MISC BOOT CONFIGURATION=========
+#
+# Specify a default for real_root=
+#REAL_ROOT="/dev/one/two/gentoo"
diff --git a/libvirt/libvirt/libvirtd.conf b/libvirt/libvirt/libvirtd.conf
new file mode 100644
index 0000000..02dda29
--- /dev/null
+++ b/libvirt/libvirt/libvirtd.conf
@@ -0,0 +1,535 @@
+# Master libvirt daemon configuration file
+#
+
+#################################################################
+#
+# Network connectivity controls
+#
+
+# Flag listening for secure TLS connections on the public TCP/IP port.
+# NB, must pass the --listen flag to the libvirtd process for this to
+# have any effect.
+#
+# This setting is not required or honoured if using systemd socket
+# activation.
+#
+# It is necessary to setup a CA and issue server certificates before
+# using this capability.
+#
+# This is enabled by default, uncomment this to disable it
+#listen_tls = 0
+
+# Listen for unencrypted TCP connections on the public TCP/IP port.
+# NB, must pass the --listen flag to the libvirtd process for this to
+# have any effect.
+#
+# This setting is not required or honoured if using systemd socket
+# activation.
+#
+# Using the TCP socket requires SASL authentication by default. Only
+# SASL mechanisms which support data encryption are allowed. This is
+# DIGEST_MD5 and GSSAPI (Kerberos5)
+#
+# This is disabled by default, uncomment this to enable it.
+#listen_tcp = 1
+
+
+
+# Override the port for accepting secure TLS connections
+# This can be a port number, or service name
+#
+# This setting is not required or honoured if using systemd socket
+# activation.
+#
+#tls_port = "16514"
+
+# Override the port for accepting insecure TCP connections
+# This can be a port number, or service name
+#
+# This setting is not required or honoured if using systemd socket
+# activation.
+#
+#tcp_port = "16509"
+
+
+# Override the default configuration which binds to all network
+# interfaces. This can be a numeric IPv4/6 address, or hostname
+#
+# This setting is not required or honoured if using systemd socket
+# activation.
+#
+# If the libvirtd service is started in parallel with network
+# startup (e.g. with systemd), binding to addresses other than
+# the wildcards (0.0.0.0/::) might not be available yet.
+#
+#listen_addr = "192.168.0.1"
+
+
+#################################################################
+#
+# UNIX socket access controls
+#
+
+# Set the UNIX domain socket group ownership. This can be used to
+# allow a 'trusted' set of users access to management capabilities
+# without becoming root.
+#
+# This setting is not required or honoured if using systemd socket
+# activation.
+#
+# This is restricted to 'root' by default.
+# ivan: uncomment, changed libvirt to wheel as I don't use polkit
+unix_sock_group = "wheel"
+
+# Set the UNIX socket permissions for the R/O socket. This is used
+# for monitoring VM status only
+#
+# This setting is not required or honoured if using systemd socket
+# activation.
+#
+# Default allows any user. If setting group ownership, you may want to
+# restrict this too.
+# ivan: uncomment
+unix_sock_ro_perms = "0777"
+
+# Set the UNIX socket permissions for the R/W socket. This is used
+# for full management of VMs
+#
+# This setting is not required or honoured if using systemd socket
+# activation.
+#
+# Default allows only root. If PolicyKit is enabled on the socket,
+# the default will change to allow everyone (eg, 0777)
+#
+# If not using PolicyKit and setting group ownership for access
+# control, then you may want to relax this too.
+# ivan: uncomment
+unix_sock_rw_perms = "0770"
+
+# Set the UNIX socket permissions for the admin interface socket.
+#
+# This setting is not required or honoured if using systemd socket
+# activation.
+#
+# Default allows only owner (root), do not change it unless you are
+# sure to whom you are exposing the access to.
+#unix_sock_admin_perms = "0700"
+
+# Set the name of the directory in which sockets will be found/created.
+#
+# This setting is not required or honoured if using systemd socket
+# activation.
+#
+#unix_sock_dir = "/run/libvirt"
+
+
+
+#################################################################
+#
+# Authentication.
+#
+# There are the following choices available:
+#
+# - none: do not perform auth checks. If you can connect to the
+# socket you are allowed. This is suitable if there are
+# restrictions on connecting to the socket (eg, UNIX
+# socket permissions), or if there is a lower layer in
+# the network providing auth (eg, TLS/x509 certificates)
+#
+# - sasl: use SASL infrastructure. The actual auth scheme is then
+# controlled from /etc/sasl2/libvirt.conf. For the TCP
+# socket only GSSAPI & DIGEST-MD5 mechanisms will be used.
+# For non-TCP or TLS sockets, any scheme is allowed.
+#
+# - polkit: use PolicyKit to authenticate. This is only suitable
+# for use on the UNIX sockets. The default policy will
+# require a user to supply their own password to gain
+# full read/write access (aka sudo like), while anyone
+# is allowed read/only access.
+#
+
+# Set an authentication scheme for UNIX read-only sockets
+#
+# By default socket permissions allow anyone to connect
+#
+# If libvirt was compiled without support for 'polkit', then
+# no access control checks are done, but libvirt still only
+# allows execution of APIs which don't change state.
+#
+# If libvirt was compiled with support for 'polkit', then
+# the libvirt socket will perform a check with polkit after
+# connections. The default policy still allows any local
+# user access.
+#
+# To restrict monitoring of domains you may wish to either
+# enable 'sasl' here, or change the polkit policy definition.
+# ivan: uncomment
+auth_unix_ro = "none"
+
+# Set an authentication scheme for UNIX read-write sockets.
+#
+# If libvirt was compiled without support for 'polkit', then
+# the systemd .socket files will use SocketMode=0600 by default
+# thus only allowing root user to connect, and 'auth_unix_rw'
+# will default to 'none'.
+#
+# If libvirt was compiled with support for 'polkit', then
+# the systemd .socket files will use SocketMode=0666 which
+# allows any user to connect and 'auth_unix_rw' will default
+# to 'polkit'. If you disable use of 'polkit' here, then it
+# is essential to change the systemd SocketMode parameter
+# back to 0600, to avoid an insecure configuration.
+# ivan: uncomment
+auth_unix_rw = "none"
+
+# Change the authentication scheme for TCP sockets.
+#
+# If you don't enable SASL, then all TCP traffic is cleartext.
+# Don't do this outside of a dev/test scenario. For real world
+# use, always enable SASL and use the GSSAPI or DIGEST-MD5
+# mechanism in /etc/sasl2/libvirt.conf
+#auth_tcp = "sasl"
+
+# Change the authentication scheme for TLS sockets.
+#
+# TLS sockets already have encryption provided by the TLS
+# layer, and limited authentication is done by certificates
+#
+# It is possible to make use of any SASL authentication
+# mechanism as well, by using 'sasl' for this option
+#auth_tls = "none"
+
+# Enforce a minimum SSF value for TCP sockets
+#
+# The default minimum is currently 56 (single-DES) which will
+# be raised to 112 in the future.
+#
+# This option can be used to set values higher than 112
+#tcp_min_ssf = 112
+
+
+# Change the API access control scheme
+#
+# By default an authenticated user is allowed access
+# to all APIs. Access drivers can place restrictions
+# on this. By default the 'nop' driver is enabled,
+# meaning no access control checks are done once a
+# client has authenticated with libvirtd
+#
+#access_drivers = [ "polkit" ]
+
+#################################################################
+#
+# TLS x509 certificate configuration
+#
+
+# Use of TLS requires that x509 certificates be issued. The default locations
+# for the certificate files is as follows:
+#
+# /etc/pki/CA/cacert.pem - The CA master certificate
+# /etc/pki/libvirt/servercert.pem - The server certificate signed by cacert.pem
+# /etc/pki/libvirt/private/serverkey.pem - The server private key
+#
+# It is possible to override the default locations by altering the 'key_file',
+# 'cert_file', and 'ca_file' values and uncommenting them below.
+#
+# NB, overriding the default of one location requires uncommenting and
+# possibly additionally overriding the other settings.
+#
+
+# Override the default server key file path
+#
+#key_file = "/etc/pki/libvirt/private/serverkey.pem"
+
+# Override the default server certificate file path
+#
+#cert_file = "/etc/pki/libvirt/servercert.pem"
+
+# Override the default CA certificate path
+#
+#ca_file = "/etc/pki/CA/cacert.pem"
+
+# Specify a certificate revocation list.
+#
+# Defaults to not using a CRL, uncomment to enable it
+#crl_file = "/etc/pki/CA/crl.pem"
+
+
+
+#################################################################
+#
+# Authorization controls
+#
+
+
+# Flag to disable verification of our own server certificates
+#
+# When libvirtd starts it performs some sanity checks against
+# its own certificates.
+#
+# Default is to always run sanity checks. Uncommenting this
+# will disable sanity checks which is not a good idea
+#tls_no_sanity_certificate = 1
+
+# Flag to disable verification of client certificates
+#
+# Client certificate verification is the primary authentication mechanism.
+# Any client which does not present a certificate signed by the CA
+# will be rejected.
+#
+# Default is to always verify. Uncommenting this will disable
+# verification.
+#tls_no_verify_certificate = 1
+
+
+# An access control list of allowed x509 Distinguished Names
+# This list may contain wildcards such as
+#
+# "C=GB,ST=London,L=London,O=Red Hat,CN=*"
+#
+# Any * matches any number of consecutive spaces, like a simplified glob(7).
+#
+# The format of the DN for a particular certificate can be queried
+# using:
+#
+# virt-pki-query-dn clientcert.pem
+#
+# NB If this is an empty list, no client can connect, so comment out
+# entirely rather than using empty list to disable these checks
+#
+# By default, no DN's are checked
+#tls_allowed_dn_list = ["DN1", "DN2"]
+
+
+# Override the compile time default TLS priority string. The
+# default is usually "NORMAL" unless overridden at build time.
+# Only set this is it is desired for libvirt to deviate from
+# the global default settings.
+#
+#tls_priority="NORMAL"
+
+
+# An access control list of allowed SASL usernames. The format for username
+# depends on the SASL authentication mechanism. Kerberos usernames
+# look like username@REALM
+#
+# This list may contain wildcards such as
+#
+# "*@EXAMPLE.COM"
+#
+# See the g_pattern_match function for the format of the wildcards.
+#
+# https://developer.gnome.org/glib/stable/glib-Glob-style-pattern-matching.html
+#
+# NB If this is an empty list, no client can connect, so comment out
+# entirely rather than using empty list to disable these checks
+#
+# By default, no Username's are checked
+#sasl_allowed_username_list = ["joe@EXAMPLE.COM", "fred@EXAMPLE.COM" ]
+
+
+#################################################################
+#
+# Processing controls
+#
+
+# The maximum number of concurrent client connections to allow
+# over all sockets combined.
+#max_clients = 5000
+
+# The maximum length of queue of connections waiting to be
+# accepted by the daemon. Note, that some protocols supporting
+# retransmission may obey this so that a later reattempt at
+# connection succeeds.
+#max_queued_clients = 1000
+
+# The maximum length of queue of accepted but not yet
+# authenticated clients. The default value is 20. Set this to
+# zero to turn this feature off.
+#max_anonymous_clients = 20
+
+# The minimum limit sets the number of workers to start up
+# initially. If the number of active clients exceeds this,
+# then more threads are spawned, up to max_workers limit.
+# Typically you'd want max_workers to equal maximum number
+# of clients allowed
+#min_workers = 5
+#max_workers = 20
+
+
+# The number of priority workers. If all workers from above
+# pool are stuck, some calls marked as high priority
+# (notably domainDestroy) can be executed in this pool.
+#prio_workers = 5
+
+# Limit on concurrent requests from a single client
+# connection. To avoid one client monopolizing the server
+# this should be a small fraction of the global max_workers
+# parameter.
+#max_client_requests = 5
+
+# Same processing controls, but this time for the admin interface.
+# For description of each option, be so kind to scroll few lines
+# upwards.
+
+#admin_min_workers = 1
+#admin_max_workers = 5
+#admin_max_clients = 5
+#admin_max_queued_clients = 5
+#admin_max_client_requests = 5
+
+#################################################################
+#
+# Logging controls
+#
+
+# Logging level: 4 errors, 3 warnings, 2 information, 1 debug
+# basically 1 will log everything possible
+#
+# WARNING: USE OF THIS IS STRONGLY DISCOURAGED.
+#
+# WARNING: It outputs too much information to practically read.
+# WARNING: The "log_filters" setting is recommended instead.
+#
+# WARNING: Journald applies rate limiting of messages and so libvirt
+# WARNING: will limit "log_level" to only allow values 3 or 4 if
+# WARNING: journald is the current output.
+#
+# WARNING: USE OF THIS IS STRONGLY DISCOURAGED.
+#log_level = 3
+
+# Logging filters:
+# A filter allows to select a different logging level for a given category
+# of logs. The format for a filter is:
+#
+# level:match
+#
+# where 'match' is a string which is matched against the category
+# given in the VIR_LOG_INIT() at the top of each libvirt source
+# file, e.g., "remote", "qemu", or "util.json". The 'match' in the
+# filter matches using shell wildcard syntax (see 'man glob(7)').
+# The 'match' is always treated as a substring match. IOW a match
+# string 'foo' is equivalent to '*foo*'.
+#
+# 'level' is the minimal level where matching messages should
+# be logged:
+#
+# 1: DEBUG
+# 2: INFO
+# 3: WARNING
+# 4: ERROR
+#
+# Multiple filters can be defined in a single @log_filters, they just need
+# to be separated by spaces. Note that libvirt performs "first" match, i.e.
+# if there are concurrent filters, the first one that matches will be applied,
+# given the order in @log_filters.
+#
+# A typical need is to capture information from a hypervisor driver,
+# public API entrypoints and some of the utility code. Some utility
+# code is very verbose and is generally not desired. Taking the QEMU
+# hypervisor as an example, a suitable filter string for debugging
+# might be to turn off object, json & event logging, but enable the
+# rest of the util code:
+#
+#log_filters="1:qemu 1:libvirt 4:object 4:json 4:event 1:util"
+
+# Logging outputs:
+# An output is one of the places to save logging information
+# The format for an output can be:
+# level:stderr
+# output goes to stderr
+# level:syslog:name
+# use syslog for the output and use the given name as the ident
+# level:file:file_path
+# output to a file, with the given filepath
+# level:journald
+# output to journald logging system
+# In all cases 'level' is the minimal priority, acting as a filter
+# 1: DEBUG
+# 2: INFO
+# 3: WARNING
+# 4: ERROR
+#
+# Multiple outputs can be defined, they just need to be separated by spaces.
+# e.g. to log all warnings and errors to syslog under the libvirtd ident:
+#log_outputs="3:syslog:libvirtd"
+
+
+##################################################################
+#
+# Auditing
+#
+# This setting allows usage of the auditing subsystem to be altered:
+#
+# audit_level == 0 -> disable all auditing
+# audit_level == 1 -> enable auditing, only if enabled on host (default)
+# audit_level == 2 -> enable auditing, and exit if disabled on host
+#
+#audit_level = 2
+#
+# If set to 1, then audit messages will also be sent
+# via libvirt logging infrastructure. Defaults to 0
+#
+#audit_logging = 1
+
+###################################################################
+# UUID of the host:
+# Host UUID is read from one of the sources specified in host_uuid_source.
+#
+# - 'smbios': fetch the UUID from 'dmidecode -s system-uuid'
+# - 'machine-id': fetch the UUID from /etc/machine-id
+#
+# The host_uuid_source default is 'smbios'. If 'dmidecode' does not provide
+# a valid UUID a temporary UUID will be generated.
+#
+# Another option is to specify host UUID in host_uuid.
+#
+# Keep the format of the example UUID below. UUID must not have all digits
+# be the same.
+
+# NB This default all-zeros UUID will not work. Replace
+# it with the output of the 'uuidgen' command and then
+# uncomment this entry
+#host_uuid = "00000000-0000-0000-0000-000000000000"
+#host_uuid_source = "smbios"
+
+###################################################################
+# Keepalive protocol:
+# This allows libvirtd to detect broken client connections or even
+# dead clients. A keepalive message is sent to a client after
+# keepalive_interval seconds of inactivity to check if the client is
+# still responding; keepalive_count is a maximum number of keepalive
+# messages that are allowed to be sent to the client without getting
+# any response before the connection is considered broken. In other
+# words, the connection is automatically closed approximately after
+# keepalive_interval * (keepalive_count + 1) seconds since the last
+# message received from the client. If keepalive_interval is set to
+# -1, libvirtd will never send keepalive requests; however clients
+# can still send them and the daemon will send responses. When
+# keepalive_count is set to 0, connections will be automatically
+# closed after keepalive_interval seconds of inactivity without
+# sending any keepalive messages.
+#
+#keepalive_interval = 5
+#keepalive_count = 5
+
+#
+# These configuration options are no longer used. There is no way to
+# restrict such clients from connecting since they first need to
+# connect in order to ask for keepalive.
+#
+#keepalive_required = 1
+#admin_keepalive_required = 1
+
+# Keepalive settings for the admin interface
+#admin_keepalive_interval = 5
+#admin_keepalive_count = 5
+
+###################################################################
+# Open vSwitch:
+# This allows to specify a timeout for openvswitch calls made by
+# libvirt. The ovs-vsctl utility is used for the configuration and
+# its timeout option is set by default to 5 seconds to avoid
+# potential infinite waits blocking libvirt.
+#
+#ovs_timeout = 5
diff --git a/openrc/rc.conf b/openrc/rc.conf
new file mode 100644
index 0000000..a5a8a62
--- /dev/null
+++ b/openrc/rc.conf
@@ -0,0 +1,322 @@
+# Global OpenRC configuration settings
+
+# Set to "YES" if you want the rc system to try and start services
+# in parallel for a slight speed improvement. When running in parallel we
+# prefix the service output with its name as the output will get
+# jumbled up.
+# WARNING: whilst we have improved parallel, it can still potentially lock
+# the boot process. Don't file bugs about this unless you can supply
+# patches that fix it without breaking other things!
+# ivan: set to no as it interfered with swap mounting before
+rc_parallel="NO"
+
+# Set rc_interactive to "YES" and you'll be able to press the I key during
+# boot so you can choose to start specific services. Set to "NO" to disable
+# this feature. This feature is automatically disabled if rc_parallel is
+# set to YES.
+#rc_interactive="YES"
+
+# If we need to drop to a shell, you can specify it here.
+# If not specified we use $SHELL, otherwise the one specified in /etc/passwd,
+# otherwise /bin/sh
+# Linux users could specify /sbin/sulogin
+rc_shell=/sbin/sulogin
+
+# Do we allow any started service in the runlevel to satisfy the dependency
+# or do we want all of them regardless of state? For example, if net.eth0
+# and net.eth1 are in the default runlevel then with rc_depend_strict="NO"
+# both will be started, but services that depend on 'net' will work if either
+# one comes up. With rc_depend_strict="YES" we would require them both to
+# come up.
+#rc_depend_strict="YES"
+
+# rc_hotplug controls which services we allow to be hotplugged.
+# A hotplugged service is one started by a dynamic dev manager when a matching
+# hardware device is found.
+# Hotplugged services appear in the "hotplugged" runlevel.
+# If rc_hotplug is set to any value, we compare the name of this service
+# to every pattern in the value, from left to right, and we allow the
+# service to be hotplugged if it matches a pattern, or if it matches no
+# patterns. Patterns can include shell wildcards.
+# To disable services from being hotplugged, prefix patterns with "!".
+#If rc_hotplug is not set or is empty, all hotplugging is disabled.
+# Example - rc_hotplug="net.wlan !net.*"
+# This allows net.wlan and any service not matching net.* to be hotplugged.
+# Example - rc_hotplug="!net.*"
+# This allows services that do not match "net.*" to be hotplugged.
+# ivan: added to fix samba on boot not starting
+rc_hotplug="!net.*"
+
+# rc_logger launches a logging daemon to log the entire rc process to
+# /var/log/rc.log
+# NOTE: Linux systems require the devfs service to be started before
+# logging can take place and as such cannot log the sysinit runlevel.
+# ivan: uncommented, NO->YES
+rc_logger="YES"
+
+# Through rc_log_path you can specify a custom log file.
+# The default value is: /var/log/rc.log
+#rc_log_path="/var/log/rc.log"
+
+# If you want verbose output for OpenRC, set this to yes. If you want
+# verbose output for service foo only, set it to yes in /etc/conf.d/foo.
+#rc_verbose=no
+
+# By default we filter the environment for our running scripts. To allow other
+# variables through, add them here. Use a * to allow all variables through.
+#rc_env_allow="VAR1 VAR2"
+
+# By default we assume that all daemons will start correctly.
+# However, some do not - a classic example is that they fork and return 0 AND
+# then child barfs on a configuration error. Or the daemon has a bug and the
+# child crashes. You can set the number of milliseconds start-stop-daemon
+# waits to check that the daemon is still running after starting here.
+# The default is 0 - no checking.
+#rc_start_wait=100
+
+# rc_nostop is a list of services which will not stop when changing runlevels.
+# This still allows the service itself to be stopped when called directly.
+#rc_nostop=""
+
+# rc will attempt to start crashed services by default.
+# However, it will not stop them by default as that could bring down other
+# critical services.
+#rc_crashed_stop=NO
+#rc_crashed_start=YES
+
+# Set rc_nocolor to yes if you do not want colors displayed in OpenRC
+# output.
+#rc_nocolor=NO
+
+##############################################################################
+# MISC CONFIGURATION VARIABLES
+# There variables are shared between many init scripts
+
+# Set unicode to NO to turn off unicode support for keyboards and screens.
+unicode="YES"
+
+# This is how long fuser should wait for a remote server to respond. The
+# default is 60 seconds, but it can be adjusted here.
+#rc_fuser_timeout=60
+
+# Below is the default list of network fstypes.
+#
+# afs ceph cifs coda davfs fuse fuse.glusterfs fuse.sshfs gfs glusterfs lustre
+# ncpfs nfs nfs4 ocfs2 shfs smbfs
+#
+# If you would like to add to this list, you can do so by adding your
+# own fstypes to the following variable.
+#extra_net_fs_list=""
+
+##############################################################################
+# SERVICE CONFIGURATION VARIABLES
+# These variables are documented here, but should be configured in
+# /etc/conf.d/foo for service foo and NOT enabled here unless you
+# really want them to work on a global basis.
+# If your service has characters in its name which are not legal in
+# shell variable names and you configure the variables for it in this
+# file, those characters should be replaced with underscores in the
+# variable names as shown below.
+
+# Some daemons are started and stopped via start-stop-daemon.
+# We can set some things on a per service basis, like the nicelevel.
+# These need to be exported
+#export SSD_NICELEVEL="0"
+# Or the ionice level. The format is class[:data] , just like the
+# --ionice start-stop-daemon parameter.
+#export SSD_IONICELEVEL="0:0"
+# Or the OOM score adjustment.
+#export SSD_OOM_SCORE_ADJ="0"
+
+# Pass ulimit parameters
+# If you are using bash in POSIX mode for your shell, note that the
+# ulimit command uses a block size of 512 bytes for the -c and -f
+# options
+#rc_ulimit="-u 30"
+
+# It's possible to define extra dependencies for services like so
+#rc_config="/etc/foo"
+#rc_need="openvpn"
+#rc_use="net.eth0"
+#rc_after="clock"
+#rc_before="local"
+#rc_provide="!net"
+
+# You can also enable the above commands here for each service. Below is an
+# example for service foo.
+#rc_foo_config="/etc/foo"
+#rc_foo_need="openvpn"
+#rc_foo_after="clock"
+
+# Below is an example for service foo-bar. Note that the '-' is illegal
+# in a shell variable name, so we convert it to an underscore.
+# example for service foo-bar.
+#rc_foo_bar_config="/etc/foo-bar"
+#rc_foo_bar_need="openvpn"
+#rc_foo_bar_after="clock"
+
+# You can also remove dependencies.
+# This is mainly used for saying which services do NOT provide net.
+#rc_net_tap0_provide="!net"
+
+# This is the subsystem type.
+# It is used to match against keywords set by the keyword call in the
+# depend function of service scripts.
+#
+# It should be set to the value representing the environment this file is
+# PRESENTLY in, not the virtualization the environment is capable of.
+# If it is commented out, automatic detection will be used.
+#
+# The list below shows all possible settings as well as the host
+# operating systems where they can be used and autodetected.
+#
+# "" - nothing special
+# "docker" - Docker container manager (Linux)
+# "jail" - Jail (DragonflyBSD or FreeBSD)
+# "lxc" - Linux Containers
+# "openvz" - Linux OpenVZ
+# "prefix" - Prefix
+# "rkt" - CoreOS container management system (Linux)
+# "subhurd" - Hurd subhurds (to be checked)
+# "systemd-nspawn" - Container created by systemd-nspawn (Linux)
+# "uml" - Usermode Linux
+# "vserver" - Linux vserver
+# "xen0" - Xen0 Domain (Linux and NetBSD)
+# "xenU" - XenU Domain (Linux and NetBSD)
+#rc_sys=""
+
+# if you use openrc-init, which is currently only available on Linux,
+# this is the default runlevel to activate after "sysinit" and "boot"
+# when booting.
+#rc_default_runlevel="default"
+
+# on Linux and Hurd, this is the number of ttys allocated for logins
+# It is used in the consolefont, keymaps, numlock and termencoding
+# service scripts.
+rc_tty_number=12
+
+##############################################################################
+# LINUX CGROUPS RESOURCE MANAGEMENT
+
+# This sets the mode used to mount cgroups.
+# "hybrid" mounts cgroups version 2 on /sys/fs/cgroup/unified and
+# cgroups version 1 on /sys/fs/cgroup.
+# "legacy" mounts cgroups version 1 on /sys/fs/cgroup
+# "unified" mounts cgroups version 2 on /sys/fs/cgroup
+#rc_cgroup_mode="hybrid"
+
+# This is a list of controllers which should be enabled for cgroups version 2
+# when hybrid mode is being used.
+# Controllers listed here will not be available for cgroups version 1.
+#rc_cgroup_controllers=""
+
+# This variable contains the cgroups version 2 settings for your services.
+# If this is set in this file, the settings will apply to all services.
+# If you want different settings for each service, place the settings in
+# /etc/conf.d/foo for service foo.
+# The format is to specify the setting and value followed by a newline.
+# Multiple settings and values can be specified.
+# For example, you would use this to set the maximum memory and maximum
+# number of pids for a service.
+#rc_cgroup_settings="
+#memory.max 10485760
+#pids.max max
+#"
+#
+# For more information about the adjustments that can be made with
+# cgroups version 2, see Documentation/cgroups-v2.txt in the linux kernel
+# source tree.
+#rc_cgroup_settings=""
+
+# This switch controls whether or not cgroups version 1 controllers are
+# individually mounted under
+# /sys/fs/cgroup in hybrid or legacy mode.
+#rc_controller_cgroups="YES"
+
+# The following setting turns on the memory.use_hierarchy setting in the
+# root memory cgroup for cgroups v1.
+# It must be set to yes in this file if you want this functionality.
+#rc_cgroup_memory_use_hierarchy="NO"
+
+# The following settings allow you to set up values for the cgroups version 1
+# controllers for your services.
+# They can be set in this file;, however, if you do this, the settings
+# will apply to all of your services.
+# If you want different settings for each service, place the settings in
+# /etc/conf.d/foo for service foo.
+# The format is to specify the names of the settings followed by their
+# values. Each variable can hold multiple settings.
+# For example, you would use this to set the cpu.shares setting in the
+# cpu controller to 512 for your service.
+# rc_cgroup_cpu="
+# cpu.shares 512
+# "
+#
+# For more information about the adjustments that can be made with
+# cgroups version 1, see Documentation/cgroups-v1/* in the linux kernel
+# source tree.
+
+# Set the blkio controller settings for this service.
+#rc_cgroup_blkio=""
+
+# Set the cpu controller settings for this service.
+#rc_cgroup_cpu=""
+
+# Add this service to the cpuacct controller (any value means yes).
+#rc_cgroup_cpuacct=""
+
+# Set the cpuset controller settings for this service.
+#rc_cgroup_cpuset=""
+
+# Set the devices controller settings for this service.
+#rc_cgroup_devices=""
+
+# Set the hugetlb controller settings for this service.
+#rc_cgroup_hugetlb=""
+
+# Set the memory controller settings for this service.
+#rc_cgroup_memory=""
+
+# Set the net_cls controller settings for this service.
+#rc_cgroup_net_cls=""
+
+# Set the net_prio controller settings for this service.
+#rc_cgroup_net_prio=""
+
+# Set the pids controller settings for this service.
+#rc_cgroup_pids=""
+
+# Set this to YES if you want all of the processes in a service's cgroup
+# killed when the service is stopped or restarted.
+# Be aware that setting this to yes means all of a service's
+# child processes will be killed. Keep this in mind if you set this to
+# yes here instead of for the individual services in
+# /etc/conf.d/<service>.
+# To perform this cleanup manually for a stopped service, you can
+# execute cgroup_cleanup with /etc/init.d/<service> cgroup_cleanup or
+# rc-service <service> cgroup_cleanup.
+# If the kernel includes support for cgroup2's cgroup.kill, this is used
+# to reliably teardown the cgroup.
+# If this fails, the process followed in this cleanup is the following:
+# 1. send stopsig (sigterm if it isn't set) to all processes left in the
+# cgroup immediately followed by sigcont.
+# 2. Send sighup to all processes in the cgroup if rc_send_sighup is
+# yes.
+# 3. delay for rc_timeout_stopsec seconds.
+# 4. send sigkill to all processes in the cgroup unless disabled by
+# setting rc_send_sigkill to no.
+# rc_cgroup_cleanup="NO"
+
+# If this is yes, we will send sighup to the processes in the cgroup
+# immediately after stopsig and sigcont.
+#rc_send_sighup="NO"
+
+# This is the amount of time in seconds that we delay after sending sigcont
+# and optionally sighup, before we optionally send sigkill to all
+# processes in the # cgroup.
+# The default is 90 seconds.
+#rc_timeout_stopsec="90"
+
+# If this is set to no, we do not send sigkill to all processes in the
+# cgroup.
+#rc_send_sigkill="YES"
diff --git a/portage/portage/conf-update.d/etckeeper b/portage/portage/conf-update.d/etckeeper
new file mode 100755
index 0000000..d0546c8
--- /dev/null
+++ b/portage/portage/conf-update.d/etckeeper
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+set -eu
+
+# etckeeper hook for portage's conf-update hooks (e.g. invoked by
+# dispatch-conf). Requires portage > 3.0.22.
+
+# Do nothing if etckeeper is not initialized.
+if [[ ! -f "/etc/etckeeper/etckeeper.conf" ]]; then
+ exit
+fi
+
+echo "conf-update.d ${@}"
+
+case "${1}" in
+ pre-session)
+ echo "Commiting uncommited changes before starting a configuration update session"
+ etckeeper pre-install
+ ;;
+ post-session)
+ echo "Commiting uncommited changes before after finishing a configuration update session"
+ etckeeper post-install
+ ;;
+ post-update)
+ ACTION=${1}
+ FILE_PATH=${2}
+ FILE=$(basename "${FILE_PATH}")
+
+ echo "Commiting changes for ${FILE}"
+ etckeeper vcs add "${FILE_PATH}"
+ etckeeper vcs commit -m "${FILE}: ${ACTION} (conf-update.d hook)"
+ ;;
+esac
diff --git a/portage/portage/env/1core.conf b/portage/portage/env/1core.conf
new file mode 100644
index 0000000..3bd894a
--- /dev/null
+++ b/portage/portage/env/1core.conf
@@ -0,0 +1 @@
+MAKEOPTS="-j1 -l2"
diff --git a/portage/portage/env/2cores.conf b/portage/portage/env/2cores.conf
new file mode 100644
index 0000000..4122219
--- /dev/null
+++ b/portage/portage/env/2cores.conf
@@ -0,0 +1 @@
+MAKEOPTS="-j2 -l3"
diff --git a/portage/portage/env/4cores.conf b/portage/portage/env/4cores.conf
new file mode 100644
index 0000000..73990a5
--- /dev/null
+++ b/portage/portage/env/4cores.conf
@@ -0,0 +1 @@
+MAKEOPTS="-j4 -l5"
diff --git a/portage/portage/env/8cores.conf b/portage/portage/env/8cores.conf
new file mode 100644
index 0000000..2ec1ed0
--- /dev/null
+++ b/portage/portage/env/8cores.conf
@@ -0,0 +1 @@
+MAKEOPTS="-j8 -l9"
diff --git a/portage/portage/env/nodistcc.conf b/portage/portage/env/nodistcc.conf
new file mode 100644
index 0000000..01ed12b
--- /dev/null
+++ b/portage/portage/env/nodistcc.conf
@@ -0,0 +1 @@
+FEATURES="-distcc"
diff --git a/portage/portage/env/notmpfs.conf b/portage/portage/env/notmpfs.conf
new file mode 100644
index 0000000..b8a96f4
--- /dev/null
+++ b/portage/portage/env/notmpfs.conf
@@ -0,0 +1 @@
+PORTAGE_TMPDIR="/var/tmp/notmpfs"
diff --git a/portage/portage/make.conf b/portage/portage/make.conf
new file mode 100644
index 0000000..14ad846
--- /dev/null
+++ b/portage/portage/make.conf
@@ -0,0 +1,38 @@
+COMMON_FLAGS="-march=native -O2 -pipe"
+CFLAGS="${COMMON_FLAGS}"
+CXXFLAGS="${COMMON_FLAGS}"
+FCFLAGS="${COMMON_FLAGS}"
+FFLAGS="${COMMON_FLAGS}"
+
+LC_MESSAGES=C
+
+PORTAGE_NICENESS=19
+PORTAGE_IONICE_COMMAND="ionice -c 3 -p \${PID}"
+
+EMERGE_DEFAULT_OPTS="--ask --ask-enter-invalid --jobs=6 --load-average=11.9"
+MAKEOPTS="-j8"
+
+FEATURES="nostrip pid-sandbox collision-protect downgrade-backup ipc-sandbox network-sandbox parallel-fetch parallel-install sign"
+
+ACCEPT_LICENSE="-* @BINARY-REDISTRIBUTABLE"
+ACCEPT_KEYWORDS="amd64"
+
+QEMU_SOFTMMU_TARGETS="arm x86_64"
+QEMU_USER_TARGETS="x86_64"
+
+INPUT_DEVIDES="libinput keyboard wacom"
+VIDEO_CARDS="nvidia"
+
+USE="caps filecaps seccomp verify-sig \
+ cjk bash-completion -emacs \
+ aac flac mp3 ogg opus \
+ apng eps gif jpeg jpeg2k jpegxl webp png postscript tiff \
+ djvu epub pdf \
+ bzip2 lz4 lzma lzo zip zlib zstd \
+ udev dbus lm-sensors \
+ X xorg xinerama -wayland elogind \
+ opengl vulkan v4l vaapi \
+ alsa pipewire -pulseaudio -jack \
+ gtk qt5 -kde -gnome -gnome-keyring -gtk-doc \
+ -bluetooth -smartcard \
+ -systemd -policykit -gstreamer -ldap -networkmanager -cups"
diff --git a/portage/portage/make.profile b/portage/portage/make.profile
new file mode 120000
index 0000000..da3320a
--- /dev/null
+++ b/portage/portage/make.profile
@@ -0,0 +1 @@
+../../var/db/repos/gentoo/profiles/default/linux/amd64/17.1/hardened/selinux \ No newline at end of file
diff --git a/portage/portage/package.accept_keywords b/portage/portage/package.accept_keywords
new file mode 100644
index 0000000..b638dc8
--- /dev/null
+++ b/portage/portage/package.accept_keywords
@@ -0,0 +1,60 @@
+# unstable stuff from Gentoo repo
+# last check: 2023-08-19
+mail-mta/proton-mail-bridge ~amd64
+media-video/droidcam ~amd64
+media-sound/spek ~amd64
+www-plugins/lightspark ~amd64
+sys-boot/mokutil ~amd64
+games-util/joystick ~amd64
+sys-fs/archivemount ~amd64
+sys-fs/jmtpfs ~amd64
+# stable oath-toolkit requires old versions of dev-libs/xmlsec, which is annoying for updates
+sys-auth/oath-toolkit ~amd64
+
+app-emulation/wine-proton ~amd64
+games-action/multimc-bin ~amd64
+
+media-video/mpv::vapoursynth ~amd64
+media-libs/vapoursynth ~amd64
+
+www-apps/hugo ~amd64
+
+sys-fs/fragview ~amd64
+
+app-forensics/lynis ~amd64
+
+dev-vcs/git-filter-repo ~amd64
+
+# remote control of players
+mpv-plugin/mpv-mpris ~amd64
+
+# laptop stuff
+x11-apps/igt-gpu-tools ~amd64
+
+
+# GURU
+net-p2p/monero ~amd64
+dev-libs/randomx ~amd64
+dev-libs/supercop ~amd64
+
+app-misc/dragon ~amd64
+
+>=media-sound/ncpamixer-9999 ~amd64 **
+
+games-emulation/citra ~amd64 **
+
+
+# gentoobr
+x11-misc/devour ~amd64
+
+
+# ArchFeh
+>=media-sound/pamixer-9999 **
+
+
+# fem
+app-admin/pass-git-helper ~amd64
+
+
+# ace
+games-util/mangohud ~amd64
diff --git a/portage/portage/package.license b/portage/portage/package.license
new file mode 100644
index 0000000..6a04a1f
--- /dev/null
+++ b/portage/portage/package.license
@@ -0,0 +1 @@
+media-fonts/mikachan-font-otf free-noncomm
diff --git a/portage/portage/package.mask b/portage/portage/package.mask
new file mode 100644
index 0000000..ff1e7f7
--- /dev/null
+++ b/portage/portage/package.mask
@@ -0,0 +1,20 @@
+# obvious overcomplicated crap
+sys-auth/polkit
+sys-apps/systemd
+
+# 6.0 and upwards requires systemd
+>=www-misc/profile-sync-daemon-6.0
+
+# avoiding distcc failures + unneeded recompilation
+sys-devel/binutils
+sys-devel/gcc
+sys-libs/glibc
+sys-devel/llvm
+sys-devel/llvmgold
+sys-devel/clang
+
+# kinda forgot why
+#>=dev-libs/openssl-3.0.10
+
+# for SVP
+>=dev-qt/qtdeclarative-6.0
diff --git a/portage/portage/package.unmask b/portage/portage/package.unmask
new file mode 100644
index 0000000..e289821
--- /dev/null
+++ b/portage/portage/package.unmask
@@ -0,0 +1,7 @@
+=sys-devel/binutils-2.40-r5
+=sys-devel/gcc-13.2.1_p20230826
+=sys-libs/glibc-2.37-r7
+# llvm and clang must have same version!
+=sys-devel/llvm-16.0.6
+=sys-devel/llvmgold-16
+=sys-devel/clang-16.0.6
diff --git a/portage/portage/package.use/00cpu-flags b/portage/portage/package.use/00cpu-flags
new file mode 100644
index 0000000..102a85d
--- /dev/null
+++ b/portage/portage/package.use/00cpu-flags
@@ -0,0 +1 @@
+*/* CPU_FLAGS_X86: aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3
diff --git a/portage/portage/package.use/common b/portage/portage/package.use/common
new file mode 100644
index 0000000..bdde8a3
--- /dev/null
+++ b/portage/portage/package.use/common
@@ -0,0 +1,38 @@
+app-alternatives/sh dash -bash
+app-shells/dash static
+
+# fuck DRM
+www-client/firefox-bin -gmp-autoupdate
+
+media-video/mpv::vapoursynth vapoursynth
+
+media-video/ffmpeg x264 x265
+
+# VimTex needs synctex to rebuild
+app-text/zathura synctex
+
+mail-client/neomutt notmuch
+
+media-sound/pulseaudio -daemon
+# pipewire-alsa replaces pulseaudio ALSA plugin
+# sound-server replaces pulseaudio daemon
+media-video/pipewire pipewire-alsa sound-server jack-sdk
+
+# allows ssh -X
+x11-base/xorg-server xcsecurity
+
+net-fs/samba client
+
+app-emulation/virt-manager gui
+app-emulation/qemu spice usb usbredir
+
+app-emulation/wine-proton pulseaudio
+virtual/wine proton
+
+sys-libs/zlib minizip
+
+dev-python/PyQt5 -opengl
+
+app-misc/nnn gitstatus
+
+app-text/texlive -cjk l10n_fr
diff --git a/portage/portage/repos.conf/eselect-repo.conf b/portage/portage/repos.conf/eselect-repo.conf
new file mode 100644
index 0000000..2b1756e
--- /dev/null
+++ b/portage/portage/repos.conf/eselect-repo.conf
@@ -0,0 +1,36 @@
+# created by eselect-repo
+
+[vapoursynth]
+location = /var/db/repos/vapoursynth
+sync-type = git
+sync-uri = https://github.com/gentoo-mirror/vapoursynth
+
+[monero]
+location = /var/db/repos/monero
+sync-type = git
+sync-uri = https://github.com/gentoo-mirror/monero.git
+
+[guru]
+location = /var/db/repos/guru
+sync-type = git
+sync-uri = https://github.com/gentoo-mirror/guru.git
+
+[gentoobr]
+location = /var/db/repos/gentoobr
+sync-type = git
+sync-uri = https://github.com/gentoo-mirror/gentoobr.git
+
+[ArchFeh]
+location = /var/db/repos/ArchFeh
+sync-type = git
+sync-uri = https://github.com/gentoo-mirror/ArchFeh.git
+
+[ace]
+location = /var/db/repos/ace
+sync-type = git
+sync-uri = https://github.com/gentoo-mirror/ace.git
+
+[fem-overlay]
+location = /var/db/repos/fem-overlay
+sync-type = git
+sync-uri = https://github.com/gentoo-mirror/fem-overlay.git
diff --git a/portage/portage/sets/ibase b/portage/portage/sets/ibase
new file mode 100644
index 0000000..e89fc23
--- /dev/null
+++ b/portage/portage/sets/ibase
@@ -0,0 +1,48 @@
+app-admin/stow
+app-admin/sudo
+app-admin/sysklogd
+app-arch/atool
+app-arch/p7zip
+app-arch/unrar
+app-crypt/efitools
+app-crypt/sbsigntools
+app-crypt/signify
+app-editors/nano
+app-editors/neovim
+app-eselect/eselect-repository
+app-misc/nnn
+app-portage/eix
+app-portage/euses
+app-portage/gentoolkit
+app-portage/portage-utils
+app-text/highlight
+dev-vcs/git
+net-analyzer/iftop
+net-analyzer/nmap
+net-analyzer/traceroute
+net-dns/bind-tools
+net-firewall/ufw
+net-fs/cifs-utils
+net-misc/chrony
+net-misc/iperf
+sys-apps/lshw
+sys-apps/pciutils
+sys-apps/usbutils
+sys-boot/efibootmgr
+sys-boot/mokutil
+sys-devel/distcc
+sys-fs/btrfs-progs
+sys-fs/cryptsetup
+sys-fs/dosfstools
+sys-fs/ncdu
+sys-kernel/genkernel
+sys-kernel/gentoo-sources
+sys-kernel/linux-firmware
+virtual/cron
+sys-process/htop
+sys-process/lsof
+sys-apps/etckeeper
+app-misc/trash-cli
+app-shells/bash-completion
+dev-python/pip
+dev-python/virtualenv
diff --git a/portage/portage/sets/icommon b/portage/portage/sets/icommon
new file mode 100644
index 0000000..378eee2
--- /dev/null
+++ b/portage/portage/sets/icommon
@@ -0,0 +1,111 @@
+@ibase
+
+# latex
+app-text/texlive
+dev-tex/biblatex
+dev-tex/latexmk
+dev-tex/glossaries
+
+# email
+mail-client/mutt
+mail-mta/opensmtpd
+app-misc/abook
+net-mail/isync
+www-client/w3m
+
+# others
+app-admin/pass
+app-admin/pass-git-helper
+app-admin/pass-otp
+app-backup/borgbackup
+app-backup/snapper
+app-crypt/pinentry
+app-emulation/qemu
+app-emulation/virt-manager
+app-emulation/winetricks
+app-misc/dragon
+app-misc/reptyr
+app-misc/tmux
+app-office/libreoffice-bin
+app-portage/cpuid2cpuflags
+app-shells/fzf
+app-text/pdftk
+app-text/xournalpp
+app-text/zathura-meta
+dev-qt/qtstyleplugins
+dev-util/android-tools
+dev-util/shellcheck-bin
+dev-util/valgrind
+games-util/joystick
+lxde-base/lxappearance
+media-fonts/fontawesome
+media-fonts/fonts-meta
+media-gfx/gimp
+media-gfx/imagemagick
+media-gfx/inkscape
+media-gfx/maim
+media-gfx/sxiv
+media-sound/mpc
+media-sound/mpd
+media-sound/ncmpcpp
+media-sound/ncpamixer
+media-sound/opus-tools
+media-sound/pamixer
+media-sound/playerctl
+media-sound/shntool
+media-sound/spek
+media-tv/v4l-utils
+media-video/droidcam
+media-video/ffmpeg
+media-video/libva-utils
+media-video/mediainfo
+media-video/mpv::vapoursynth
+mpv-plugin/mpv-mpris
+media-video/pipewire
+net-analyzer/iftop
+net-fs/curlftpfs
+net-fs/samba
+net-ftp/lftp
+net-im/signal-desktop-bin
+net-im/telegram-desktop
+net-misc/rclone
+net-misc/yt-dlp
+net-p2p/monero
+net-p2p/syncthing
+net-vpn/openvpn
+sys-apps/firejail
+sys-apps/lm-sensors
+sys-apps/smartmontools
+sys-block/gparted
+sys-fs/archivemount
+sys-fs/bees
+sys-fs/btrfsmaintenance
+sys-fs/compsize
+sys-fs/exfatprogs
+sys-fs/jmtpfs
+sys-fs/simple-mtpfs
+sys-fs/fragview
+sys-power/cpupower
+virtual/jre
+virtual/wine
+www-client/firefox-bin
+x11-base/xorg-server
+x11-misc/devour
+x11-misc/dmenu
+x11-misc/dunst
+x11-misc/grabc
+x11-misc/redshift
+x11-misc/slock
+x11-misc/tabbed
+x11-misc/unclutter-xfixes
+x11-misc/xautolock
+x11-misc/xclip
+x11-misc/xcompmgr
+x11-misc/xdotool
+x11-misc/xwallpaper
+sys-apps/pv
+x11-apps/mesa-progs
+x11-apps/setxkbmap
+x11-apps/xdpyinfo
+x11-apps/xev
+x11-drivers/xf86-input-wacom
diff --git a/portage/portage/sets/ilaptop b/portage/portage/sets/ilaptop
new file mode 100644
index 0000000..6d372da
--- /dev/null
+++ b/portage/portage/sets/ilaptop
@@ -0,0 +1,8 @@
+@icommon
+
+sys-power/acpilight
+x11-apps/igt-gpu-tools
+sys-firmware/intel-microcode
+net-vpn/networkmanager-openvpn
+x11-drivers/xf86-video-intel
+media-libs/libva-intel-driver
diff --git a/portage/portage/sets/ipc b/portage/portage/sets/ipc
new file mode 100644
index 0000000..1c31a89
--- /dev/null
+++ b/portage/portage/sets/ipc
@@ -0,0 +1,8 @@
+@icommon
+
+games-action/multimc-bin
+
+app-emulation/dxvk
+app-emulation/vkd3d-proton
+dev-util/vulkan-tools
+games-util/mangohud::ace
diff --git a/portage/portage/sets/svp b/portage/portage/sets/svp
new file mode 100644
index 0000000..8005ca8
--- /dev/null
+++ b/portage/portage/sets/svp
@@ -0,0 +1,7 @@
+dev-qt/qtdeclarative
+dev-qt/qtconcurrent
+dev-qt/qtsvg
+media-libs/vapoursynth
+media-video/mediainfo
+sys-process/lsof
+media-video/mpv::vapoursynth
diff --git a/snapper/snapper/configs/root b/snapper/snapper/configs/root
new file mode 100644
index 0000000..f5e453d
--- /dev/null
+++ b/snapper/snapper/configs/root
@@ -0,0 +1,63 @@
+
+# subvolume to snapshot
+SUBVOLUME="/"
+
+# filesystem type
+FSTYPE="btrfs"
+
+
+# btrfs qgroup for space aware cleanup algorithms
+QGROUP=""
+
+
+# fraction or absolute size of the filesystems space the snapshots may use
+SPACE_LIMIT="0.5"
+
+# fraction or absolute size of the filesystems space that should be free
+FREE_LIMIT="0.2"
+
+
+# users and groups allowed to work with config
+ALLOW_USERS=""
+ALLOW_GROUPS=""
+
+# sync users and groups from ALLOW_USERS and ALLOW_GROUPS to .snapshots
+# directory
+SYNC_ACL="no"
+
+
+# start comparing pre- and post-snapshot in background after creating
+# post-snapshot
+BACKGROUND_COMPARISON="yes"
+
+
+# run daily number cleanup
+NUMBER_CLEANUP="yes"
+
+# limit for number cleanup
+NUMBER_MIN_AGE="1800"
+NUMBER_LIMIT="50"
+NUMBER_LIMIT_IMPORTANT="10"
+
+
+# create hourly snapshots
+TIMELINE_CREATE="yes"
+
+# cleanup hourly snapshots after some time
+TIMELINE_CLEANUP="yes"
+
+# limits for timeline cleanup
+TIMELINE_MIN_AGE="1800"
+TIMELINE_LIMIT_HOURLY="10"
+TIMELINE_LIMIT_DAILY="10"
+TIMELINE_LIMIT_WEEKLY="0"
+TIMELINE_LIMIT_MONTHLY="10"
+TIMELINE_LIMIT_YEARLY="10"
+
+
+# cleanup empty pre-post-pairs
+EMPTY_PRE_POST_CLEANUP="yes"
+
+# limits for empty pre-post-pair cleanup
+EMPTY_PRE_POST_MIN_AGE="1800"
+
diff --git a/swap/conf.d/swap b/swap/conf.d/swap
new file mode 100644
index 0000000..c423263
--- /dev/null
+++ b/swap/conf.d/swap
@@ -0,0 +1,14 @@
+# If you are only using local swap partitions, you should not change
+# this file. Otherwise, you need to uncomment the below rc_before line
+# followed by the appropriate rc_need line.
+#rc_before="!localmount"
+#
+# If you are using swap files stored on local file systems, uncomment
+# this line.
+# ivan: uncommented as otherwise swap would not mount during boot, also see /etc/rc.conf
+rc_need="localmount"
+#
+# If you are using swap files stored on network file systems or swap
+# partitions stored on network block devices such as iSCSI, uncomment
+# this line.
+#rc_need="netmount"
diff --git a/sysctl/sysctl.d/README b/sysctl/sysctl.d/README
new file mode 100644
index 0000000..ca3e030
--- /dev/null
+++ b/sysctl/sysctl.d/README
@@ -0,0 +1,13 @@
+Kernel system variables configuration files
+
+Files found under the /etc/sysctl.d directory that end with .conf are
+parsed within sysctl(8) at boot time. If you want to set kernel variables
+you can either edit /etc/sysctl.conf or make a new file.
+
+The filename isn't important, but don't make it a package name as it may clash
+with something the package builder needs later. The file name must end
+with .conf, or it will not be read.
+
+The recommended location for local system settings is /etc/sysctl.d/local.conf
+but as long as you follow the rules for the name of the file, anything will
+work. see the sysctl.conf(5) man page for details of the format.
diff --git a/ufw/ufw/after.rules b/ufw/ufw/after.rules
new file mode 100644
index 0000000..0d6c646
--- /dev/null
+++ b/ufw/ufw/after.rules
@@ -0,0 +1,30 @@
+#
+# rules.input-after
+#
+# Rules that should be run after the ufw command line added rules. Custom
+# rules should be added to one of these chains:
+# ufw-after-input
+# ufw-after-output
+# ufw-after-forward
+#
+
+# Don't delete these required lines, otherwise there will be errors
+*filter
+:ufw-after-input - [0:0]
+:ufw-after-output - [0:0]
+:ufw-after-forward - [0:0]
+# End required lines
+
+# don't log noisy services by default
+-A ufw-after-input -p udp --dport 137 -j ufw-skip-to-policy-input
+-A ufw-after-input -p udp --dport 138 -j ufw-skip-to-policy-input
+-A ufw-after-input -p tcp --dport 139 -j ufw-skip-to-policy-input
+-A ufw-after-input -p tcp --dport 445 -j ufw-skip-to-policy-input
+-A ufw-after-input -p udp --dport 67 -j ufw-skip-to-policy-input
+-A ufw-after-input -p udp --dport 68 -j ufw-skip-to-policy-input
+
+# don't log noisy broadcast
+-A ufw-after-input -m addrtype --dst-type BROADCAST -j ufw-skip-to-policy-input
+
+# don't delete the 'COMMIT' line or these rules won't be processed
+COMMIT
diff --git a/ufw/ufw/after6.rules b/ufw/ufw/after6.rules
new file mode 100644
index 0000000..0d99672
--- /dev/null
+++ b/ufw/ufw/after6.rules
@@ -0,0 +1,27 @@
+#
+# rules.input-after
+#
+# Rules that should be run after the ufw command line added rules. Custom
+# rules should be added to one of these chains:
+# ufw6-after-input
+# ufw6-after-output
+# ufw6-after-forward
+#
+
+# Don't delete these required lines, otherwise there will be errors
+*filter
+:ufw6-after-input - [0:0]
+:ufw6-after-output - [0:0]
+:ufw6-after-forward - [0:0]
+# End required lines
+
+# don't log noisy services by default
+-A ufw6-after-input -p udp --dport 137 -j ufw6-skip-to-policy-input
+-A ufw6-after-input -p udp --dport 138 -j ufw6-skip-to-policy-input
+-A ufw6-after-input -p tcp --dport 139 -j ufw6-skip-to-policy-input
+-A ufw6-after-input -p tcp --dport 445 -j ufw6-skip-to-policy-input
+-A ufw6-after-input -p udp --dport 546 -j ufw6-skip-to-policy-input
+-A ufw6-after-input -p udp --dport 547 -j ufw6-skip-to-policy-input
+
+# don't delete the 'COMMIT' line or these rules won't be processed
+COMMIT
diff --git a/ufw/ufw/before.rules b/ufw/ufw/before.rules
new file mode 100644
index 0000000..23b384e
--- /dev/null
+++ b/ufw/ufw/before.rules
@@ -0,0 +1,75 @@
+#
+# rules.before
+#
+# Rules that should be run before the ufw command line added rules. Custom
+# rules should be added to one of these chains:
+# ufw-before-input
+# ufw-before-output
+# ufw-before-forward
+#
+
+# Don't delete these required lines, otherwise there will be errors
+*filter
+:ufw-before-input - [0:0]
+:ufw-before-output - [0:0]
+:ufw-before-forward - [0:0]
+:ufw-not-local - [0:0]
+# End required lines
+
+
+# allow all on loopback
+-A ufw-before-input -i lo -j ACCEPT
+-A ufw-before-output -o lo -j ACCEPT
+
+# quickly process packets for which we already have a connection
+-A ufw-before-input -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
+-A ufw-before-output -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
+-A ufw-before-forward -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
+
+# drop INVALID packets (logs these in loglevel medium and higher)
+-A ufw-before-input -m conntrack --ctstate INVALID -j ufw-logging-deny
+-A ufw-before-input -m conntrack --ctstate INVALID -j DROP
+
+# ok icmp codes for INPUT
+-A ufw-before-input -p icmp --icmp-type destination-unreachable -j ACCEPT
+-A ufw-before-input -p icmp --icmp-type time-exceeded -j ACCEPT
+-A ufw-before-input -p icmp --icmp-type parameter-problem -j ACCEPT
+-A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT
+
+# ok icmp code for FORWARD
+-A ufw-before-forward -p icmp --icmp-type destination-unreachable -j ACCEPT
+-A ufw-before-forward -p icmp --icmp-type time-exceeded -j ACCEPT
+-A ufw-before-forward -p icmp --icmp-type parameter-problem -j ACCEPT
+-A ufw-before-forward -p icmp --icmp-type echo-request -j ACCEPT
+
+# allow dhcp client to work
+-A ufw-before-input -p udp --sport 67 --dport 68 -j ACCEPT
+
+#
+# ufw-not-local
+#
+-A ufw-before-input -j ufw-not-local
+
+# if LOCAL, RETURN
+-A ufw-not-local -m addrtype --dst-type LOCAL -j RETURN
+
+# if MULTICAST, RETURN
+-A ufw-not-local -m addrtype --dst-type MULTICAST -j RETURN
+
+# if BROADCAST, RETURN
+-A ufw-not-local -m addrtype --dst-type BROADCAST -j RETURN
+
+# all other non-local packets are dropped
+-A ufw-not-local -m limit --limit 3/min --limit-burst 10 -j ufw-logging-deny
+-A ufw-not-local -j DROP
+
+# allow MULTICAST mDNS for service discovery (be sure the MULTICAST line above
+# is uncommented)
+-A ufw-before-input -p udp -d 224.0.0.251 --dport 5353 -j ACCEPT
+
+# allow MULTICAST UPnP for service discovery (be sure the MULTICAST line above
+# is uncommented)
+-A ufw-before-input -p udp -d 239.255.255.250 --dport 1900 -j ACCEPT
+
+# don't delete the 'COMMIT' line or these rules won't be processed
+COMMIT
diff --git a/ufw/ufw/before6.rules b/ufw/ufw/before6.rules
new file mode 100644
index 0000000..abebbe7
--- /dev/null
+++ b/ufw/ufw/before6.rules
@@ -0,0 +1,142 @@
+#
+# rules.before
+#
+# Rules that should be run before the ufw command line added rules. Custom
+# rules should be added to one of these chains:
+# ufw6-before-input
+# ufw6-before-output
+# ufw6-before-forward
+#
+
+# Don't delete these required lines, otherwise there will be errors
+*filter
+:ufw6-before-input - [0:0]
+:ufw6-before-output - [0:0]
+:ufw6-before-forward - [0:0]
+# End required lines
+
+
+# allow all on loopback
+-A ufw6-before-input -i lo -j ACCEPT
+-A ufw6-before-output -o lo -j ACCEPT
+
+# drop packets with RH0 headers
+-A ufw6-before-input -m rt --rt-type 0 -j DROP
+-A ufw6-before-forward -m rt --rt-type 0 -j DROP
+-A ufw6-before-output -m rt --rt-type 0 -j DROP
+
+# quickly process packets for which we already have a connection
+-A ufw6-before-input -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
+-A ufw6-before-output -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
+-A ufw6-before-forward -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
+
+# multicast ping replies are part of the ok icmp codes for INPUT (rfc4890,
+# 4.4.1 and 4.4.2), but don't have an associated connection and are otherwise
+# be marked INVALID, so allow here instead.
+-A ufw6-before-input -p icmpv6 --icmpv6-type echo-reply -j ACCEPT
+
+# drop INVALID packets (logs these in loglevel medium and higher)
+-A ufw6-before-input -m conntrack --ctstate INVALID -j ufw6-logging-deny
+-A ufw6-before-input -m conntrack --ctstate INVALID -j DROP
+
+# ok icmp codes for INPUT (rfc4890, 4.4.1 and 4.4.2)
+-A ufw6-before-input -p icmpv6 --icmpv6-type destination-unreachable -j ACCEPT
+-A ufw6-before-input -p icmpv6 --icmpv6-type packet-too-big -j ACCEPT
+# codes 0 and 1
+-A ufw6-before-input -p icmpv6 --icmpv6-type time-exceeded -j ACCEPT
+# codes 0-2 (echo-reply needs to be before INVALID, see above)
+-A ufw6-before-input -p icmpv6 --icmpv6-type parameter-problem -j ACCEPT
+-A ufw6-before-input -p icmpv6 --icmpv6-type echo-request -j ACCEPT
+-A ufw6-before-input -p icmpv6 --icmpv6-type router-solicitation -m hl --hl-eq 255 -j ACCEPT
+-A ufw6-before-input -p icmpv6 --icmpv6-type router-advertisement -m hl --hl-eq 255 -j ACCEPT
+-A ufw6-before-input -p icmpv6 --icmpv6-type neighbor-solicitation -m hl --hl-eq 255 -j ACCEPT
+-A ufw6-before-input -p icmpv6 --icmpv6-type neighbor-advertisement -m hl --hl-eq 255 -j ACCEPT
+# IND solicitation
+-A ufw6-before-input -p icmpv6 --icmpv6-type 141 -m hl --hl-eq 255 -j ACCEPT
+# IND advertisement
+-A ufw6-before-input -p icmpv6 --icmpv6-type 142 -m hl --hl-eq 255 -j ACCEPT
+# MLD query
+-A ufw6-before-input -p icmpv6 --icmpv6-type 130 -s fe80::/10 -j ACCEPT
+# MLD report
+-A ufw6-before-input -p icmpv6 --icmpv6-type 131 -s fe80::/10 -j ACCEPT
+# MLD done
+-A ufw6-before-input -p icmpv6 --icmpv6-type 132 -s fe80::/10 -j ACCEPT
+# MLD report v2
+-A ufw6-before-input -p icmpv6 --icmpv6-type 143 -s fe80::/10 -j ACCEPT
+# SEND certificate path solicitation
+-A ufw6-before-input -p icmpv6 --icmpv6-type 148 -m hl --hl-eq 255 -j ACCEPT
+# SEND certificate path advertisement
+-A ufw6-before-input -p icmpv6 --icmpv6-type 149 -m hl --hl-eq 255 -j ACCEPT
+# MR advertisement
+-A ufw6-before-input -p icmpv6 --icmpv6-type 151 -s fe80::/10 -m hl --hl-eq 1 -j ACCEPT
+# MR solicitation
+-A ufw6-before-input -p icmpv6 --icmpv6-type 152 -s fe80::/10 -m hl --hl-eq 1 -j ACCEPT
+# MR termination
+-A ufw6-before-input -p icmpv6 --icmpv6-type 153 -s fe80::/10 -m hl --hl-eq 1 -j ACCEPT
+
+# ok icmp codes for OUTPUT (rfc4890, 4.4.1 and 4.4.2)
+-A ufw6-before-output -p icmpv6 --icmpv6-type destination-unreachable -j ACCEPT
+-A ufw6-before-output -p icmpv6 --icmpv6-type packet-too-big -j ACCEPT
+# codes 0 and 1
+-A ufw6-before-output -p icmpv6 --icmpv6-type time-exceeded -j ACCEPT
+# codes 0-2
+-A ufw6-before-output -p icmpv6 --icmpv6-type parameter-problem -j ACCEPT
+-A ufw6-before-output -p icmpv6 --icmpv6-type echo-request -j ACCEPT
+-A ufw6-before-output -p icmpv6 --icmpv6-type echo-reply -j ACCEPT
+-A ufw6-before-output -p icmpv6 --icmpv6-type router-solicitation -m hl --hl-eq 255 -j ACCEPT
+-A ufw6-before-output -p icmpv6 --icmpv6-type neighbor-advertisement -m hl --hl-eq 255 -j ACCEPT
+-A ufw6-before-output -p icmpv6 --icmpv6-type neighbor-solicitation -m hl --hl-eq 255 -j ACCEPT
+-A ufw6-before-output -p icmpv6 --icmpv6-type router-advertisement -m hl --hl-eq 255 -j ACCEPT
+# IND solicitation
+-A ufw6-before-output -p icmpv6 --icmpv6-type 141 -m hl --hl-eq 255 -j ACCEPT
+# IND advertisement
+-A ufw6-before-output -p icmpv6 --icmpv6-type 142 -m hl --hl-eq 255 -j ACCEPT
+# MLD query
+-A ufw6-before-output -p icmpv6 --icmpv6-type 130 -s fe80::/10 -j ACCEPT
+# MLD report
+-A ufw6-before-output -p icmpv6 --icmpv6-type 131 -s fe80::/10 -j ACCEPT
+# MLD done
+-A ufw6-before-output -p icmpv6 --icmpv6-type 132 -s fe80::/10 -j ACCEPT
+# MLD report v2
+-A ufw6-before-output -p icmpv6 --icmpv6-type 143 -s fe80::/10 -j ACCEPT
+# SEND certificate path solicitation
+-A ufw6-before-output -p icmpv6 --icmpv6-type 148 -m hl --hl-eq 255 -j ACCEPT
+# SEND certificate path advertisement
+-A ufw6-before-output -p icmpv6 --icmpv6-type 149 -m hl --hl-eq 255 -j ACCEPT
+# MR advertisement
+-A ufw6-before-output -p icmpv6 --icmpv6-type 151 -s fe80::/10 -m hl --hl-eq 1 -j ACCEPT
+# MR solicitation
+-A ufw6-before-output -p icmpv6 --icmpv6-type 152 -s fe80::/10 -m hl --hl-eq 1 -j ACCEPT
+# MR termination
+-A ufw6-before-output -p icmpv6 --icmpv6-type 153 -s fe80::/10 -m hl --hl-eq 1 -j ACCEPT
+
+# ok icmp codes for FORWARD (rfc4890, 4.3.1)
+-A ufw6-before-forward -p icmpv6 --icmpv6-type destination-unreachable -j ACCEPT
+-A ufw6-before-forward -p icmpv6 --icmpv6-type packet-too-big -j ACCEPT
+# codes 0 and 1
+-A ufw6-before-forward -p icmpv6 --icmpv6-type time-exceeded -j ACCEPT
+# codes 0-2
+-A ufw6-before-forward -p icmpv6 --icmpv6-type parameter-problem -j ACCEPT
+-A ufw6-before-forward -p icmpv6 --icmpv6-type echo-request -j ACCEPT
+-A ufw6-before-forward -p icmpv6 --icmpv6-type echo-reply -j ACCEPT
+# ok icmp codes for FORWARD (rfc4890, 4.3.2)
+# Home Agent Address Discovery Reques
+-A ufw6-before-input -p icmpv6 --icmpv6-type 144 -j ACCEPT
+# Home Agent Address Discovery Reply
+-A ufw6-before-input -p icmpv6 --icmpv6-type 145 -j ACCEPT
+# Mobile Prefix Solicitation
+-A ufw6-before-input -p icmpv6 --icmpv6-type 146 -j ACCEPT
+# Mobile Prefix Advertisement
+-A ufw6-before-input -p icmpv6 --icmpv6-type 147 -j ACCEPT
+
+# allow dhcp client to work
+-A ufw6-before-input -p udp -s fe80::/10 --sport 547 -d fe80::/10 --dport 546 -j ACCEPT
+
+# allow MULTICAST mDNS for service discovery
+-A ufw6-before-input -p udp -d ff02::fb --dport 5353 -j ACCEPT
+
+# allow MULTICAST UPnP for service discovery
+-A ufw6-before-input -p udp -d ff02::f --dport 1900 -j ACCEPT
+
+# don't delete the 'COMMIT' line or these rules won't be processed
+COMMIT
diff --git a/ufw/ufw/sysctl.conf b/ufw/ufw/sysctl.conf
new file mode 100644
index 0000000..4ea2032
--- /dev/null
+++ b/ufw/ufw/sysctl.conf
@@ -0,0 +1,57 @@
+#
+# Configuration file for setting network variables. Please note these settings
+# override /etc/sysctl.conf. If you prefer to use /etc/sysctl.conf, please
+# adjust IPT_SYSCTL in /etc/default/ufw.
+#
+
+# Uncomment this to allow this host to route packets between interfaces
+#net/ipv4/ip_forward=1
+#net/ipv6/conf/default/forwarding=1
+#net/ipv6/conf/all/forwarding=1
+
+# Turn on Source Address Verification in all interfaces to prevent some
+# spoofing attacks
+net/ipv4/conf/default/rp_filter=1
+net/ipv4/conf/all/rp_filter=1
+
+# Do not accept IP source route packets (we are not a router)
+net/ipv4/conf/default/accept_source_route=0
+net/ipv4/conf/all/accept_source_route=0
+net/ipv6/conf/default/accept_source_route=0
+net/ipv6/conf/all/accept_source_route=0
+
+# Disable ICMP redirects. ICMP redirects are rarely used but can be used in
+# MITM (man-in-the-middle) attacks. Disabling ICMP may disrupt legitimate
+# traffic to those sites.
+net/ipv4/conf/default/accept_redirects=0
+net/ipv4/conf/all/accept_redirects=0
+net/ipv6/conf/default/accept_redirects=0
+net/ipv6/conf/all/accept_redirects=0
+
+# Ignore bogus ICMP errors
+net/ipv4/icmp_echo_ignore_broadcasts=1
+net/ipv4/icmp_ignore_bogus_error_responses=1
+net/ipv4/icmp_echo_ignore_all=0
+
+# Don't log Martian Packets (impossible packets)
+net/ipv4/conf/default/log_martians=0
+net/ipv4/conf/all/log_martians=0
+
+# Change to '0' to disable TCP/IP SYN cookies. A value of '1' disables TCP
+# Window Scaling (http://lkml.org/lkml/2008/2/5/167).
+#net/ipv4/tcp_syncookies=1
+
+#net/ipv4/tcp_fin_timeout=30
+#net/ipv4/tcp_keepalive_intvl=1800
+
+# normally allowing tcp_sack is ok, but if going through OpenBSD 3.8 RELEASE or
+# earlier pf firewall, should set this to 0
+net/ipv4/tcp_sack=1
+
+# Uncomment this to turn off ipv6 autoconfiguration
+#net/ipv6/conf/default/autoconf=0
+#net/ipv6/conf/all/autoconf=0
+
+# Uncomment this to enable ipv6 privacy addressing
+#net/ipv6/conf/default/use_tempaddr=2
+#net/ipv6/conf/all/use_tempaddr=2
diff --git a/ufw/ufw/ufw.conf b/ufw/ufw/ufw.conf
new file mode 100644
index 0000000..28fe534
--- /dev/null
+++ b/ufw/ufw/ufw.conf
@@ -0,0 +1,10 @@
+# /etc/ufw/ufw.conf
+#
+
+# Set to yes to start on boot. If setting this remotely, be sure to add a rule
+# to allow your remote connection before starting ufw. Eg: 'ufw allow 22/tcp'
+ENABLED=yes
+
+# Please use the 'ufw' command to set the loglevel. Eg: 'ufw logging medium'.
+# See 'man ufw' for details.
+LOGLEVEL=low
diff --git a/ufw/ufw/user.rules b/ufw/ufw/user.rules
new file mode 100644
index 0000000..3a3b8b2
--- /dev/null
+++ b/ufw/ufw/user.rules
@@ -0,0 +1,56 @@
+*filter
+:ufw-user-input - [0:0]
+:ufw-user-output - [0:0]
+:ufw-user-forward - [0:0]
+:ufw-before-logging-input - [0:0]
+:ufw-before-logging-output - [0:0]
+:ufw-before-logging-forward - [0:0]
+:ufw-user-logging-input - [0:0]
+:ufw-user-logging-output - [0:0]
+:ufw-user-logging-forward - [0:0]
+:ufw-after-logging-input - [0:0]
+:ufw-after-logging-output - [0:0]
+:ufw-after-logging-forward - [0:0]
+:ufw-logging-deny - [0:0]
+:ufw-logging-allow - [0:0]
+:ufw-user-limit - [0:0]
+:ufw-user-limit-accept - [0:0]
+### RULES ###
+
+### tuple ### allow any 443 0.0.0.0/0 any 0.0.0.0/0 out
+-A ufw-user-output -p tcp --dport 443 -j ACCEPT
+-A ufw-user-output -p udp --dport 443 -j ACCEPT
+
+### tuple ### allow any 80 0.0.0.0/0 any 0.0.0.0/0 out
+-A ufw-user-output -p tcp --dport 80 -j ACCEPT
+-A ufw-user-output -p udp --dport 80 -j ACCEPT
+
+### tuple ### allow any 53 0.0.0.0/0 any 0.0.0.0/0 DNS - out
+-A ufw-user-output -p tcp --dport 53 -j ACCEPT -m comment --comment 'dapp_DNS'
+-A ufw-user-output -p udp --dport 53 -j ACCEPT -m comment --comment 'dapp_DNS'
+
+### tuple ### allow any 22 0.0.0.0/0 any 0.0.0.0/0 in
+-A ufw-user-input -p tcp --dport 22 -j ACCEPT
+-A ufw-user-input -p udp --dport 22 -j ACCEPT
+
+### tuple ### allow any 22 0.0.0.0/0 any 0.0.0.0/0 out
+-A ufw-user-output -p tcp --dport 22 -j ACCEPT
+-A ufw-user-output -p udp --dport 22 -j ACCEPT
+
+### END RULES ###
+
+### LOGGING ###
+-A ufw-after-logging-input -j LOG --log-prefix "[UFW BLOCK] " -m limit --limit 3/min --limit-burst 10
+-A ufw-after-logging-output -j LOG --log-prefix "[UFW BLOCK] " -m limit --limit 3/min --limit-burst 10
+-A ufw-after-logging-forward -j LOG --log-prefix "[UFW BLOCK] " -m limit --limit 3/min --limit-burst 10
+-I ufw-logging-deny -m conntrack --ctstate INVALID -j RETURN -m limit --limit 3/min --limit-burst 10
+-A ufw-logging-deny -j LOG --log-prefix "[UFW BLOCK] " -m limit --limit 3/min --limit-burst 10
+-A ufw-logging-allow -j LOG --log-prefix "[UFW ALLOW] " -m limit --limit 3/min --limit-burst 10
+### END LOGGING ###
+
+### RATE LIMITING ###
+-A ufw-user-limit -m limit --limit 3/minute -j LOG --log-prefix "[UFW LIMIT BLOCK] "
+-A ufw-user-limit -j REJECT
+-A ufw-user-limit-accept -j ACCEPT
+### END RATE LIMITING ###
+COMMIT
diff --git a/ufw/ufw/user6.rules b/ufw/ufw/user6.rules
new file mode 100644
index 0000000..8abf7ea
--- /dev/null
+++ b/ufw/ufw/user6.rules
@@ -0,0 +1,56 @@
+*filter
+:ufw6-user-input - [0:0]
+:ufw6-user-output - [0:0]
+:ufw6-user-forward - [0:0]
+:ufw6-before-logging-input - [0:0]
+:ufw6-before-logging-output - [0:0]
+:ufw6-before-logging-forward - [0:0]
+:ufw6-user-logging-input - [0:0]
+:ufw6-user-logging-output - [0:0]
+:ufw6-user-logging-forward - [0:0]
+:ufw6-after-logging-input - [0:0]
+:ufw6-after-logging-output - [0:0]
+:ufw6-after-logging-forward - [0:0]
+:ufw6-logging-deny - [0:0]
+:ufw6-logging-allow - [0:0]
+:ufw6-user-limit - [0:0]
+:ufw6-user-limit-accept - [0:0]
+### RULES ###
+
+### tuple ### allow any 443 ::/0 any ::/0 out
+-A ufw6-user-output -p tcp --dport 443 -j ACCEPT
+-A ufw6-user-output -p udp --dport 443 -j ACCEPT
+
+### tuple ### allow any 80 ::/0 any ::/0 out
+-A ufw6-user-output -p tcp --dport 80 -j ACCEPT
+-A ufw6-user-output -p udp --dport 80 -j ACCEPT
+
+### tuple ### allow any 53 ::/0 any ::/0 DNS - out
+-A ufw6-user-output -p tcp --dport 53 -j ACCEPT -m comment --comment 'dapp_DNS'
+-A ufw6-user-output -p udp --dport 53 -j ACCEPT -m comment --comment 'dapp_DNS'
+
+### tuple ### allow any 22 ::/0 any ::/0 in
+-A ufw6-user-input -p tcp --dport 22 -j ACCEPT
+-A ufw6-user-input -p udp --dport 22 -j ACCEPT
+
+### tuple ### allow any 22 ::/0 any ::/0 out
+-A ufw6-user-output -p tcp --dport 22 -j ACCEPT
+-A ufw6-user-output -p udp --dport 22 -j ACCEPT
+
+### END RULES ###
+
+### LOGGING ###
+-A ufw6-after-logging-input -j LOG --log-prefix "[UFW BLOCK] " -m limit --limit 3/min --limit-burst 10
+-A ufw6-after-logging-output -j LOG --log-prefix "[UFW BLOCK] " -m limit --limit 3/min --limit-burst 10
+-A ufw6-after-logging-forward -j LOG --log-prefix "[UFW BLOCK] " -m limit --limit 3/min --limit-burst 10
+-I ufw6-logging-deny -m conntrack --ctstate INVALID -j RETURN -m limit --limit 3/min --limit-burst 10
+-A ufw6-logging-deny -j LOG --log-prefix "[UFW BLOCK] " -m limit --limit 3/min --limit-burst 10
+-A ufw6-logging-allow -j LOG --log-prefix "[UFW ALLOW] " -m limit --limit 3/min --limit-burst 10
+### END LOGGING ###
+
+### RATE LIMITING ###
+-A ufw6-user-limit -m limit --limit 3/minute -j LOG --log-prefix "[UFW LIMIT BLOCK] "
+-A ufw6-user-limit -j REJECT
+-A ufw6-user-limit-accept -j ACCEPT
+### END RATE LIMITING ###
+COMMIT