lezzo.org/secretwiki/commands.org

56 lines
1.6 KiB
Org Mode
Raw Normal View History

2022-05-15 09:29:54 +01:00
#+INCLUDE: header.org
2022-06-09 13:41:58 +01:00
* *~* Frequently used commands and configuration snippets
2022-05-15 09:36:09 +01:00
** Reduce packages disk usage on gentoo
#+begin_src
eclean packages
eclean distfiles
eclean-kernel -A -a
#+end_src
2022-05-15 09:29:54 +01:00
** Update pi-hole devuan host
#+begin_src
apt update
apt upgrade
PIHOLE_SKIP_OS_CHECK=true pihole -up
#+end_src
2022-06-09 13:49:22 +01:00
** 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 =
Endpoint = tubo.lezzo.org:51888
PersistentKeepalive = 25
AllowedIPs = 0.0.0.0/0
#+end_src
2022-06-02 15:55:50 +01:00
** Add static route for wireguard
Useful when subnet clash, example:
#+begin_src
lezzo: flags=209<UP,POINTOPOINT,RUNNING,NOARP> mtu 1420
inet 10.0.13.2 netmask 255.255.255.255 destination 10.0.13.2
wlp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> 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
2022-06-02 15:56:45 +01:00
route add -net 10.0.1.0 netmask 255.255.255.0 gw 10.0.13.1 lezzo # dns resolution through enigm.local
2022-06-02 15:55:50 +01:00
#+end_src
2022-06-09 13:40:41 +01:00
** Remove gentoo strong password requirement
2022-06-09 13:41:58 +01:00
From https://forums.gentoo.org/viewtopic-t-1117656-start-0.html:
in /etc/pam.d/system-auth
2022-06-09 13:40:41 +01:00
#+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