David RG Foss Technical Documentation

website·Indexed 31 days ago

https://davidrgfoss.com

A collection of technical guides and tutorials covering operating system administration, network security, and database management. Topics include Linux kernel compilation, RHEL automation via ks.cfg, OpenVPN configuration, LDAP server setup on Ubuntu 22.04, SELinux on Rocky Linux, and user access control in MongoDB, Oracle, Postgres, and MySQL.

Tokens
51.2K
Snippets
276
Records
394
Agent score
53%

What's inside David RG Foss Docs

  1. Understand the transition from CentOS Linux to CentOS Stream

    In December 2020, Red Hat transitioned CentOS Linux to CentOS Stream. Unlike the original CentOS, which provided a stable downstream version of Red Hat Enterprise Linux (RHEL), CentOS Stream serves as a development intermediary between Fedora and RHEL. This means it is a 'preview' of future RHEL features. Because CentOS Stream focuses on testing new packages rather than maintaining a frozen stable state, it is considered less suitable for production server environments where stability is critical.
  2. Install packages from specific repositories or architectures

    Use the -t flag with apt install to target a specific release/repository. To install a package for a specific architecture (e.g., i386), append the architecture suffix to the package name.
    # Install from stable
    sudo apt install -t stable openssh-client
    
    # Install from buster-backports
    sudo apt install -t buster-backports openssh-client
    
    # Install from sid
    sudo apt install -t sid openssh-client
    
    # Install i386 version of a package
    sudo apt install openssh-client:i386
  3. Understand VPN fundamentals and security

    A Virtual Private Network (VPN) creates a secure, encrypted connection (a 'tunnel') between two points over a network. This allows users to access a private internal network as if they were physically connected to it. Modern VPN security typically relies on asymmetric cryptography (certificates) to ensure data protection, though shared keys were used historically. A key feature of VPNs is the ability to mask the origin machine's IP address, making the destination believe the user is in a different physical location.
  4. Understand the internal structure of a .deb package

    A .deb package is a binary archive consisting of three main sections:

    1. Control Section: Located in the DEBIAN directory. It contains metadata (package name, version, architecture, dependencies) and maintainer scripts that define how the package is installed and removed.
    2. Data Section: Contains the actual files and directories to be installed. The directory structure here mirrors the target system's filesystem (e.g., files intended for /usr/bin are placed in ./usr/bin within the package).
    3. Optional Scripts: Specialized scripts within the control section that execute at specific lifecycle stages:
      • preinst: Runs before files are installed.
      • postinst: Runs after files are installed.
      • prerm: Runs before files are removed.
      • postrm: Runs after files are removed.
  5. Understand asymmetric encryption concepts

    Asymmetric encryption uses a pair of independent but mathematically related keys: a public key and a private key. This differs from symmetric encryption, which uses a single shared key.

    Key properties:

    • Public Key: Can be shared openly (e.g., via a key server) and is used by a sender to encrypt a message.
    • Private Key: Must be kept secret. Only the holder of the private key can decrypt messages encrypted with the corresponding public key.
    • Security Constraint: If the private key is compromised, all messages encrypted with the associated public key can be read by the attacker.
  6. Understand the internal structure of a .deb package

    A .deb package is a binary archive consisting of three primary sections:

    1. Control Section: Contains metadata (package name, version, architecture, dependencies) and installation scripts. These are stored in a directory named DEBIAN (uppercase).
    2. Data Section: Contains the actual files and directories to be installed. The directory structure here mirrors the target system's filesystem (e.g., files for /usr/bin are placed in ./usr/bin within the package).
    3. Optional Scripts: Maintainer scripts located in the control section that handle specific installation/removal tasks:
      • preinst: Runs before files are installed.
      • postinst: Runs after files are installed.
      • prerm: Runs before files are removed.
      • postrm: Runs after files are removed.
  7. Understand APT high-level package management

    APT (Advanced Package Tool) is a high-level package manager that builds upon dpkg and debconf. Unlike dpkg, APT can:

    • Connect to external servers (repositories) to download packages.
    • Automatically resolve and install all required dependencies and sub-dependencies.
    • Verify package integrity and authenticity before installation.
  8. Use debconf for package configuration

    debconf is the software configuration system for Debian and its derivatives. It is used during the installation or reconfiguration of packages to prompt the user with questions, allowing for the customization of software settings based on specific user or system needs.
  9. Understand the LockBit Ransomware-as-a-Service (RaaS) model

    LockBit operates as a Ransomware-as-a-Service (RaaS), where the core group develops and maintains the ransomware software and provides licenses to 'customers' (affiliates). The group provides updates and support for the software in exchange for a license fee and a commission from the ransoms collected from victims. This business-centric approach allows the group to scale attacks by leveraging a network of affiliates.
  10. Transition from CentOS Linux to CentOS Stream

    Following Red Hat's acquisition by IBM, the strategy for CentOS shifted. CentOS Linux, which previously served as a free binary clone of Red Hat Enterprise Linux (RHEL), has been transitioned to CentOS Stream. This change moved CentOS from being a downstream rebuild of RHEL to a development platform that precedes RHEL releases. For users requiring a stable, binary-compatible alternative to RHEL without the cost of commercial licenses, community-driven projects such as Rocky Linux and AlmaLinux have emerged to fill the gap.
  11. Understand Linux Kernel Modules (LKM) basics

    Linux Kernel Modules are object files (with a .ko extension) containing code that can be loaded into and executed within the kernel space. They allow the operating system to support new hardware, file systems, and capabilities dynamically without requiring a system reboot. Because they run in kernel space, they have high privileges; errors or vulnerabilities in a module can compromise system stability and security. Modules must be compatible with the specific version of the kernel in use.
  12. Manage i386 multi-architecture support

    Enable support for the i386 architecture using dpkg --add-architecture. You can verify non-native architectures with --print-foreign-architectures and remove the architecture using --remove-architecture.
    # Add i386 architecture
    sudo dpkg --add-architecture i386
    sudo apt update
    
    # List foreign architectures
    dpkg --print-foreign-architectures
    
    # Remove i386 architecture
    sudo dpkg --remove-architecture i386
    sudo apt update