Table of Contents

Debian

Changelog

  • 2024-03-08: Init for Debian 12.5

Documenting a secure-ish installation of Debian, with partial references to the Debian security manual. Reminder that cp ${DEBIAN_ISO} /dev/sdX is all it takes to write the image to disk (make sure to umount partitions first).

During installation, note the initial IP address (ip a) and available network services (lsof -nPi). Typically should only have DHCP (68/udp) and SSH (22/tcp) after installation.

Typical binaries

Initialization

Very straightforward.

/etc/ssh/sshd_config
PermitRootLogin no
user:~$ touch .hushlogin
user:~$ su -
root:~# apt install vim ufw nginx htop
root:~# ufw allow 22/tcp
root:~# ufw allow 80/tcp
root:~# ufw allow 443/tcp
root:~# ufw deny to 224.0.0.1
root:~# ufw enable
root:~# >/etc/motd
root:~# echo "export PATH=/usr/sbin:$PATH" >> .bashrc

For LXCs

apt update && apt upgrade
apt install -y curl vim htop

APT Cacher NG

# Server

auto-apt-proxy

Web portal accessible via HTTP on 3142/tcp.

user:~$ sudo apt install apt-cacher-ng auto-apt-proxy
user:~$ sudo vim /etc/apt-cacher-ng/acng.conf
AdminAuth: USERNAME:PASSWORD
user:~$ sudo systemctl restart apt-cacher-ng

# Client

user:~$ sudo apt install auto-apt-proxy
user:~$ sudo vim /etc/hosts
192.168.101.127 apt-proxy
user:~$ auto-apt-proxy
http://192.168.101.127:3142

Creating a bootable disk, simply copy the ISO to the disk path using cp.