From 7c0276fdaae62f26a02cbc1da9066914985fca77 Mon Sep 17 00:00:00 2001 From: Robin Candau Date: Thu, 30 May 2024 10:21:54 +0200 Subject: [PATCH 1/2] Add fastfetch to servers packages While neofetch was mostly a "fun" tool, fastfetch reached a level of customization and additional system information to the point where I feel like it's actually useful to also have it on servers. Indeed, in addition of the usual information like the running kernel, system uptime and so on... fastfetch can also show the CPU temp, the locale, the ip addresse(s), disk space of mount points, etc... It's a nice way to wrap a lot of useful information into a single command. I added fastfetch in Debian/Ubuntu procedure despite the fact it is not available yet in the repos but I guess [it should land there soon-ish](https://salsa.debian.org/debian/fastfetch). --- VMs/Alpine-Linux_Server_Template.md | 2 +- VMs/Arch-Linux_Server_Template.md | 2 +- VMs/Debian_Server_Template.md | 2 +- VMs/Gentoo_Server_Template.md | 2 +- VMs/RHEL_Server_Template.md | 2 +- VMs/Ubuntu_Server_Template.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/VMs/Alpine-Linux_Server_Template.md b/VMs/Alpine-Linux_Server_Template.md index 3cacb47..d19ea77 100644 --- a/VMs/Alpine-Linux_Server_Template.md +++ b/VMs/Alpine-Linux_Server_Template.md @@ -45,7 +45,7 @@ apk update && apk upgrade ### Install useful packages ```bash -apk add vim man-db sudo bash bash-completion openssh openssh-server-pam inetutils-telnet bind-tools wget traceroute rsync zip unzip diffutils mlocate htop curl logrotate fail2ban fstrim chrony firewalld shadow py3-passlib +apk add vim man-db sudo bash bash-completion openssh openssh-server-pam inetutils-telnet bind-tools wget traceroute rsync zip unzip diffutils mlocate htop curl logrotate fail2ban fstrim chrony firewalld shadow py3-passlib fastfetch ``` ### Configure various things diff --git a/VMs/Arch-Linux_Server_Template.md b/VMs/Arch-Linux_Server_Template.md index a2a6ecc..daf5fd5 100644 --- a/VMs/Arch-Linux_Server_Template.md +++ b/VMs/Arch-Linux_Server_Template.md @@ -36,7 +36,7 @@ Replaces: ```bash -pacman -S man bash-completion openssh inetutils dnsutils wget traceroute rsync zip unzip diffutils mlocate htop logrotate pacman-contrib fail2ban python-passlib +pacman -S man bash-completion openssh inetutils dnsutils wget traceroute rsync zip unzip diffutils mlocate htop logrotate pacman-contrib fail2ban python-passlib fastfetch ``` ### Configure various things diff --git a/VMs/Debian_Server_Template.md b/VMs/Debian_Server_Template.md index 3a9696d..594fc31 100644 --- a/VMs/Debian_Server_Template.md +++ b/VMs/Debian_Server_Template.md @@ -31,7 +31,7 @@ I basically follow each installation steps normally with the following exception ### Install useful packages ```bash -apt update && apt install sudo vim man bash-completion openssh-server dnsutils traceroute rsync zip unzip diffutils firewalld mlocate htop curl openssl telnet chrony wget logrotate fail2ban python3-passlib +apt update && apt install sudo vim man bash-completion openssh-server dnsutils traceroute rsync zip unzip diffutils firewalld mlocate htop curl openssl telnet chrony wget logrotate fail2ban python3-passlib fastfetch ``` ### Configure various things diff --git a/VMs/Gentoo_Server_Template.md b/VMs/Gentoo_Server_Template.md index 73ef779..6aea401 100644 --- a/VMs/Gentoo_Server_Template.md +++ b/VMs/Gentoo_Server_Template.md @@ -35,7 +35,7 @@ Replaces the fdisk part in: ```bash -emerge -a bash-completion openssh ssh netkit-telnetd bind-tools wget traceroute rsync zip unzip cronie diffutils mlocate htop logrotate fail2ban passlib +emerge -a bash-completion openssh ssh netkit-telnetd bind-tools wget traceroute rsync zip unzip cronie diffutils mlocate htop logrotate fail2ban passlib fastfetch ``` ### Configure various things diff --git a/VMs/RHEL_Server_Template.md b/VMs/RHEL_Server_Template.md index 843524a..8ab456a 100644 --- a/VMs/RHEL_Server_Template.md +++ b/VMs/RHEL_Server_Template.md @@ -31,7 +31,7 @@ I basically follow each installation steps normally with the following exception ### Install useful packages ```bash -dnf update && dnf install sudo vim man bash-completion openssh-server bind-utils traceroute rsync zip unzip diffutils firewalld mlocate curl openssl telnet chrony wget fail2ban epel-release && dnf install htop logrotate python3-passlib +dnf update && dnf install sudo vim man bash-completion openssh-server bind-utils traceroute rsync zip unzip diffutils firewalld mlocate curl openssl telnet chrony wget fail2ban epel-release && dnf install htop logrotate python3-passlib fastfetch ``` ### Configure various things diff --git a/VMs/Ubuntu_Server_Template.md b/VMs/Ubuntu_Server_Template.md index 74b706a..95ed838 100644 --- a/VMs/Ubuntu_Server_Template.md +++ b/VMs/Ubuntu_Server_Template.md @@ -31,7 +31,7 @@ I basically follow each installation steps normally with the following exception ### Install useful packages ```bash -apt update && apt install sudo vim man bash-completion openssh-server dnsutils traceroute rsync zip unzip diffutils firewalld mlocate htop curl openssl telnet chrony wget logrotate fail2ban python3-passlib +apt update && apt install sudo vim man bash-completion openssh-server dnsutils traceroute rsync zip unzip diffutils firewalld mlocate htop curl openssl telnet chrony wget logrotate fail2ban python3-passlib fastfetch ``` ### Configure various things From 70662501bec840fdda56bf53c6a0c111832f4997 Mon Sep 17 00:00:00 2001 From: Robin Candau Date: Thu, 30 May 2024 10:41:05 +0200 Subject: [PATCH 2/2] Forgot Services/Debian.md --- Services/Debian.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Services/Debian.md b/Services/Debian.md index 64620fc..a9f5711 100644 --- a/Services/Debian.md +++ b/Services/Debian.md @@ -51,7 +51,7 @@ sudo systemctl restart networking ```bash sudo apt update && sudo apt full-upgrade -sudo apt install vim man bash-completion openssh-server dnsutils traceroute rsync zip unzip diffutils firewalld mlocate htop curl openssl telnet chrony parted wget logrotate +sudo apt install vim man bash-completion openssh-server dnsutils traceroute rsync zip unzip diffutils firewalld mlocate htop curl openssl telnet chrony wget logrotate fail2ban python3-passlib fastfetch sudo systemctl enable --now logrotate.timer ``` @@ -128,6 +128,10 @@ sudo firewall-cmd --remove-service="dhcpv6-client" --permanent #Close the dhcpv6 sudo firewall-cmd --reload ``` +## Configure and start fail2ban + +Procedure: + ## Enable fstrim (for SSDs only - optional) If you use SSDs, you can use `fstrim` to discard all unused blocks in the filesystem in order to improve performances.