Setting up Uncomplicated FireWall (UFW)

Primarily used on Ubuntu and Debian:

apt-get install ufw
ufw enable
ufw default deny incoming
ufw default allow outgoing
# checkit:
ufw status verbose
# add ssh
ufw allow ssh
# add other rules by servicename or custom, e.g. for Redis:
# ufw allow in on eth1 to any port 6379 proto tcp

see more here

Apt-get update cheatsheet for Ubuntu/Debian

sudo apt-get update        # Fetches the list of available packages and updates
sudo apt-get upgrade       # Strictly upgrades the current packages
sudo apt-get dist-upgrade  # Installs updates (new ones)
sudo apt-get install {package-name}  # install
sudo apt-cache search {package-name} # search
# cleanup old kernels as well as other automatically installed packages that are no longer needed:
sudo apt autoremove --purge

Debian ‘ps’ command from Apt

A lot of minimal Debian distros don’t have the `ps` process status app by default. There are times it’s useful when you want to inspect a container from the inside, so add:

`apt-get install -y procps`

to your build or manually install it after. Adds about 1MB to your environment.