NDC & PKI

[Day 6] 5. Extra

D
DITISS Admin
••5 min read
  1. Quantum Computers or Quantum Computing
    Quantum computing uses quantum-mechanical phenomena (like superposition and entanglement) to perform operations on data, enabling faster problem-solving for specific tasks like cryptography and optimization.

  2. OSI Model
    A 7-layer architecture used to standardize communication in networks:

    • Application, Presentation, Session, Transport, Network, Data Link, and Physical layers.
  3. ACL in Routers
    Access Control Lists (ACLs) are used to filter and control traffic in routers, functioning similarly to firewalls by allowing or denying traffic based on specified rules.

  4. What is a Payload?
    The payload is the actual data carried by a packet, excluding headers and metadata. It is the core content delivered from source to destination.

  5. Kernel Space vs. User Space Modules

    • Kernel Space: Code that runs directly in the operating system’s core (e.g., drivers, netfilter).
    • User Space: Code that runs outside the OS kernel, in the user environment (e.g., iptables).
  6. 3-Way Handshake in TCP Protocol
    Connection Establishment:

    • Client → SYN → Server
    • Server → SYN-ACK → Client
    • Client → ACK → Server

    Connection Termination:

    • Initiator → FIN → Receiver
    • Receiver → ACK + FIN → Initiator
    • Initiator → ACK → Receiver
  7. CrypTool
    A tool used for learning, analyzing, and performing cryptographic operations like encryption, decryption, and hashing.


!3. iptables-save-configuration.png

This diagram explains two approaches for saving iptables configuration in a Linux system: manual and automated. Both ensure that iptables rules persist across system reboots. Here's the detailed breakdown:


1. Manual Approach

  • Write Bash Script → Execute After Recovery Boot:

    • In this method, you manually write a Bash script containing your
      iptables
      rules.
    • The script is executed manually after a system reboot or recovery to re-apply the saved rules.
    • Limitations: If you forget to execute the script or if it’s not automated, the rules will not persist after reboot. This method relies on human intervention.
  • Using

    iptables-save
    and
    iptables-restore
    :

    • iptables-save
      : This command saves the current
      iptables
      rules to a file, typically
      /etc/iptables/rules.v4
      for IPv4.

      bash
      sudo iptables-save > /etc/iptables/rules.v4
      
    • iptables-restore
      : After reboot, you can restore the rules using the saved file:

      bash
      sudo iptables-restore < /etc/iptables/rules.v4
      
    • Here,

      /etc/iptables/rules.v4
      acts as a storage location for the rules.


2. Automated Approach

  • This approach ensures that
    iptables
    rules are automatically reloaded after a reboot, removing the need for manual execution.
  • iptables-persistent
    :
    • The
      iptables-persistent
      package automatically saves and restores
      iptables
      rules during reboot.
    • Steps to implement:
      • Install

        iptables-persistent
        :

        bash
        sudo apt-get install iptables-persistent
        
      • Save your current rules:

        bash
        sudo netfilter-persistent save
        
      • After reboot, the rules will be automatically restored.


Summary of the Diagram

  • Manual Method:

    • Either write a Bash script (and execute manually after reboot)
    • Or use
      iptables-save
      and
      iptables-restore
      to persist the rules via
      /etc/iptables/rules.v4
      .
  • Automated Method:

    • Use the
      iptables-persistent
      package, which automates the saving and restoration of iptables rules.

Both methods are correct, but automated is preferable for reliability, especially in production environments, because it reduces manual intervention. The diagram accurately explains both approaches.


Read Next

8/26/2026

[Day 7] 1. Public Key Infrastructure (PKI)

#### **Definition and Purpose:** - PKI is primarily used for **authentication purposes**. - It is an **ISO authentication framework** that employs...

8/26/2026

[Day 7] 2. Security Threats and Defense Mechanisms

### **Attacks Against Encryption** 1. **Brute Force:** Attempting all possible combinations to decrypt the data. 2. **Finding Vulnerabiliti...