#+INCLUDE: header.org * *~* Frequently used commands and configuration snippets ** Reduce packages disk usage on gentoo #+begin_src eclean packages eclean distfiles eclean-kernel -A -a #+end_src ** Update pi-hole devuan host #+begin_src apt update apt upgrade PIHOLE_SKIP_OS_CHECK=true pihole -up #+end_src ** Wireguard configuration #+begin_src cd /etc/wireguard.conf wg genkey > privatekey cat privatekey | wg pubkey #+end_src #+begin_src [Interface] PrivateKey = Address = 10.0.13.X/32 DNS = 10.0.1.8 # lezzo [Peer] PublicKey = sU1Cya3Ej6kQMidcwk3PMxzqNY12JfDAROeayPG5PXM= # server pubkey Endpoint = tubo.lezzo.org:51888 PersistentKeepalive = 25 AllowedIPs = 0.0.0.0/0 #+end_src ** Add static route for wireguard Useful when subnet clash, example: #+begin_src lezzo: flags=209 mtu 1420 inet 10.0.13.2 netmask 255.255.255.255 destination 10.0.13.2 wlp1s0: flags=4163 mtu 1500 inet 10.0.11.148 netmask 255.255.0.0 broadcast 10.0.255.255 #+end_src #+begin_src route add -net 10.0.13.0 netmask 255.255.255.0 gw 10.0.13.1 lezzo route add -net 10.0.1.0 netmask 255.255.255.0 gw 10.0.13.1 lezzo # dns resolution through enigm.local #+end_src ** Remove gentoo strong password requirement From https://forums.gentoo.org/viewtopic-t-1117656-start-0.html: in /etc/pam.d/system-auth #+begin_src # password required pam_passwdqc.so min=8,8,8,8,8 retry=3 # password required pam_unix.so try_first_pass use_authtok nullok sha512 shadow password required pam_unix.so try_first_pass nullok sha512 shadow # no use_authtok #+end_src