GPG Bash Playground

GPG Bash Playground Guide Introduction The GPG Bash Playground is an educational Bash script that demonstrates the practical use of GPG (GNU Privacy Guard) for key generation, public key exchange, encryption, and decryption. The script simulates a secure communication scenario by creating three users (Alice, Bob, and Carol), generating their GPG keys, exchanging public keys, and performing encrypted message exchanges. It includes comprehensive logging, error handling, and a debug mode for detailed output. This guide explains how to set up, run, and understand the script’s functionality. ...

September 28, 2025 · 5 min · 989 words · Manzolo

LUKS Encrypted Container

💊 Quick Pill: LUKS Encrypted Container ℹ️Info Use case: Create encrypted file containers for secure backup storage, sensitive documents, or portable encrypted volumes. Works like a virtual encrypted disk. 🔐 Quick Setup (5 minutes) 1. Install Required Tools sudo apt install cryptsetup 2. Create Encrypted Container # Create a 10GB empty file (fast allocation) fallocate -l 10G BackupCrypt.img # Initialize LUKS encryption (you'll set a password) sudo cryptsetup luksFormat BackupCrypt.img # Open the encrypted container sudo cryptsetup open BackupCrypt.img backup_crypt # Create filesystem inside sudo mkfs.ext4 /dev/mapper/backup_crypt # Mount it sudo mkdir -p /mnt/encrypted sudo mount /dev/mapper/backup_crypt /mnt/encrypted # Set permissions (optional - for your user) sudo chown $USER:$USER /mnt/encrypted 3. Use Your Encrypted Storage # Copy files cp -r ~/Documents/sensitive/ /mnt/encrypted/ # Work with files normally echo "Secret data" > /mnt/encrypted/secret.txt 4. Close Encrypted Container # Unmount sudo umount /mnt/encrypted # Close LUKS container sudo cryptsetup close backup_crypt ✅Success Done! Your data is now encrypted. Without the password, the file looks like random data. 🔄 Daily Usage Open and Mount # Open with password prompt sudo cryptsetup open BackupCrypt.img backup_crypt # Mount sudo mount /dev/mapper/backup_crypt /mnt/encrypted Close and Lock # Always unmount first sudo umount /mnt/encrypted # Then close sudo cryptsetup close backup_crypt 📋 Command Reference Create Container Command Purpose Notes fallocate -l SIZE file.img Create empty file (fast) Sizes: 1G, 10G, 100G, etc. dd if=/dev/zero of=file.img bs=1M count=10240 Create file (slower, more secure) Overwrites with zeros cryptsetup luksFormat file.img Initialize LUKS encryption Sets password Open/Close Command Purpose cryptsetup open file.img name Open encrypted container cryptsetup close name Close encrypted container cryptsetup status name Check if container is open Filesystem Command Purpose mkfs.ext4 /dev/mapper/name Create ext4 filesystem mkfs.xfs /dev/mapper/name Create XFS filesystem mkfs.btrfs /dev/mapper/name Create Btrfs filesystem 💡 Pro Tips Create container with dd (more secure, slower) Use dd instead of fallocate for better security - overwrites the file with zeros: ...

October 5, 2025 · 6 min · 1190 words · Manzolo

LUKS Disk Encryption Management Guide (Debian/Ubuntu)

LUKS Disk Encryption Management Guide (Debian/Ubuntu) Introduction LUKS (Linux Unified Key Setup) is a standard for Linux disk encryption that provides a platform-independent way to encrypt block devices, such as partitions or entire disks. It supports multiple passphrases (keys), secure key derivation, and integration with other storage layers like LVM or ZFS. This guide explains how to create, modify, and manage encrypted disks with LUKS on Debian/Ubuntu systems, covering setup, key management, mounting, and maintenance. ...

October 3, 2025 · 5 min · 989 words · Manzolo

Encrypted LVM Disk Resize (LUKS + LVM)

💊 Quick Pill: Encrypted LVM Disk Resize ℹ️Info Use case: Expand encrypted Ubuntu/Debian VMs that use LUKS encryption + LVM. Common in full-disk encryption setups. 🔐 Complete Resize Process (Encrypted + LVM) ⚠️Warning ⚠️ Critical: ...

October 5, 2025 · 10 min · 2072 words · Manzolo

OpenVPN Server Installation and Configuration Guide (Debian/Ubuntu)

OpenVPN Server Installation and Configuration Guide (Debian/Ubuntu) Introduction Setting up an OpenVPN server allows secure remote access to your network or resources. This guide explains how to install an OpenVPN server on Debian/Ubuntu, generate certificates and keys, configure the server, create user/client configurations, and connect from a client. It includes steps for creating multiple users and testing connections, making it ideal for home servers, small businesses, or secure remote access. ...

October 4, 2025 · 7 min · 1281 words · Manzolo