Onion Information
pages tagged ssh
No description
Onion Details
Page Clicks: 0
First Seen: 03/11/2024
Last Indexed: 10/21/2024
Onion Content
Feeding the Cloud https://feeding.cloud.geek.nz/tags/ssh/ Feeding the Cloud ikiwiki 2024-01-20T01:22:04Z Upgrading from Debian 11 bullseye to 12 bookworm https://feeding.cloud.geek.nz/posts/upgrading-from-debian-bullseye-to-bookworm/ Creative Commons Attribution-ShareAlike 4.0 International License 2024-01-20T01:22:04Z 2023-11-02T03:40:00Z Over the last few months, I upgraded my Debian machines from bullseye to bookworm . The process was uneventful (besides the asterisk issue described below), but I ended up reconfiguring several things afterwards in order to modernize my upgraded machines. Logcheck I noticed in this release that the transition to journald is essentially complete. This means that rsyslog is no longer needed on most of my systems: apt purge rsyslog Once that was done, I was able to comment out the following lines in /etc/logcheck/logcheck.logfiles.d/syslog.logfiles : #/var/log/syslog #/var/log/auth.log I did have to adjust some of my custom logcheck rules, particularly the ones that deal with kernel messages: -- a/logcheck/ignore.d.server/local-kernel +++ b/logcheck/ignore.d.server/local-kernel @@ -1,1 +1,1 @@ -^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ kernel: \[[0-9. ]+]\ IN=eno1 OUT= MAC=[0-9a-f:]+ SRC=[0-9a-f.:]+ +^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ kernel: (\[[0-9. ]+]\ )?IN=eno1 OUT= MAC=[0-9a-f:]+ SRC=[0-9a-f.:]+ Then I moved local entries from /etc/logcheck/logcheck.logfiles to /etc/logcheck/logcheck.logfiles.d/local.logfiles ( /var/log/syslog and /var/log/auth.log are enabled by default when needed) and removed some files that are no longer used: rm /var/log/mail.err* rm /var/log/mail.warn* rm /var/log/mail.info* Finally, I had to fix any unescaped | characters in my local rules. For example error == NULL || \*error == NULL must now be written as error == NULL \|\| \*error == NULL . Networking After the upgrade, I got a notice that the isc-dhcp-client is now deprecated and so I removed if from my system: apt purge isc-dhcp-client This however meant that I need to ensure that my network configuration software does not depend on the now-deprecated DHCP client. On my laptop, I was already using NetworkManager for my main network interfaces and that has built-in DHCP support. Migration to systemd-networkd On my backup server, I took this opportunity to switch from ifupdown to systemd-networkd by removing ifupdown : apt purge ifupdown rm /etc/network/interfaces putting the following in /etc/systemd/network/20-wired.network : [Match] Name=eno1 [Network] DHCP=yes MulticastDNS=yes and then enabling/starting systemd-networkd : systemctl enable systemd-networkd systemctl start systemd-networkd I also needed to install polkit: apt install --no-install-recommends policykit-1 in order to allow systemd-networkd to set the hostname . In order to start my firewall automatically as interfaces are brought up, I wrote a dispatcher script to apply my existing iptables rules . Migration to predictacle network interface names On my Linode server, I did the same as on the backup server, but I put the following in /etc/systemd/network/20-wired.network since it has a static IPv6 allocation: [Match] Name=enp0s4 [Network] DHCP=yes Address=2600:3c01::xxxx:xxxx:xxxx:939f/64 Gateway=fe80::1 and switched to predictable network interface names by deleting these two files: /etc/systemd/network/50-virtio-kernel-names.link /etc/systemd/network/99-default.link and then changing eth0 to enp0s4 in: /etc/network/iptables.up.rules /etc/network/ip6tables.up.rules /etc/rc.local (for OpenVPN ) /etc/logcheck/ignored.d.*/* Then I regenerated all initramfs: update-initramfs -u -k all and rebooted the virtual machine. Giving systemd-resolved control of /etc/resolv.conf After reading this history of DNS resolution on Linux , I decided to modernize my resolv.conf setup and let systemd-resolved handle /etc/resolv.conf . I installed the package: apt install systemd-resolved and then removed no-longer-needed packages: apt purge openresolv resolvconf avahi-daemon I also disabled support for Link-Local Multicast Name Resolution (LLMNR) after reading this person's reasoning by putting the following in /etc/systemd/resolved.conf.d/llmnr.conf : [Resolve] LLMNR=no I verified that mDNS is enabled and LLMNR is disabled: $ resolvectl mdns Global: yes Link 2 (enp0s25): yes Link 3 (wlp3s0): yes $ resolvectl llmnr Global: no Link 2 (enp0s25): no Link 3 (wlp3s0): no Note that if you want auto-discovery of local printers using CUPS, you need to keep avahi-daemon and ensure that systemd-resolved does not conflict with it . DNS resolution problems with ifupdown Also, if you haven't migrated to systemd-networkd yet and are still using ifupdown with a static IP address, you will likely run into DNS problems which can be fixed using the following patch to /etc/network/if-up.d/resolved : @@ -43,11 +43,11 @@ if systemctl is-enabled systemd-resolved > /dev/null 2>&1; then fi if [ -n "$NEW_DNS" ]; then cat <