⣿ ZOTHOS × 1NC0GN30 30 DAYS OF LINUX FUNDAMENTALS · TUI (./control-panel) + WEB GUI · 90 MISSIONS
← Back to 30-Day Curriculum

WEEK 3 · SECURITY & WORKFLOWS · TUI: ./control-panel --day 15

Day 15: Linux Security Hardening, Firewalls & MAC

Harden file permissions, configure iptables/nftables packet filtering, lock down SSH, and inspect SELinux/AppArmor.

XP 0
Streak 0
Command Mastery 0%
Study Music

YouTube Study Radio

Pick a track or paste any YouTube URL.

🍳 Breakfast (Syntax) Session

Type commands, build streaks, and then review the source guide.

Live Terminal Drill

Re-type the command exactly to clear each challenge.

target$ loading...

0 / 12 mastered

    Command Board

    Tap a command when you practiced it in your own terminal.

    Command Intel

    Meaning

    Command explanation will appear here.

    Sample Output

    Output preview will appear here.

    Useful Fun Fact

    Fun facts about the active command will appear here.

    Last Run Output

    Run a command to see result feedback.

    Knowledge Boost

    Faster learning with topic cues, mini-missions, and external docs.

    Key Topics

    ⚡ 60-Second Mental Model (Student Digest)1. Linux Security Basics2. File Permissions & Ownership3. Firewall Basics (iptables/nftables)4. SSH HardeningSelf-Check Quiz & Verification

    Mini Missions

    • Mission 1: Run chmod 750 and explain the output in one sentence.
    • Mission 2: Run chown and explain the output in one sentence.
    • Mission 3: Run iptables and explain the output in one sentence.
    • Mission 4: Run mkdir -p /tmp/linux-dojo-day-15 && cd /tmp/linux-dojo-day-15 and explain the output in one sentence.

    📖 Digestible Study Guide & Visual Architecture

    Source: day-15-breakfast-guide.md · Synced with ./control-panel --day 15

    Day 15 · Breakfast — Linux Security Hardening, Firewalls & Mandatory Access Control



    ZothOS × 1nc0gn30 Linux Dojo · Phase: Week 3 (Security & Workflows) · Session: Breakfast (Morning Foundation & Core Command Syntax)

    Core Commands: chmod 750, chown, iptables, nftables, sshd_config, fail2ban


    ⚡ 60-Second Mental Model (Student Digest)



    ╔══════════════════════════════════════════════════════════════════════════════╗
    ║  ZOTHOS × 1NC0GN30 // DEFENSE-IN-DEPTH & STREAM PIPELINE ARCHITECTURE        ║
    ╠══════════════════════════════════════════════════════════════════════════════╣
    ║                                                                              ║
    ║  [ INBOUND PACKET ] ──► [ Netfilter: iptables / nftables ]                   ║
    ║                                │ (ACCEPT)                                    ║
    ║                                ▼                                             ║
    ║                         [ Hardened SSHD + Fail2Ban ]                         ║
    ║                                │                                             ║
    ║                                ▼                                             ║
    ║                         [ DAC: chmod/chown ] ──► [ MAC: SELinux / AppArmor ] ║
    ║                                │                                             ║
    ║                                ▼                                             ║
    ║                         [ Auditd & Log Pipelines: grep | awk | sed ]         ║
    ╚══════════════════════════════════════════════════════════════════════════════╝


    Learning PillarHow to Practice This Session
    1. Native TUI (./control-panel)Run ./control-panel from repo root → Select Week 3 → Day 15 → Breakfast to drill interactive C lessons & quizzes.
    2. Web Workstation (astro-ui)Open /day/15 → Select Breakfast tab → Type each target command in the live Mission Terminal to earn XP & streak mastery.
    3. Safe Local SandboxRun mkdir -p /tmp/linux-dojo-day-15 && cd /tmp/linux-dojo-day-15 to test every flag below without touching production files.




    Welcome to Day 15 (Breakfast Session) of the ZothOS × 1nc0gn30 30 Days of Linux Fundamentals curriculum! This guide pairs directly with both the native C TUI (./control-panel) and the Web Mission Terminal (astro-ui).

    1. Linux Security Basics



    Overview: Understanding the fundamental security mechanisms of Linux.

    Command Example:
    man security


    Deep Dive: Linux security is enforced through user roles, permissions, and mandatory access controls. It ensures integrity, confidentiality, and availability of system resources. Tools like auditd allow monitoring of security events, and SELinux or AppArmor add additional layers of access control.

    References:
  • https://linuxsecurity.com

  • https://www.cyberciti.biz

  • https://www.linuxfoundation.org

  • https://access.redhat.com

  • https://www.nsa.gov/cybersecurity/


  • 2. File Permissions & Ownership



    Overview: Managing file permissions effectively to limit unauthorized access.

    Command Example:
    chmod 750 filename


    Deep Dive: Linux files are protected using permission bits (rwx for owner, group, and others). The chmod command is used to modify access rights, chown changes ownership, and umask sets default permissions.

    References:
  • https://linuxize.com/post/linux-file-permissions

  • https://www.cyberciti.biz/tips/understanding-linux-file-permissions.html


  • 3. Firewall Basics (iptables/nftables)



    Overview: Setting up firewalls to manage inbound and outbound traffic.

    Command Example:
    sudo iptables -L


    Deep Dive: Firewalls restrict access by filtering packets based on rules. iptables provides manual rule configuration, while nftables is a modern alternative with better performance and flexibility.

    References:
  • https://www.digitalocean.com/community/tutorials/iptables-essentials-common-firewall-rules-and-commands

  • https://wiki.archlinux.org/title/iptables


  • 4. SSH Hardening



    Overview: Techniques to improve SSH security and prevent unauthorized access.

    Command Example:
    sudo nano /etc/ssh/sshd_config


    Deep Dive: To secure SSH, disable password-based login in favor of key authentication, restrict root login, change the default port, and use fail2ban to block repeated failed login attempts.

    References:
  • https://www.ssh.com/academy/ssh/hardening

  • https://linuxhandbook.com/secure-ssh-server/





  • Self-Check Quiz & Verification



    1. Which command modifies file permissions?
  • A) chmod

  • B) chown

  • C) ls

  • D) rm

  • Correct Answer: chmod


  • 2. How do you change file ownership?
  • A) chown

  • B) chmod

  • C) passwd

  • D) touch

  • Correct Answer: chown


  • 3. What is the purpose of a firewall?
  • A) Block unauthorized access

  • B) Monitor disk usage

  • C) Change file permissions

  • D) Optimize memory usage

  • Correct Answer: Block unauthorized access